diff --git a/bin/brightness b/bin/sway_brightness similarity index 87% rename from bin/brightness rename to bin/sway_brightness index aa7596a..8b68f28 100755 --- a/bin/brightness +++ b/bin/sway_brightness @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/sway/bin/helpers +source $HOME/.config/sway/bin/sway_helpers DEVICE=sysfs/backlight/intel_backlight APP=light diff --git a/bin/helpers b/bin/sway_helpers similarity index 81% rename from bin/helpers rename to bin/sway_helpers index 7c5c424..3726909 100644 --- a/bin/helpers +++ b/bin/sway_helpers @@ -30,9 +30,16 @@ function _set_inhibit() { rm -f $file _log _set_inhibit: INFO inhibit disabled ;; - *) + 1|on) touch $file _log _set_inhibit: INFO inhibit enabled ;; + *) + status=0 + if [ -f $file ]; then + status=1 + fi + _log _set_inhibit: INFO inhibit status: $status + ;; esac } diff --git a/bin/lock b/bin/sway_lock similarity index 95% rename from bin/lock rename to bin/sway_lock index 243a1ac..614b56a 100755 --- a/bin/lock +++ b/bin/sway_lock @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/sway/bin/helpers +source $HOME/.config/sway/bin/sway_helpers IMAGE=$HOME/.lockscreen.jpg SCROT_APP=grim SCROT_ARGS=" -t jpeg" diff --git a/bin/suspend b/bin/sway_suspend similarity index 94% rename from bin/suspend rename to bin/sway_suspend index 2372b00..677b471 100755 --- a/bin/suspend +++ b/bin/sway_suspend @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/sway/bin/helpers +source $HOME/.config/sway/bin/sway_helpers BAT_PATH=/sys/class/power_supply BAT=BAT0 MODE=suspend-then-hibernate diff --git a/bin/volume b/bin/sway_volume similarity index 93% rename from bin/volume rename to bin/sway_volume index 7d7a0a0..6bd1b7f 100755 --- a/bin/volume +++ b/bin/sway_volume @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/sway/bin/helpers +source $HOME/.config/sway/bin/sway_helpers SINK=$(pacmd list-sinks | grep "* index" | grep -oE '[0-9]*') APP="pavucontrol" diff --git a/config b/config index 5a6f873..c5d9677 100644 --- a/config +++ b/config @@ -16,10 +16,10 @@ set $right l # Your preferred terminal emulator set $term termite set $background $HOME/Cloud/xkonni/Pictures/wallpaper/5k_bavarian_forest_bw.jpg -set $lock_cmd $HOME/.config/sway/bin/lock -set $brightness_cmd "$HOME/.config/sway/bin/brightness -set $suspend_cmd "$HOME/.config/sway/bin/suspend -set $volume_cmd "$HOME/.config/sway/bin/volume +set $lock_cmd $HOME/.config/sway/bin/sway_lock +set $brightness_cmd "$HOME/.config/sway/bin/sway_brightness +set $suspend_cmd "$HOME/.config/sway/bin/sway_suspend +set $volume_cmd "$HOME/.config/sway/bin/sway_volume set $font Cascadia Code PL Regular 10 # Your preferred application launcher