From 6ef3ca17e51ddfa2267af1caad2cfd7b07974eec Mon Sep 17 00:00:00 2001 From: David Rios <david.rios.gomes@gmail.com> Date: Mon, 1 Jul 2019 11:10:01 -0300 Subject: [PATCH] Updated Fully functional sway desktop with GNOME integration under Debian Ubuntu (markdown) --- ...top-with-GNOME-integration-under-Debian-Ubuntu.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Fully-functional-sway-desktop-with-GNOME-integration-under-Debian-Ubuntu.md b/Fully-functional-sway-desktop-with-GNOME-integration-under-Debian-Ubuntu.md index d57fe45..de54704 100644 --- a/Fully-functional-sway-desktop-with-GNOME-integration-under-Debian-Ubuntu.md +++ b/Fully-functional-sway-desktop-with-GNOME-integration-under-Debian-Ubuntu.md @@ -166,6 +166,7 @@ bindsym $mod+Shift+e exec $fzf_launcher /usr/local/bin/sway-exit Now the default `$mod+Shift+e` key combination will show a nice exit menu with Logout, Sleep, Reboot and Shutdown options. + ## Taking screenshots For this we'll use [grim](https://github.com/emersion/grim) and [slurp](https://github.com/emersion/slurp). Let's install them first: @@ -194,4 +195,15 @@ Now to set sway key bindings. In the example below, the `PrtScn` key save a scre set $screenshot_file \"$HOME/Pictures/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png\" bindsym Print exec grim -s1 $screenshot_file bindsym Alt+Print exec (slurp | grim -g- -s1 $screenshot_file) +``` + +## Volume control with multimedia keys + +Put these keybindings on your Sway config file: + +``` +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ $(printf "%s\n" 100 $(($(pacmd dump-volumes | grep -m1 Sink | grep -Po '\d+(?=%)' | head -n1) + 3)) | sort -g | head -n1)% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -3% +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle ``` \ No newline at end of file