Dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

175 lines
5.2 KiB

# ======================= Keybinds =========================
set $mod Mod4
set $up w
set $left a
set $down s
set $right d
set $terminal foot
# Basics
bindsym --no-repeat $mod+Return exec $$terminal
bindsym --no-repeat $mod+q kill
bindsym --no-repeat $mod+Shift+c reload
bindsym --no-repeat $mod+Shift+e exec swaynag -t warning -m 'Log out?' -B 'Log out.' 'swaymsg exit' -B 'Reboot' 'systemctl reboot' -B 'Shutdown' 'systemctl poweroff' -s 'Cancel'
bindsym --no-repeat --inhibited $mod+Shift+z seat - shortcuts_inhibitor toggle
floating_modifier $mod normal
# Moving around
bindsym $mod+$up focus up
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$right focus right
bindsym $mod+up focus up
bindsym $mod+left focus left
bindsym $mod+down focus down
bindsym $mod+right focus right
bindsym --no-repeat $mod+space focus mode_toggle
# Swayr
bindsym Mod1+Tab exec swayr prev-window current-workspace
bindsym Mod1+Shift+Tab exec swayr next-window current-workspace
bindsym Mod4+Tab exec swayr prev-window-of-same-layout current-workspace
bindsym Mod4+Shift+Tab exec swayr next-window-of-same-layout current-workspace
# Layout
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+r layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# Window
bindsym $mod+f fullscreen
bindsym $mod+c floating toggle
bindsym $mod+z move scratchpad
bindsym $mod+x scratchpad show
# Moving/resizing windows
bindsym $mod+1 mode "move"
bindsym $mod+2 mode "resize"
mode "move" {
bindsym $up move up
bindsym $left move left
bindsym $down move down
bindsym $right move right
bindsym up move up
bindsym left move left
bindsym down move down
bindsym right move right
bindsym Escape mode "default"
bindsym Return mode "default"
#bindsym Capslock mode "default"
}
mode "resize" {
bindsym $up resize shrink height 10px
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $right resize grow width 10px
bindsym up resize shrink height 10px
bindsym left resize shrink width 10px
bindsym down resize grow height 10px
bindsym right resize grow width 10px
bindsym Escape mode "default"
bindsym Return mode "default"
#bindsym Capslock mode "default"
}
# Media Keys
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym --locked --no-repeat XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --no-repeat XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked --no-repeat XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
# Apps
bindsym --no-repeat Mod1+Space exec qdbus org.kde.krunner /App display
# ===================== Input/Output =======================
# Keyboard
input * {
xkb_layout "us"
xkb_options "compose:ralt"
}
# Touchpad
input type:touchpad {
tap enable
natural_scroll disable
middle_emulation enable
}
# Wallpaper
# Sway insists on following the config file symlink for relative paths in bg clause
# so have to give full path here.
set $wallpaper ~/.config/sway/wallpaper
output * bg $wallpaper fill
# Lock screen and power saving
set $swaylock_cmd "swaylock -f -i $wallpaper"
bindsym --no-repeat $mod+k exec 'swaymsg "output * dpms on"'
bindsym --no-repeat $mod+Shift+k exec 'swaymsg "output * dpms off"'
bindsym --no-repeat $mod+l exec $swaylock_cmd
exec swayidle -w \
timeout 600 $swaylock_cmd \
timeout 150 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep $swaylock_cmd \
after-resume 'swaymsg "output * dpms on"'
# ===================== Status Bar =========================
bar 1 {
mode dock
font pango:Noto Sans Mono, Font Awesome 6 Free, Font Awesome 5 Free, 16
status_command i3status-rs ~/.config/sway/status.toml
colors {
separator #666666
background #222222
statusline #dddddd
}
}
# ===================== Window Rules =======================
# Dialogs
for_window [app_id="org.kde.dolphin" title="(Extracting Files|File Already Exists|Moving|Compressing .* files) .*" tiling] floating enable
for_window [app_id="org.kde.ark" title="(Extracting .* files|File Already Exists|Loading archive) .*" tiling] floating enable
for_window [app_id="org.kde.*" title="Save file as..." tiling] floating enable
for_window [app_id="pcmanfm" title="Execute File" tiling] floating enable
for_window [app_id="org.keepassxc.KeePassXC" title="KeePassXC - Browser Access Request" tiling] floating enable
# KRunner and Klipper
for_window [app_id="org.kde.krunner"] floating enable
for_window [app_id="org.kde.klipper"] floating enable
# ====================== Autostart =========================
exec /usr/lib/geoclue-2.0/demos/agent
exec gammastep
exec fcitx5 -d
exec krunner -d --replace
exec klipper
exec /usr/lib/pam_kwallet_init
exec dunst
exec swayrd
# ======================= Include ===========================
include /etc/sway/config.d/*
include local