Sway : Add shortcuts to path.

This commit is contained in:
Dmitry Voronin 2024-03-29 04:34:01 +03:00
parent 79ac8a98bb
commit b5556b92cf
10 changed files with 41 additions and 17 deletions

View file

@ -40,8 +40,13 @@
];
};
environment.variables = {
environment = {
variables = {
FOOT_CONFIG = ./foot/Foot.ini;
SWAY_CONFIG = ./sway/module;
};
pathsToLink = [
builtins.toString(./sway/bin)
];
};
}

3
module/sway/bin/bluetooth Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
blueman-manager

3
module/sway/bin/bye Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
poweroff

3
module/sway/bin/network Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
nm-connection-editor

3
module/sway/bin/slp Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
systemctl suspend

3
module/sway/bin/sound Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
pavucontrol

View file

@ -1,3 +0,0 @@
# Brightness
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10

View file

@ -1,11 +0,0 @@
# Adjust volume.
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'
bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
# Open sound control. # NOTE: Get id with `swaymsg -t get_tree`.
for_window [app_id="pavucontrol"] {
move scratchpad
scratchpad show
}
bindsym $mod+p exec 'pavucontrol'

View file

@ -29,3 +29,15 @@ bindsym $mod+b exec 'blueman-manager'
# NetworkManager.
bindsym $mod+n exec 'nm-connection-editor'
# Brightness
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10
# Adjust volume.
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'
bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
# Open sound control. # NOTE: Get id with `swaymsg -t get_tree`.
bindsym $mod+p exec 'pavucontrol'

View file

@ -24,3 +24,9 @@ for_window [app_id=".blueman-manager-wrapped"] {
move scratchpad
scratchpad show
}
# Sound.
for_window [app_id="pavucontrol"] {
move scratchpad
scratchpad show
}