Updated Fully functional sway desktop with GNOME integration under Debian Ubuntu (markdown)

David Rios 2019-06-22 18:14:53 -03:00
parent 8b7490a09e
commit fdadead44b

@ -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.
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)
```