summaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.net>2022-05-08 20:03:16 -0500
committertslil clingman <tslil@posteo.net>2022-05-08 20:04:28 -0500
commitbffd96138125454c39dfce391c2ec7f36946de8a (patch)
tree4c0a8c91996c5c00ab89a6885aaa9bf2d6934d80 /sway
parent945a07e76640f050876dff3568c93954d1181f9f (diff)
Tweaks
Diffstat (limited to 'sway')
-rw-r--r--sway/config12
-rwxr-xr-xsway/lock8
-rwxr-xr-xsway/sway_audio6
-rwxr-xr-xsway/sway_autolock8
-rwxr-xr-xsway/sway_outputs6
5 files changed, 30 insertions, 10 deletions
diff --git a/sway/config b/sway/config
index 2120d49..f425b28 100644
--- a/sway/config
+++ b/sway/config
@@ -188,18 +188,26 @@ mode "resize" {
}
bindsym $mod+Shift+r mode "resize"
+# Audio:
+bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
+bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
+bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
+bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
+
+# Misc:
+bindsym XF86Battery exec lock
+
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
include /etc/sway/config.d/*
+exec sway_audio
exec sway_autolock
exec inactive-windows-transparency.py --opacity 0.8
exec wlsunset -l 39 -L -76
exec fnott
-exec pipewire
-exec pipewire-pulse
#exec sway_outputs
exec foot
diff --git a/sway/lock b/sway/lock
new file mode 100755
index 0000000..2132bab
--- /dev/null
+++ b/sway/lock
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+ssh-add -D
+
+swayidle timeout 1 'swaylock -c 000000' \
+ resume "killall swayidle" \
+ timeout 5 'swaymsg "output * dpms off"' \
+ resume "swaymsg 'output * dpms on'"
diff --git a/sway/sway_audio b/sway/sway_audio
new file mode 100755
index 0000000..ac3d982
--- /dev/null
+++ b/sway/sway_audio
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -z "$(pgrep pipewire)" ]; then
+ pipewire &
+ pipewire-pulse &
+fi
diff --git a/sway/sway_autolock b/sway/sway_autolock
index 9168249..307bc0d 100755
--- a/sway/sway_autolock
+++ b/sway/sway_autolock
@@ -2,11 +2,9 @@
pid="$(pgrep swayidle)"
if [ -z "$pid" ]; then
- swayidle -w timeout 300 'swaylock -f -c 000000' \
- timeout 300 'swaymsg "output * dpms off"' \
- resume 'swaymsg "output * dpms on"' &
- notify-send --app-name "Autolock" "Enabled"
+ swayidle -w timeout 300 lock &
+ notify-send -t 3000 --app-name "Autolock" "Enabled"
else
kill -9 "$pid"
- notify-send --app-name "Autolock" "DISABLED"
+ notify-send -t 3000 --app-name "Autolock" "DISABLED"
fi
diff --git a/sway/sway_outputs b/sway/sway_outputs
index e8c8505..98cabce 100755
--- a/sway/sway_outputs
+++ b/sway/sway_outputs
@@ -1,9 +1,9 @@
#!/bin/sh
-at_home=$(swaymsg -t get_outputs | grep 'TH7AA0012451')
+at_home=$(swaymsg -t get_outputs | grep 'CB242Y')
if [ -n "$at_home" ]; then
- swaymsg output VGA-1 enable scale 1.5
- swaymsg output LVDS-1 disable
+ swaymsg output HDMI-A-1 enable scale 1
+ swaymsg output eDP-1 disable
swaymsg workspace number 1
fi;