aboutsummaryrefslogtreecommitdiff
path: root/config/sway
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-01-20 15:40:35 +0100
committerKarel Kočí <cynerd@email.cz>2022-01-20 15:40:35 +0100
commitaa974af1819b418500a8b94a531086b170972eac (patch)
tree00e3d83e5a8a8d16c36d9086ee59e316d673a57d /config/sway
parent8fae57dbeab4e49ca2ef8e0806ef9a25789d5157 (diff)
downloadmyconfigs-aa974af1819b418500a8b94a531086b170972eac.tar.gz
myconfigs-aa974af1819b418500a8b94a531086b170972eac.tar.bz2
myconfigs-aa974af1819b418500a8b94a531086b170972eac.zip
sway: split config file
Diffstat (limited to 'config/sway')
-rw-r--r--config/sway/bar6
-rw-r--r--config/sway/bindsym-launch28
-rw-r--r--config/sway/bindsym-layout13
-rw-r--r--config/sway/bindsym-media27
-rw-r--r--config/sway/bindsym-navigation91
-rw-r--r--config/sway/bindsym-notifications5
-rw-r--r--config/sway/bindsym-system13
-rw-r--r--config/sway/config246
-rw-r--r--config/sway/daemons10
-rw-r--r--config/sway/gsettings8
-rw-r--r--config/sway/inputs17
11 files changed, 230 insertions, 234 deletions
diff --git a/config/sway/bar b/config/sway/bar
new file mode 100644
index 0000000..c09e832
--- /dev/null
+++ b/config/sway/bar
@@ -0,0 +1,6 @@
+# vim: ft=swayconfig
+bar {
+ status_command i3blocks
+ position top
+ font pango:DejaVu Sans Mono 8
+}
diff --git a/config/sway/bindsym-launch b/config/sway/bindsym-launch
new file mode 100644
index 0000000..fe69990
--- /dev/null
+++ b/config/sway/bindsym-launch
@@ -0,0 +1,28 @@
+# vim: ft=swayconfig
+# Start a terminal
+bindsym $mod+Return exec alacritty
+# Start Firefox
+bindsym $mod+Shift+Return exec firefox
+
+# start a program
+bindsym $mod+d exec --no-startup-id wofi -Imi -S drun
+
+
+# Top
+bindsym $mod+t exec alacritty -e htop
+bindsym $mod+Shift+t exec alacritty -e sudo powertop
+# Passwords
+bindsym $mod+Shift+w exec --no-startup-id ~/.config/sway/scripts/pass
+# Calendar
+bindsym $mod+c exec alacritty -t "Calendar" -e ikhal
+# Notes
+bindsym $mod+Shift+n exec --no-startup-id ~/.config/sway/scripts/notes
+for_window [ title="notes-terminal-window" ] floating enable sticky enable
+# Mail client
+bindsym $mod+m exec astroid
+
+
+# Run and configure synchronization
+bindsym $mod+i exec alacritty -t "Synchronization" -e allsync
+bindsym $mod+Shift+i exec --no-startup-id allsync toggle
+for_window [ title="Synchronization" ] floating enable
diff --git a/config/sway/bindsym-layout b/config/sway/bindsym-layout
new file mode 100644
index 0000000..ef14ead
--- /dev/null
+++ b/config/sway/bindsym-layout
@@ -0,0 +1,13 @@
+# vim: ft=swayconfig
+set $mode_layout Set keyboard layout (u)s or (c)z
+mode "$mode_layout" {
+ bindsym u input type:keyboard xkb_layout us, mode "default"
+ bindsym c input type:keyboard xkb_layout cz_qwerty, mode "default"
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+}
+bindsym --to-code $mod+slash mode "$mode_layout"
+
+# Type emoji
+bindsym --to-code $mod+period exec rofimoji --skin-tone neutral
+bindsym --to-code $mod+Shift+period exec rofimoji --skin-tone neutral --action copy
diff --git a/config/sway/bindsym-media b/config/sway/bindsym-media
new file mode 100644
index 0000000..5b75934
--- /dev/null
+++ b/config/sway/bindsym-media
@@ -0,0 +1,27 @@
+# vim: ft=swayconfig
+# Audio control
+bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && pkill -RTMIN+10 i3blocks
+bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && pkill -RTMIN+10 i3blocks
+bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && pkill -RTMIN+10 i3blocks
+
+# Run and configure pulsemixer
+bindsym $mod+p exec alacritty -t "Pulsemixer" -e pulsemixer
+for_window [ title="Pulsemixer" ] floating enable;
+for_window [ title="Pulsemixer" ] resize set 50 ppt 50 ppt
+for_window [ title="Pulsemixer" ] move position center
+
+
+# Screen brightness controls
+bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 20
+bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 20
+
+# Media player controls
+bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks
+bindsym XF86AudioStop exec --no-startup-id mpc stop && pkill -RTMIN+12 i3blocks
+bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+12 i3blocks
+bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+12 i3blocks
+# Run media player control app
+bindsym $mod+Shift+m exec alacritty -t "Music player daemon client" -e ncmpcpp
+for_window [ title="Music player daemon client" ] floating enable;
+for_window [ title="Music player daemon client" ] resize set 70 ppt 70 ppt
+for_window [ title="Music player daemon client" ] move position center
diff --git a/config/sway/bindsym-navigation b/config/sway/bindsym-navigation
new file mode 100644
index 0000000..a1356c0
--- /dev/null
+++ b/config/sway/bindsym-navigation
@@ -0,0 +1,91 @@
+# vim: ft=swayconfig
+
+# Change focus
+bindsym $mod+h focus left
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l focus right
+
+# Move focused window
+bindsym $mod+Shift+h move left
+bindsym $mod+Shift+j move down
+bindsym $mod+Shift+k move up
+bindsym $mod+Shift+l move right
+
+# Split in horizontal orientation
+bindsym $mod+g split h
+# Split in vertical orientation
+bindsym $mod+v split v
+
+# Enter fullscreen mode for the focused container
+bindsym $mod+f fullscreen toggle
+
+# Scratchpad
+bindsym $mod+Tab scratchpad show
+bindsym $mod+Shift+Tab move scratchpad
+
+# Change container layout (stacked, tabbed, toggle split)
+bindsym $mod+s layout stacking
+bindsym $mod+w layout tabbed
+bindsym $mod+e layout toggle split
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+# change focus between tiling / floating windows
+bindsym $mod+space focus mode_toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+# focus the child container
+bindsym $mod+Shift+a focus child
+
+# Output moving
+bindsym $mod+x move container to output right
+bindsym $mod+z move container to output left
+bindsym $mod+Shift+x move workspace to output right
+bindsym $mod+Shift+z move workspace to output left
+
+# switch to workspace
+bindsym --to-code $mod+1 workspace 1
+bindsym --to-code $mod+2 workspace 2
+bindsym --to-code $mod+3 workspace 3
+bindsym --to-code $mod+4 workspace 4
+bindsym --to-code $mod+5 workspace 5
+bindsym --to-code $mod+6 workspace 6
+bindsym --to-code $mod+7 workspace 7
+bindsym --to-code $mod+8 workspace 8
+bindsym --to-code $mod+9 workspace 9
+bindsym --to-code $mod+0 workspace 10
+bindsym --to-code $mod+grave workspace web
+bindsym --to-code $mod+minus workspace t
+
+# move focused container to workspace
+bindsym --to-code $mod+Shift+1 move container to workspace 1
+bindsym --to-code $mod+Shift+2 move container to workspace 2
+bindsym --to-code $mod+Shift+3 move container to workspace 3
+bindsym --to-code $mod+Shift+4 move container to workspace 4
+bindsym --to-code $mod+Shift+5 move container to workspace 5
+bindsym --to-code $mod+Shift+6 move container to workspace 6
+bindsym --to-code $mod+Shift+7 move container to workspace 7
+bindsym --to-code $mod+Shift+8 move container to workspace 8
+bindsym --to-code $mod+Shift+9 move container to workspace 9
+bindsym --to-code $mod+Shift+0 move container to workspace 10
+bindsym --to-code $mod+Shift+grave move container to workspace web
+bindsym --to-code $mod+Shift+minus move container to workspace t
+
+# Resize window
+mode "resize" {
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym Shift+h resize shrink width 50 px or 50 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym Shift+j resize grow height 50 px or 50 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym Shift+k resize shrink height 50 px or 50 ppt
+ bindsym l resize grow width 10 px or 10 ppt
+ bindsym Shift+l resize grow width 50 px or 50 ppt
+
+ # back to normal: Enter or Escape
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+}
+bindsym $mod+r mode "resize"
diff --git a/config/sway/bindsym-notifications b/config/sway/bindsym-notifications
new file mode 100644
index 0000000..76f2207
--- /dev/null
+++ b/config/sway/bindsym-notifications
@@ -0,0 +1,5 @@
+# vim: ft=swayconfig
+bindsym --to-code ctrl+space exec --no-startup-id dunstctl close
+bindsym --to-code ctrl+Shift+space exec --no-startup-id dunstctl close-all
+bindsym --to-code ctrl+grave exec --no-startup-id dunstctl history-pop
+bindsym --to-code ctrl+Shift+grave exec --no-startup-id dunstctl context
diff --git a/config/sway/bindsym-system b/config/sway/bindsym-system
new file mode 100644
index 0000000..1c8eea4
--- /dev/null
+++ b/config/sway/bindsym-system
@@ -0,0 +1,13 @@
+# vim: ft=swayconfig
+set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
+mode "$mode_system" {
+ bindsym l exec --no-startup-id loginctl lock-session $XDG_SESSION_ID, mode "default"
+ bindsym e exec --no-startup-id swaymsg exit, mode "default"
+ bindsym s exec --no-startup-id loginctl suspend, mode "default"
+ bindsym r exec --no-startup-id loginctl reboot, mode "default"
+ bindsym Shift+s exec --no-startup-id loginctl poweroff, mode "default"
+
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+}
+bindsym $mod+Shift+q mode "$mode_system"
diff --git a/config/sway/config b/config/sway/config
index 20a02a9..9008042 100644
--- a/config/sway/config
+++ b/config/sway/config
@@ -1,27 +1,12 @@
-# Sway config
+# vim: ft=swayconfig
exec --no-startup-id dbus-update-activation-environment --all
exec --no-startup-id gentoo-pipewire-launcher
exec --no-startup-id myswaylock
exec --no-startup-id swaybackground
-##################################################################################
-
-input type:keyboard {
- xkb_layout 'us,cz_qwerty'
- xkb_options 'grp:alt_shift_toggle,caps:escape'
- xkb_numlock enabled
-}
-
-input type:touchpad {
- tap enabled
-}
-
-seat '*' {
- xcursor_theme Adwaita
- hide_cursor 10000
- hide_cursor when-typing disable
-}
-
-##################################################################################
+################################################################################
+include gsettings
+include inputs
+################################################################################
smart_borders on
default_border normal
@@ -29,230 +14,23 @@ mouse_warping container
font pango:DejaVu Sans Mono 8
titlebar_padding 3 1
-bar {
- status_command i3blocks
- position top
- font pango:DejaVu Sans Mono 8
-}
-
-##################################################################################
+workspace_layout tabbed
+################################################################################
set $mod Mod4
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
tiling_drag disable
-# kill focused window
+# Kill focused window
bindsym $mod+q kill
-
-# bar toggle, hide or show
+# Bar toggle
bindsym $mod+b bar mode toggle
-
-# change focus
-bindsym $mod+h focus left
-bindsym $mod+j focus down
-bindsym $mod+k focus up
-bindsym $mod+l focus right
-
-# move focused window
-bindsym $mod+Shift+h move left
-bindsym $mod+Shift+j move down
-bindsym $mod+Shift+k move up
-bindsym $mod+Shift+l move right
-
-# split in horizontal orientation
-bindsym $mod+g split h
-# split in vertical orientation
-bindsym $mod+v split v
-
-# enter fullscreen mode for the focused container
-bindsym $mod+f fullscreen toggle
-
-# Scratchpad
-bindsym $mod+Tab scratchpad show
-bindsym $mod+Shift+Tab move scratchpad
-
-workspace_layout tabbed
-# change container layout (stacked, tabbed, toggle split)
-bindsym $mod+s layout stacking
-bindsym $mod+w layout tabbed
-bindsym $mod+e layout toggle split
-
-# toggle tiling / floating
-bindsym $mod+Shift+space floating toggle
-# change focus between tiling / floating windows
-bindsym $mod+space focus mode_toggle
-
-# focus the parent container
-bindsym $mod+a focus parent
-# focus the child container
-bindsym $mod+Shift+a focus child
-
-# Output moving
-bindsym $mod+x move container to output right
-bindsym $mod+z move container to output left
-bindsym $mod+Shift+x move workspace to output right
-bindsym $mod+Shift+z move workspace to output left
-
-# switch to workspace
-bindsym --to-code $mod+1 workspace 1
-bindsym --to-code $mod+2 workspace 2
-bindsym --to-code $mod+3 workspace 3
-bindsym --to-code $mod+4 workspace 4
-bindsym --to-code $mod+5 workspace 5
-bindsym --to-code $mod+6 workspace 6
-bindsym --to-code $mod+7 workspace 7
-bindsym --to-code $mod+8 workspace 8
-bindsym --to-code $mod+9 workspace 9
-bindsym --to-code $mod+0 workspace 10
-bindsym --to-code $mod+grave workspace web
-bindsym --to-code $mod+minus workspace t
-
-# move focused container to workspace
-bindsym --to-code $mod+Shift+1 move container to workspace 1
-bindsym --to-code $mod+Shift+2 move container to workspace 2
-bindsym --to-code $mod+Shift+3 move container to workspace 3
-bindsym --to-code $mod+Shift+4 move container to workspace 4
-bindsym --to-code $mod+Shift+5 move container to workspace 5
-bindsym --to-code $mod+Shift+6 move container to workspace 6
-bindsym --to-code $mod+Shift+7 move container to workspace 7
-bindsym --to-code $mod+Shift+8 move container to workspace 8
-bindsym --to-code $mod+Shift+9 move container to workspace 9
-bindsym --to-code $mod+Shift+0 move container to workspace 10
-bindsym --to-code $mod+Shift+grave move container to workspace web
-bindsym --to-code $mod+Shift+minus move container to workspace t
-
# reload the configuration file
bindsym $mod+Shift+r reload
-# Notifications
-bindsym --to-code ctrl+space exec --no-startup-id dunstctl close
-bindsym --to-code ctrl+Shift+space exec --no-startup-id dunstctl close-all
-bindsym --to-code ctrl+grave exec --no-startup-id dunstctl history-pop
-bindsym --to-code ctrl+Shift+grave exec --no-startup-id dunstctl context
-
-set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
-mode "$mode_system" {
- bindsym l exec --no-startup-id loginctl lock-session $XDG_SESSION_ID, mode "default"
- bindsym e exec --no-startup-id swaymsg exit, mode "default"
- bindsym s exec --no-startup-id loginctl suspend, mode "default"
- bindsym r exec --no-startup-id loginctl reboot, mode "default"
- bindsym Shift+s exec --no-startup-id loginctl poweroff, mode "default"
-
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
-bindsym $mod+Shift+q mode "$mode_system"
-
-set $xshot Xshot: (w)indow or (d)desktop
-mode "$xshot" {
- # Note: xshot window is for some reason broken.
- # It won't run when not spawned in terminal
- bindsym --release w exec xshot window, mode "default"
- bindsym --release d exec --no-startup-id xshot desktop, mode "default"
-
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
-bindsym $mod+Shift+s mode "$xshot"
-
-# resize window
-mode "resize" {
- bindsym h resize shrink width 10 px or 10 ppt
- bindsym Shift+h resize shrink width 50 px or 50 ppt
- bindsym j resize grow height 10 px or 10 ppt
- bindsym Shift+j resize grow height 50 px or 50 ppt
- bindsym k resize shrink height 10 px or 10 ppt
- bindsym Shift+k resize shrink height 50 px or 50 ppt
- bindsym l resize grow width 10 px or 10 ppt
- bindsym Shift+l resize grow width 50 px or 50 ppt
-
- # back to normal: Enter or Escape
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
-bindsym $mod+r mode "resize"
-
-set $mode_layout Set keyboard layout (u)s or (c)z
-mode "$mode_layout" {
- bindsym u input type:keyboard xkb_layout us, mode "default"
- bindsym c input type:keyboard xkb_layout cz_qwerty, mode "default"
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
-bindsym --to-code $mod+slash mode "$mode_layout"
-
-##################################################################################
-# Start a terminal
-bindsym $mod+Return exec alacritty
-# Start Firefox
-bindsym $mod+Shift+Return exec firefox
-
-# start a program
-bindsym $mod+d exec --no-startup-id wofi -Imi -S drun
-
-# Type emoji
-bindsym --to-code $mod+period exec rofimoji --skin-tone neutral
-bindsym --to-code $mod+Shift+period exec rofimoji --skin-tone neutral --action copy
-
-# Top
-bindsym $mod+t exec alacritty -e htop
-bindsym $mod+Shift+t exec alacritty -e sudo powertop
-# Passwords
-bindsym $mod+Shift+w exec --no-startup-id ~/.config/sway/scripts/pass
-# Calendar
-bindsym $mod+c exec alacritty -t "Calendar" -e ikhal
-# Notes
-bindsym $mod+Shift+n exec --no-startup-id ~/.config/sway/scripts/notes
-for_window [ title="notes-terminal-window" ] floating enable sticky enable
-# Mail client
-bindsym $mod+m exec astroid
-
-# Audio control
-bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && pkill -RTMIN+10 i3blocks
-bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && pkill -RTMIN+10 i3blocks
-bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && pkill -RTMIN+10 i3blocks
-# Run and configure pulsemixer
-bindsym $mod+p exec alacritty -t "Pulsemixer" -e pulsemixer
-for_window [ title="Pulsemixer" ] floating enable;
-for_window [ title="Pulsemixer" ] resize set 50 ppt 50 ppt
-for_window [ title="Pulsemixer" ] move position center
-# Run and configure synchronization
-bindsym $mod+i exec alacritty -t "Synchronization" -e allsync
-bindsym $mod+Shift+i exec --no-startup-id allsync toggle
-for_window [ title="Synchronization" ] floating enable
-
-# Screen brightness controls
-bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 20
-bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 20
-
-# Media player controls
-bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks
-bindsym XF86AudioStop exec --no-startup-id mpc stop && pkill -RTMIN+12 i3blocks
-bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+12 i3blocks
-bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+12 i3blocks
-# Run media player control app
-bindsym $mod+Shift+m exec alacritty -t "Music player daemon client" -e ncmpcpp
-for_window [ title="Music player daemon client" ] floating enable;
-for_window [ title="Music player daemon client" ] resize set 70 ppt 70 ppt
-for_window [ title="Music player daemon client" ] move position center
-
-# Set IM to scratchpad
-for_window [class="Ferdi"] move scratchpad
-for_window [class="Signal"] move scratchpad
-# On-screen keyboard Florence
-for_window [class="Florence"] floating enable
-
-##################################################################################
-# Start various applications
-
-# Start daemons
-exec --no-startup-id kanshi
-exec --no-startup-id swayidle
-exec --no-startup-id dunst
-exec --no-startup-id /usr/lib64/libexec/kdeconnectd
+include bindsym-*
-# Start Ferdi
-exec ferdi
-exec signal-desktop
+################################################################################
+include daemons
diff --git a/config/sway/daemons b/config/sway/daemons
new file mode 100644
index 0000000..29b879f
--- /dev/null
+++ b/config/sway/daemons
@@ -0,0 +1,10 @@
+# vim: ft=swayconfig
+exec --no-startup-id {
+ kanshi
+ swayidle
+ dunst
+ /usr/lib64/libexec/kdeconnectd
+}
+
+for_window [class="Ferdi"] move scratchpad
+exec ferdi
diff --git a/config/sway/gsettings b/config/sway/gsettings
new file mode 100644
index 0000000..cae6b84
--- /dev/null
+++ b/config/sway/gsettings
@@ -0,0 +1,8 @@
+# vim: ft=swayconfig
+exec_always {
+ gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
+ gsettings set org.gnome.desktop.interface cursor-theme 'Adwaita'
+ gsettings set org.gnome.desktop.interface icon-theme 'Faenza'
+ gsettings set org.gnome.desktop.interface font-name 'DejaVu Sans 8'
+ gsettings set org.gnome.desktop.interface gtk-key-theme 'Emacs'
+}
diff --git a/config/sway/inputs b/config/sway/inputs
new file mode 100644
index 0000000..4bfd203
--- /dev/null
+++ b/config/sway/inputs
@@ -0,0 +1,17 @@
+# vim: ft=swayconfig
+
+input type:keyboard {
+ xkb_layout 'us,cz_qwerty'
+ xkb_options 'grp:alt_shift_toggle,caps:escape'
+ xkb_numlock enabled
+}
+
+input type:touchpad {
+ tap enabled
+}
+
+seat '*' {
+ xcursor_theme Adwaita
+ hide_cursor 10000
+ hide_cursor when-typing disable
+}