aboutsummaryrefslogtreecommitdiffstats
path: root/.config/sway/config
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2021-11-24 21:37:17 +0100
committerDavid Runge <dave@sleepmap.de>2021-11-24 21:37:17 +0100
commit2b9d126c4789dc1d0341d94ef4e46bab9ee58e23 (patch)
treedde0078d68fa61c787c86ed50a57c4801dfca746 /.config/sway/config
parent9f201052ebbf4c80bc1b11d818cc255a6a48ccb1 (diff)
downloaddotfiles-2b9d126c4789dc1d0341d94ef4e46bab9ee58e23.tar.gz
dotfiles-2b9d126c4789dc1d0341d94ef4e46bab9ee58e23.tar.bz2
dotfiles-2b9d126c4789dc1d0341d94ef4e46bab9ee58e23.tar.xz
dotfiles-2b9d126c4789dc1d0341d94ef4e46bab9ee58e23.zip
sway: Adapt config for systemd integration
.config/sway/config: Set notify_mpd and set_volume commands specifically. Add keyboard input configuration. Add gaps. Allow multimedia keys also when screen is locked. Remove status bar (waybar is started via systemd user unit). Remove all execs (the are all started via systemd user units). Include per-host configuration from ~/.config/sway/config.d/ to not clutter the main configuration directory. Always start sway-session.target when starting sway.
Diffstat (limited to '.config/sway/config')
-rw-r--r--.config/sway/config46
1 files changed, 22 insertions, 24 deletions
diff --git a/.config/sway/config b/.config/sway/config
index 954ebba..c788a27 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -19,6 +19,8 @@ set $term alacritty
set $menu wofi -G -S drun
set $select_screenshot grim -g "$(slurp)" ~/Downloads/screenshot-"$(date +'%Y-%m-%d_%H-%M-%S')".png
set $screenshot grim ~/Downloads/screenshot-"$(date +'%Y-%m-%d_%H-%M-%S')".png
+set $notify_mpd ~/bin/notify_mpd
+set $set_volume ~/bin/set_volume
# lock
set $lock setsid -f waylock
@@ -54,12 +56,23 @@ default_border pixel 2
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
+
+input type:keyboard {
+ xkb_layout us,de
+ xkb_model dellusbmm
+ xkb_options grp:alt_shift_toggle,caps:escape
+}
+
input type:touchpad {
dwt enabled
tap enabled
tap_button_map lrm
}
+# gaps
+gaps inner 5
+smart_gaps on
+
### Key bindings
#
# Basics:
@@ -97,13 +110,13 @@ input type:touchpad {
bindsym XF86MonBrightnessDown exec $brightness_down
bindsym XF86MonBrightnessUp exec $brightness_up
# sound
- bindsym XF86AudioRaiseVolume exec set_volume increase
- bindsym XF86AudioLowerVolume exec set_volume decrease
- bindsym XF86AudioMute exec set_volume toggle
- bindsym XF86AudioPrev exec notify_mpd prev
- bindsym XF86AudioNext exec notify_mpd next
- bindsym XF86AudioPlay exec notify_mpd toggle
- bindsym XF86AudioStop exec notify_mpd stop
+ bindsym --locked XF86AudioRaiseVolume exec $set_volume increase
+ bindsym --locked XF86AudioLowerVolume exec $set_volume decrease
+ bindsym --locked XF86AudioMute exec $set_volume toggle
+ bindsym --locked XF86AudioPrev exec $notify_mpd prev
+ bindsym --locked XF86AudioNext exec $notify_mpd next
+ bindsym --locked XF86AudioPlay exec $notify_mpd toggle
+ bindsym --locked XF86AudioStop exec $notify_mpd stop
#
# Moving around:
@@ -250,21 +263,6 @@ for_window [class="MediaElch"] move container to workspace 6
for_window [app_id="ghb"] move container to workspace 7
for_window [app_id="shotwell"] move container to workspace 8
-# Status Bar:
-#
-# Read `man 5 sway-bar` for more information about this section.
-bar {
- swaybar_command waybar
-}
-
-# Execs
-exec [ -x /usr/bin/gammastep ] && /usr/bin/gammastep
-exec [ -x /usr/bin/lxpolkit ] && /usr/bin/lxpolkit
-exec [ -x /usr/bin/nextcloud ] && /usr/bin/nextcloud
-exec [ -x /usr/bin/swayidle ] && [ -x /usr/bin/waylock ] && swayidle -w \
- timeout 300 'setsid -f waylock' \
- timeout 600 'swaymsg "output * dpms off"' \
- resume 'swaymsg "output * dpms on"' \
- before-sleep 'setsid -f waylock'
-
+include "~/.config/sway/config.d/$(hostname)"
include /etc/sway/config.d/*
+exec_always "systemctl --user start sway-session.target"