mirror of
https://github.com/flickowoa/dotfiles.git
synced 2026-04-06 00:32:09 +02:00
gen monitor reserved space
This commit is contained in:
@@ -23,6 +23,8 @@ Utils.writeFile(`$screen_width:${SCREEN_WIDTH}px;$screen_height:${SCREEN_HEIGHT}
|
||||
const WHICH = "nier";
|
||||
globalThis.WHICH = WHICH;
|
||||
|
||||
let top_bar_height = 0;
|
||||
|
||||
|
||||
const top = () =>
|
||||
Box({
|
||||
@@ -74,6 +76,13 @@ const top = () =>
|
||||
classNames: ["under-workspaces"],
|
||||
}),
|
||||
],
|
||||
setup: (box) => Utils.timeout(1000,async() => {
|
||||
top_bar_height = box.get_allocation().height + 10;
|
||||
while (true) { // in a loop becauses if hyprland config is changed, it resets the reserved space
|
||||
execAsync(`hyprctl keyword monitor ,addreserved,${top_bar_height},${top_bar_height},0,0`).then(print).catch(print);
|
||||
await new Promise((r) => Utils.timeout(5000,r));
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
||||
const Bar = ({ monitor } = {}) => {
|
||||
@@ -121,10 +130,14 @@ dark.connect("changed", () => {
|
||||
Utils.writeFile(hyprconf,`${themedir}/theme.conf`).then(()=>{
|
||||
print("reloaded hypr")
|
||||
}).catch((e) => print("error",e));
|
||||
Utils.timeout(1000,() => {
|
||||
execAsync(`hyprctl keyword monitor ,addreserved,${top_bar_height},${top_bar_height},0,0`).then(print).catch(print);
|
||||
})
|
||||
})
|
||||
|
||||
execAsync(["bash","-c",`pkill dunst;ags -b notify -c ${App.configDir}/windows/notifications/notifications.js`])
|
||||
|
||||
|
||||
const BottomBar = ({ monitor } = {}) =>
|
||||
Window({
|
||||
name: "bottombar",
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
monitor=eDP-1,addreserved,100,100,0,0
|
||||
|
||||
exec=fish -c "set -Ux COLORFILE $THEME/colors_nier_light" && pkill -USR2 fish
|
||||
exec=fish -c "set -Ux STARSHIP_CONFIG $THEME/components/starship.toml"
|
||||
exec=fish -c "set -Ux HYPRLAND_THEME $THEME"
|
||||
exec-once=pkill ags
|
||||
exec=sleep 1 && ags -c $THEME/components/ags/config.js
|
||||
exec=sleep 1 && swww init; swww img $THEME/wallpapers/nier_light.png --transition-type simple --transition-step 255
|
||||
exec=ags -c $THEME/components/ags/config.js
|
||||
exec=swww init; swww img $THEME/wallpapers/nier_light.png --transition-type simple --transition-step 255
|
||||
exec=sleep 1 && hyprctl plugin load /lib/hyprland-plugins/hyprbars.so
|
||||
|
||||
bind=Super,o,exec,$DRUN
|
||||
|
||||
Reference in New Issue
Block a user