From fdadead44bf3f162b1e962349c2fae4b2158ae39 Mon Sep 17 00:00:00 2001 From: David Rios Date: Sat, 22 Jun 2019 18:14:53 -0300 Subject: [PATCH] Updated Fully functional sway desktop with GNOME integration under Debian Ubuntu (markdown) --- ...h-GNOME-integration-under-Debian-Ubuntu.md | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) 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 11ae2dc..64c692c 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 @@ -4,14 +4,14 @@ This page is intended to help you set up a fully-functional sway desktop environment integrated with GNOME under Debian 10/Ubuntu. Features that will be covered: -- GNOME integration, so that you can run GNOME apps and use GNOME settings to manage the network. +- Manual and automatic screen locking using `swayidle` and `swaylock` - Working notifications with `mako`. - Nice application launcher and exit menu using `fzf` and `kitty` - Taking of screenshots, optionally selecting a region, using `grim` and `slurp` -- Manual and automatic screen locking using `swayidle` and `swaylock` - Volume control with multimedia keys - Laptop screen brightness adjustment using `brightnessctl` and bound to keyboard keys - Nice status bar using `Waybar` +- GNOME integration, so that you can run GNOME apps and use GNOME settings to manage the network. These instruction were tested under Debian 10 (Buster), but should also work under Ubuntu with minimal modifications. @@ -156,4 +156,34 @@ with: 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. \ No newline at end of file +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: + +``` +sudo apt install libjpeg-dev + +cd ~/sway-src +git clone https://github.com/emersion/grim.git +cd grim +git checkout v1.2.0 +meson build +sudo ninja -C build install + +cd ~/sway-src +git clone https://github.com/emersion/slurp.git +cd slurp +git checkout v1.2.0 +meson build +sudo ninja -C build install +``` + +Now to set sway key bindings. In the example below, the `PrtScn` key save a screenshot for the whole desktop and `Alt+PrtScn` let you select a region to capture. Add them to the sway config: + +``` +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) +``` \ No newline at end of file