diff options
| -rw-r--r-- | KEYBINDS.md | 8 | ||||
| -rw-r--r-- | dot_config/sway/config | 12 | ||||
| -rw-r--r-- | dot_config/sway/executable_bt-toggle.sh | 16 | ||||
| -rw-r--r-- | meta/wayland.txt | 1 |
4 files changed, 37 insertions, 0 deletions
diff --git a/KEYBINDS.md b/KEYBINDS.md index 69ba8de..3970a49 100644 --- a/KEYBINDS.md +++ b/KEYBINDS.md @@ -312,6 +312,14 @@ Mod key: `Super` (Mod4). Only personal additions beyond sway defaults listed. | `XF86AudioPlay` | Play/pause | | `XF86AudioNext` | Next track | | `XF86AudioPrev` | Previous track | +| `XF86MonBrightnessUp` | Brightness +5% (brightnessctl) | +| `XF86MonBrightnessDown`| Brightness -5% (brightnessctl) | +| `XF86AudioMicMute` | Mic mute toggle | +| `XF86Bluetooth` | Bluetooth power toggle (bluetoothctl) | +| `XF86ScreenSaver` | Lock screen + pause media (same as Super+Shift+s)| +| `XF86Sleep` | Suspend system (systemctl suspend) | +| `XF86WLAN` | Toggle Wi-Fi (rfkill) | +| `XF86RFKill` | Toggle all radios (rfkill) | | `Print` | Region screenshot (grim+slurp) | | `Shift+Print` | Full screenshot (grim) | | `Super+Shift+s` | Lock screen + pause media | diff --git a/dot_config/sway/config b/dot_config/sway/config index f88875b..7f95a62 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -135,6 +135,18 @@ bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous +# Brightness +bindsym XF86MonBrightnessUp exec brightnessctl set +5% +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- + +# ThinkPad multimedia keys +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym XF86Bluetooth exec ~/.config/sway/bt-toggle.sh +bindsym XF86ScreenSaver exec "playerctl -a pause; swaylock -f -e -c 282828" +bindsym XF86Sleep exec systemctl suspend +bindsym XF86WLAN exec rfkill toggle wifi +bindsym XF86RFKill exec rfkill toggle all + # Screenshots bindsym Print exec sh -c 'grim -g "$(slurp)" - | tee ~/pics/screenshots/$(date +%Y-%m-%d-%H-%M-%S).png | wl-copy' bindsym Shift+Print exec sh -c 'grim - | tee ~/pics/screenshots/$(date +%Y-%m-%d-%H-%M-%S).png | wl-copy' diff --git a/dot_config/sway/executable_bt-toggle.sh b/dot_config/sway/executable_bt-toggle.sh new file mode 100644 index 0000000..95958f9 --- /dev/null +++ b/dot_config/sway/executable_bt-toggle.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# Toggle Bluetooth power via bluetoothctl. Uses notify-send's synchronous +# hint so repeated toggles replace the previous notification instead of +# stacking. +set -eu + +state=$(bluetoothctl show | awk '/Powered:/ {print $2}') +if [ "$state" = "yes" ]; then + bluetoothctl power off >/dev/null + notify-send -t 1500 -h string:x-canonical-private-synchronous:bt \ + 'Bluetooth' 'off' +else + bluetoothctl power on >/dev/null + notify-send -t 1500 -h string:x-canonical-private-synchronous:bt \ + 'Bluetooth' 'on' +fi diff --git a/meta/wayland.txt b/meta/wayland.txt index e451cbb..fa0f26f 100644 --- a/meta/wayland.txt +++ b/meta/wayland.txt @@ -42,6 +42,7 @@ zathura zathura-pdf-mupdf # Misc +brightnessctl libfido2 perl-file-mimeinfo qt5ct |
