nix/dotfiles/sway/config
2022-06-02 10:58:14 +02:00

167 lines
5.3 KiB
Text

# config
set $mod Mod1
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $wallpaper /home/stefan/Downloads/bg.jpg
set $lock swaylock -t -i $wallpaper --scaling=fill
set $font CaskaydiaCove Nerd Font 10
set $menucolor --ff=#f8f8f2 --nf=#f8f8f2 --tf=#bd93f9 --hf=#bd93f9 --tb=#282a36 --fb=#282a36 --nb=#282a36 --hb=#282a36 --sb=#282a36
set $menu bemenu-run -H 23 -b -p run $menucolor
input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de
input "0:0:TUXEDO_Keyboard" xkb_layout de
output * bg $wallpaper fill
output "BenQ Corporation BenQ SW2700 83H03922SL0" res --custom 2560x1440@60Hz
output "Dell Inc. Dell U4919DW HZVZWP2" res 5120x1440
# user keybinds
bindsym $mod+Return exec $term
bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu
floating_modifier $mod normal
bindsym $mod+Shift+c reload
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'
bindsym $mod+o exec keepassxc
bindsym $mod+z exec $lock
bindsym $mod+Up exec light -A 5
bindsym $mod+Down exec light -U 5
bindsym $mod+c exec alacritty --class float -t pyCalc -e python
bindsym $mod+i exec alacritty --class float -t insect -e insect
bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png
bindswitch --reload --locked lid:on output eDP-1 disable
bindswitch --reload --locked lid:off output eDP-1 enable
# app rules
for_window [app_id="org.keepassxc.KeePassXC"] floating enable
for_window [title="Firefox — Sharing Indicator"] floating enable
for_window [title="Picture-in-Picture"] floating enable
for_window [title="pyCalc"] floating enable
for_window [title="insect"] floating enable
# font
font $font
# colors
set $black #282a36
set $red #ff6188
set $cyan #78dce8
set $white #fcfcfa
set $yellow #f1fa8c
set $violet #bd93f9
set $black2 #323232
# border backgnd text indicator childborder
client.focused $violet $black $white $violet $violet
client.focused_inactive $black $black $white $black2 $black
client.unfocused $black $black $white $black2 $black
client.urgent $red $red $black $black2 $white
# movement
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus 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
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
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
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
mode "resize" {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "umlaut" {
bindsym s exec wtype ß
bindsym a exec wtype ä
bindsym o exec wtype ö
bindsym u exec wtype ü
bindsym Shift+a exec wtype Ä
bindsym Shift+o exec wtype Ö
bindsym Shift+u exec wtype Ü
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+u mode "umlaut"
bar {
font $font
position bottom
colors {
background $black
statusline $white
separator $violet
# border back text
focused_workspace $violet $violet $black
active_workspace $violet $violet $black
urgent_workspace $red $red $white
inactive_workspace $black $black $white
}
status_command i3status-rs /etc/sway/status.toml
}
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Dracula'
gsettings set $gnome-schema icon-theme 'Dracula'
gsettings set $gnome-schema cursor-theme 'Capitaine Cursors - White'
}
# autostarts
exec mako --font "$font" \
--background-color=$black \
--border-color=$violet \
--text-color=$white
exec emacs --daemon
exec swayidle before-sleep "$lock"
exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1
exec systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
# pastebin
exec wl-paste --primary -t text --watch clipman store
bindsym $mod+p exec clipman pick -t "bemenu" --tool-args='-b --fn "$font" -l 10 $menucolor'