2019-04-27 16:35:17 +02:00
set $mod Mod4
floating_modifier $mod
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
2022-05-28 14:41:33 +02:00
set $term "foot"
2019-04-27 16:35:17 +02:00
# keyboard layout
input * {
2019-12-23 18:23:22 +01:00
xkb_layout "gb,de"
2019-12-24 13:55:59 +01:00
xkb_variant altgr-intl
xkb_options "caps:escape,grp:win_space_toggle,compose:ralt"
2019-04-27 16:35:17 +02:00
xkb_numlock enabled
}
2019-05-01 23:55:39 +02:00
# hide cursor after 10 sec
2019-04-27 16:35:17 +02:00
seat * hide_cursor 10000
# background
2019-10-30 11:45:56 +01:00
output * bg #0C0C0D solid_color
2019-04-27 16:35:17 +02:00
#output * bg wallpaper.png fit
2021-02-16 17:28:25 +01:00
# source env-vars
exec systemctl --user import-environment
2019-04-27 16:35:17 +02:00
# startup programs
2021-02-16 17:28:25 +01:00
exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1
2019-04-27 16:35:17 +02:00
exec gnome-keyring-daemon --start --components secrets
2020-02-25 21:54:42 +01:00
exec swayidle -w \
timeout 285 'notify-send -a lockscreen -c lock-warn -u critical -t 14900 -i system-lock-screen "Locking Screen" "Will Lock Screen in 15s"' \
timeout 300 '~/.dotfiles/sway/lock.sh' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '~/.dotfiles/sway/lock.sh'
exec mako
2020-11-16 18:20:09 +01:00
exec syncthing -no-browser
2020-11-08 18:24:28 +01:00
#exec nm-applet --indicator
2020-11-24 23:56:12 +01:00
exec blueman-applet
2019-04-27 16:35:17 +02:00
exec telegram-desktop -startintray
2020-12-03 19:08:41 +01:00
exec gammastep-indicator
2021-01-01 19:13:07 +01:00
exec nextcloud --background
2020-04-27 11:28:28 +02:00
exec com.gitlab.newsflash
2022-01-17 11:54:50 +01:00
exec element-desktop --hidden
2019-04-27 16:35:17 +02:00
2019-05-01 23:55:39 +02:00
# mute microfone
exec amixer set Capture nocap
2019-06-04 13:04:11 +02:00
# prevent locking when fullscreen
for_window [app_id="firefox"] inhibit_idle fullscreen
2020-12-23 00:42:44 +01:00
for_window [class="Chromium-browser"] inhibit_idle fullscreen
2021-04-07 11:03:12 +02:00
for_window [class="vlc"] inhibit_idle fullscreen
2019-06-04 13:04:11 +02:00
for_window [app_id="evince"] inhibit_idle fullscreen
2022-02-17 00:36:26 +01:00
for_window [app_id="mpv"] inhibit_idle fullscreen
2021-04-07 11:03:12 +02:00
for_window [class="Skype"] inhibit_idle fullscreen
2021-05-06 20:51:23 +02:00
for_window [class="discord"] inhibit_idle fullscreen
2019-06-04 13:04:11 +02:00
2019-04-27 16:35:17 +02:00
# font
2019-05-15 00:04:04 +02:00
font pango:Fira Sans Mono 12
2019-04-27 16:35:17 +02:00
# default floating
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [instance="update_installer"] floating enable
# custom floating
2019-06-04 13:05:03 +02:00
for_window [app_id="firefox" title="About Mozilla Firefox"] floating enable
2021-01-17 16:42:43 +01:00
for_window [app_id="firefox" title="Picture-in-Picture"] floating enable, sticky enable
2020-11-23 11:55:10 +01:00
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] floating enable
2019-06-04 13:05:03 +02:00
for_window [app_id="firefox-developer-edition" title="About Firefox Developer Edition"] floating enable
2019-07-27 13:14:32 +02:00
for_window [app_id="gnome-calculator"] floating enable
2019-11-21 22:46:59 +01:00
for_window [app_id="org.gnome.NautilusPreviewer"] floating enable
2022-07-31 15:58:19 +02:00
for_window [app_id="com.nextcloud.desktopclient.nextcloud"] floating enable
2019-04-27 16:35:17 +02:00
# Stick windows to workspaces
2022-12-25 12:01:02 +01:00
assign [app_id="com.gitlab.newsflash"] 8
2021-02-27 21:59:24 +01:00
assign [app_id="thunderbird"] 9
2019-04-27 16:35:17 +02:00
assign [app_id="evolution"] 9
assign [app_id="rhythmbox"] 10
2020-11-25 16:08:47 +01:00
assign [app_id="lollypop"] 10
2019-04-27 16:35:17 +02:00
hide_edge_borders both
focus_follows_mouse no
# to switch workspace-tabs
bindsym $mod+Tab workspace next
bindsym Shift+$mod+Tab workspace prev
2019-06-26 19:39:45 +02:00
bindsym $mod+m exec . ~/.profile.d/90-keychain.sh && keepassxc
2021-06-09 22:23:09 +02:00
bindsym $mod+e exec sublime
2019-04-27 16:35:17 +02:00
bindsym $mod+w exec firefox
2020-04-27 11:28:28 +02:00
bindsym $mod+u exec com.gitlab.newsflash
2019-04-27 16:35:17 +02:00
2020-02-25 21:54:42 +01:00
# mako
2020-02-23 17:40:28 +01:00
bindsym $mod+dead_circumflex exec makoctl dismiss
bindsym $mod+Shift+dead_circumflex exec makoctl dismiss --all
bindsym $mod+grave exec makoctl dismiss
bindsym $mod+Shift+grave exec makoctl dismiss --all
bindsym $mod+minus exec makoctl list
bindsym $mod+plus exec makoctl invoke
2019-11-17 18:11:43 +01:00
2019-04-27 16:35:17 +02:00
# to prevent gnome-help
bindsym F1 exec :
2019-07-27 14:31:52 +02:00
# script shortcuts
set $keyboard ~/.local/bin/keyboard
bindsym $mod+F1 exec $keyboard-f1
bindsym $mod+Shift+F1 exec $keyboard-shift-f1
bindsym $mod+F2 exec $keyboard-f2
bindsym $mod+Shift+F2 exec $keyboard-shift-f2
bindsym $mod+F3 exec $keyboard-f3
bindsym $mod+Shift+F3 exec $keyboard-shift-f3
bindsym $mod+F4 exec $keyboard-f4
bindsym $mod+Shift+F4 exec $keyboard-shift-f4
2019-04-27 16:35:17 +02:00
# Screenshot
2019-11-16 14:39:46 +01:00
bindsym Print exec grim ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')
bindsym $mod+Print exec slurp | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')
bindsym $mod+Shift+Print exec swaymsg -t get_tree | jq -r '.. | (.nodes? // empty , .floating_nodes? // empty)[] | select(.focused) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')
2019-04-27 16:35:17 +02:00
# forward an backward at arrow-keys
#bindsym --release XF86Back exec
#bindsym --release XF86Forward exec
# Sreen brightness controls
2020-12-16 20:50:08 +01:00
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
2019-04-27 16:35:17 +02:00
# Pulse Audio controls
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
2022-06-23 23:28:49 +02:00
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
2019-04-27 16:35:17 +02:00
# Microphone
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
2022-06-23 23:28:49 +02:00
bindsym --locked $mod+XF86AudioRaiseVolume exec pactl set-source-volume @DEFAULT_SOURCE@ +2%
bindsym --locked $mod+XF86AudioLowerVolume exec pactl set-source-volume @DEFAULT_SOURCE@ -2%
2019-04-27 16:35:17 +02:00
# Media player controls
2020-09-09 14:29:09 +02:00
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioPause exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym --locked XF86AudioStop exec playerctl stop
2019-04-27 16:35:17 +02:00
2020-12-26 18:55:05 +01:00
# show helper for display-management
bindsym XF86Display exec wdisplays
2021-06-07 19:40:57 +02:00
#bindsym XF86NotificationCenter exec playerctl previous
bindcode 452 exec playerctl previous
#bindsym XF86PickupPhone exec playerctl play-pause
bindcode 453 exec playerctl play-pause
#bindsym XF86HangupPhone exec playerctl next
bindcode 454 exec playerctl next
2020-12-26 18:55:05 +01:00
2019-04-27 16:35:17 +02:00
# main commands
bindsym $mod+Shift+c reload
2020-12-23 00:41:56 +01:00
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
2019-04-27 16:35:17 +02:00
# start a terminal
bindsym $mod+Return exec $term
# screensaver
bindsym $mod+z exec ~/.dotfiles/sway/lock.sh
bindsym $mod+y exec ~/.dotfiles/sway/lock.sh
2019-05-01 23:35:01 +02:00
bindsym Scroll_Lock exec ~/.dotfiles/sway/lock.sh
2019-04-27 16:35:17 +02:00
# start dmenu (a program launcher)
2022-02-22 23:17:20 +01:00
set $menu wofi --insensitive --show drun | sed s/%[a-zA-Z]// | xargs swaymsg exec --
bindsym $mod+d exec $menu
2020-02-23 17:53:28 +01:00
bindsym $mod+Shift+d exec ~/.dotfiles/wofi/system.sh
2022-02-22 23:17:20 +01:00
bindsym Alt+Space exec $menu
2019-04-27 16:35:17 +02:00
2019-06-08 12:46:10 +02:00
# gtk3
set $gnome-schema org.gnome.desktop.interface
exec_always {
2020-09-24 21:43:31 +02:00
gsettings set $gnome-schema gtk-theme 'Arc-Dark'
2019-06-08 12:46:10 +02:00
gsettings set $gnome-schema icon-theme 'Numix-Circle'
gsettings set $gnome-schema cursor-theme 'Adwaita'
2022-12-13 21:00:00 +01:00
gsettings set $gnome-schema color-scheme 'prefer-dark'
2019-06-08 12:46:10 +02:00
}
2019-04-27 16:35:17 +02:00
# kill focused window
bindsym $mod+Shift+q kill
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
bindsym $mod+g fullscreen global
# change layouts
bindsym $mod+b split h
bindsym $mod+v split v
# toggle tiling / floating
2021-01-01 19:14:29 +01:00
bindsym $mod+BackSpace floating toggle
2019-04-27 16:35:17 +02:00
2019-05-03 23:07:04 +02:00
bindsym Alt+Left move workspace to output left
bindsym Alt+Right move workspace to output right
bindsym Alt+Up move workspace to output up
bindsym Alt+Down move workspace to output down
2019-04-27 16:35:17 +02:00
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# move windows to workspace and switch to it
bindsym Ctrl+1 move container to workspace 1; workspace 1
bindsym Ctrl+2 move container to workspace 2; workspace 2
bindsym Ctrl+3 move container to workspace 3; workspace 3
bindsym Ctrl+4 move container to workspace 4; workspace 4
bindsym Ctrl+5 move container to workspace 5; workspace 5
bindsym Ctrl+6 move container to workspace 6; workspace 6
bindsym Ctrl+7 move container to workspace 7; workspace 7
bindsym Ctrl+8 move container to workspace 8; workspace 8
bindsym Ctrl+9 move container to workspace 9; workspace 9
# for settings the zoom-level back to default in firefox
#bindsym Ctrl+0 move container to workspace 10; workspace 10
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
#FOCUS
2019-05-01 23:35:01 +02:00
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
2019-04-27 16:35:17 +02:00
bindsym $mod+$right focus right
2019-05-01 23:35:01 +02:00
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
2019-04-27 16:35:17 +02:00
# move focused window
2019-05-01 23:35:01 +02:00
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
2019-04-27 16:35:17 +02:00
# resize window (you can also use the mouse for that)
mode "resize" {
2019-05-01 23:35:01 +02:00
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize shrink height 10 px or 10 ppt
bindsym $up resize grow height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
2019-04-27 16:35:17 +02:00
2019-05-01 23:35:01 +02:00
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Up resize grow height 10 px or 10 ppt
bindsym Down resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
2019-04-27 16:35:17 +02:00
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
mode "passthrough" {
bindsym $mod+Escape mode "default"
}
bindsym $mod+Escape mode "passthrough"
# colors
2019-10-30 11:45:56 +01:00
set $color_bg #0C0C0D
set $color_bg_inactive #0C0C0D
2019-04-27 16:35:17 +02:00
set $color_text #F3F4F5
set $color_text_inactive #676E7D
set $color_bg_urgent #E53935
set $color_indicator #00FF00
set $color_separator #666666
set $color_ws #5294E2
2019-10-30 11:45:56 +01:00
set $color_ws_inactive #0C0C0D
2019-04-27 16:35:17 +02:00
set $color_ws_text #FFFFFF
set $color_ws_text_inactive #D3DAE3
# window colors
# border background text indicator child_border
client.focused $color_bg $color_bg $color_text $color_indicator $color_bg
client.unfocused $color_bg_inactive $color_bg_inactive $color_text_inactive $color_indicator $color_bg
client.focused_inactive $color_bg_inactive $color_bg_inactive $color_text_inactive $color_indicator $color_bg
client.urgent $color_bg_urgent $color_bg_urgent $color_text $color_indicator $color_bg
bar {
2022-07-03 16:09:00 +02:00
font pango:FiraCode, Font Awesome 6 Free
2020-10-24 17:30:14 +02:00
status_command i3status-rs
2019-04-27 16:35:17 +02:00
position top
workspace_buttons yes
2019-07-27 17:58:26 +02:00
icon_theme Numix
2019-04-27 16:35:17 +02:00
colors {
background $color_bg
statusline $color_ws_text_inactive
separator $color_separator
focused_workspace $color_ws $color_ws $color_ws_text
active_workspace $color_ws_inactive $color_ws_inactive $color_ws_text_inactive
inactive_workspace $color_ws_inactive $color_ws_inactive $color_ws_text_inactive
urgent_workspace $color_bg_urgent $color_bg_urgent $color_ws_text
}
}
include ~/.config/sway/`hostname`
2019-05-01 23:35:01 +02:00
include /etc/sway/config.d/*