mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-01-09 21:12:37 +08:00
feat: write dock-on-all-monitors script and install as a package
This commit is contained in:
parent
2060b91d54
commit
0d5ee75dba
2 changed files with 22 additions and 0 deletions
18
modules/home/scripts/scripts/dock-on-all-monitors.sh
Executable file
18
modules/home/scripts/scripts/dock-on-all-monitors.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
last="$(hyprctl monitors | grep Monitor | sed 's/Monitor //g' | awk '{print $3}' | sed 's/)://g' | sed ':a;N;$!ba;s/\n/ /g' | awk '{print $NF}')"
|
||||
|
||||
hyprctl dispatch focusmonitor 0
|
||||
setsid nwg-dock-hyprland -m -l top &
|
||||
|
||||
sleep 0.5
|
||||
|
||||
((last = last + 1)) # make number be one higher so it also takes last window (this is required as we used `i < "$last"`)
|
||||
for ((i = 0; i < "$last"; i++)); do
|
||||
hyprctl dispatch focusmonitor "$i"
|
||||
setsid nwg-dock-hyprland -m -l top -c 'bemenu-run -l 5' &
|
||||
sleep 0.5
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue