update project script

This commit is contained in:
Freya Murphy 2023-11-28 19:27:28 -05:00
parent 8fdcd343f3
commit d9f3fd0a49
3 changed files with 9 additions and 8 deletions

View file

@ -1,6 +1,6 @@
### Project ### Project
bindsym $mod+Alt+Left exec ~/.config/sway/scripts.d/project.sh LEFT bindsym $mod+Alt+Left exec ~/.config/sway/scripts.d/project.sh LEFT $scale
bindsym $mod+Alt+Right exec ~/.config/sway/scripts.d/project.sh RIGHT bindsym $mod+Alt+Right exec ~/.config/sway/scripts.d/project.sh RIGHT $scale
bindsym $mod+Alt+Up exec ~/.config/sway/scripts.d/project.sh EXTERNAL_ONLY bindsym $mod+Alt+Up exec ~/.config/sway/scripts.d/project.sh EXTERNAL_ONLY $scale
bindsym $mod+Alt+Down exec ~/.config/sway/scripts.d/project.sh PRIMARY_ONLY bindsym $mod+Alt+Down exec ~/.config/sway/scripts.d/project.sh PRIMARY_ONLY $scale

View file

@ -69,14 +69,14 @@ get_id() {
} }
die() { die() {
notify-send -u critical -t 3000 "Sway" "Failed to get display" notify-send -u critical -t 3000 "Sway" "$1"
kill $PID kill $PID
} }
PRIMARY=$(get_id "eDP-1" || die) PRIMARY=$(get_id "eDP-1" || die "Failed to get primary display")
EXTERNAL=$(get_id "DP" || get_id "HDMI" || die) EXTERNAL=$(get_id "DP" || get_id "HDMI" || die "Failed to get external display")
PRIMARY_SCALE=1.5 PRIMARY_SCALE=$2
EXTERNAL_SCALE=1 EXTERNAL_SCALE=1
set_monitors() { set_monitors() {

View file

@ -55,6 +55,7 @@ networkmanager
nodejs nodejs
noto-fonts-cjk noto-fonts-cjk
npm npm
octave
opendoas opendoas
p7zip p7zip
pacman-contrib pacman-contrib