Add waybar toggle script and keybinding

This commit is contained in:
Sravan Balaji
2025-04-29 21:43:50 -04:00
parent 54ae8e57d3
commit c17504809a
3 changed files with 21 additions and 0 deletions

View File

@@ -78,6 +78,7 @@
- [[#system76-power][System76 Power]] - [[#system76-power][System76 Power]]
- [[#tray][Tray]] - [[#tray][Tray]]
- [[#end-configuration][End Configuration]] - [[#end-configuration][End Configuration]]
- [[#toggle-script][Toggle Script]]
* Welcome * Welcome
@@ -115,6 +116,7 @@ $terminal = foot
$fileManager = thunar $fileManager = thunar
$menu = rofi -show combi -run-command "uwsm app -- {cmd}" $menu = rofi -show combi -run-command "uwsm app -- {cmd}"
$colorPicker = hyprpicker -a $colorPicker = hyprpicker -a
$toggleBar = $HOME/.config/hypr/waybar/scripts/toggleBarService.sh
#+END_SRC #+END_SRC
** Autostart ** Autostart
@@ -472,6 +474,7 @@ bind = $mainMod SHIFT, Return, exec, uwsm app -- $terminal
bind = $mainMod, E, exec, uwsm app -- $fileManager bind = $mainMod, E, exec, uwsm app -- $fileManager
bind = $mainMod, P, exec, uwsm app -- $menu bind = $mainMod, P, exec, uwsm app -- $menu
bind = $mainMod, G, exec, uwsm app -- $colorPicker bind = $mainMod, G, exec, uwsm app -- $colorPicker
bind = $mainMod, B, exec, uwsm app -- $toggleBar
bind = $mainMod CTRL, P, exec, uwsm app -- $HOME/.scripts/control-center.sh --rofi bind = $mainMod CTRL, P, exec, uwsm app -- $HOME/.scripts/control-center.sh --rofi
bind = $mainMod CTRL, C, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy bind = $mainMod CTRL, C, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = $mainMod CTRL, D, exec, uwsm app -- $HOME/.scripts/brightness.sh --rofi bind = $mainMod CTRL, D, exec, uwsm app -- $HOME/.scripts/brightness.sh --rofi
@@ -1604,3 +1607,13 @@ echo '{"text":"󰢮 '$graphics'","tooltip":"󰢮\t'$graphics'\r󰐥\t'$graphicsP
#+BEGIN_SRC jsonc :tangle waybar/config.jsonc #+BEGIN_SRC jsonc :tangle waybar/config.jsonc
} }
#+END_SRC #+END_SRC
** Toggle Script
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle waybar/scripts/toggleBarService.sh
if systemctl --user is-active waybar.service; then
systemctl --user stop waybar.service
else
systemctl --user start waybar.service
fi
#+END_SRC

View File

@@ -4,6 +4,7 @@ $terminal = foot
$fileManager = thunar $fileManager = thunar
$menu = rofi -show combi -run-command "uwsm app -- {cmd}" $menu = rofi -show combi -run-command "uwsm app -- {cmd}"
$colorPicker = hyprpicker -a $colorPicker = hyprpicker -a
$toggleBar = $HOME/.config/hypr/waybar/scripts/toggleBarService.sh
exec-once = uwsm app -- fumon & exec-once = uwsm app -- fumon &
exec-once = uwsm app -- kdeconnectd --replace & exec-once = uwsm app -- kdeconnectd --replace &
@@ -182,6 +183,7 @@ bind = $mainMod SHIFT, Return, exec, uwsm app -- $terminal
bind = $mainMod, E, exec, uwsm app -- $fileManager bind = $mainMod, E, exec, uwsm app -- $fileManager
bind = $mainMod, P, exec, uwsm app -- $menu bind = $mainMod, P, exec, uwsm app -- $menu
bind = $mainMod, G, exec, uwsm app -- $colorPicker bind = $mainMod, G, exec, uwsm app -- $colorPicker
bind = $mainMod, B, exec, uwsm app -- $toggleBar
bind = $mainMod CTRL, P, exec, uwsm app -- $HOME/.scripts/control-center.sh --rofi bind = $mainMod CTRL, P, exec, uwsm app -- $HOME/.scripts/control-center.sh --rofi
bind = $mainMod CTRL, C, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy bind = $mainMod CTRL, C, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = $mainMod CTRL, D, exec, uwsm app -- $HOME/.scripts/brightness.sh --rofi bind = $mainMod CTRL, D, exec, uwsm app -- $HOME/.scripts/brightness.sh --rofi

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
if systemctl --user is-active waybar.service; then
systemctl --user stop waybar.service
else
systemctl --user start waybar.service
fi