# vim: filetype=swayconfig set $mod Mod4 set $altmod Mod4+Shift set $altmod2 Mod4+Mod5 set $kbmod Alt_R set $fwd m set $left n set $down e set $up i set $right o set $bwd quotedbl ################ styles #################### default_border pixel 2 gaps inner 4 smart_borders on smart_gaps on show_marks on title_align center font pango:{{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }} output * bg #{{ .theme.color.bg }} solid_color client.focused #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }} client.focused_tab_title #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} client.focused_inactive #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} client.unfocused #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} client.urgent #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} bar { position top font pango:{{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }} status_command i3blocks strip_workspace_numbers yes separator_symbol | workspace_min_width 28 tray_output none colors { statusline #{{ .theme.color.fg }} background #{{ .theme.color.bg }} separator #{{ .theme.color.fg_dark }} focused_workspace #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }} inactive_workspace #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg }} urgent_workspace #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} binding_mode #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} } } ########################################### ################ inputs #################### input "type:keyboard" { xkb_layout us(yurmak),ru(yurmak) repeat_rate 50 } bindsym --to-code $kbmod input "type:keyboard" xkb_switch_layout next; exec pkill -SIGRTMIN+1 i3blocks input "type:touchpad" { tap enabled natural_scroll enabled } ############################################ ############### workspaces ################# bindsym --to-code { $mod+a workspace 1:A $mod+r workspace 2:R $mod+s workspace 3:S $mod+t workspace 4:T $mod+g workspace 5:G $altmod+a move container to workspace 1:A; workspace 1:A $altmod+r move container to workspace 2:R; workspace 2:R $altmod+s move container to workspace 3:S; workspace 3:S $altmod+t move container to workspace 4:T; workspace 4:T $altmod+g move container to workspace 5:G; workspace 5:G } bindgesture swipe:right workspace prev bindgesture swipe:left workspace next ############################################ ############### containers ################# bindsym --to-code { $altmod+1 mark 1 $altmod+2 mark 2 $altmod+3 mark 3 $altmod+4 mark 4 $altmod+5 mark 5 $altmod+6 mark 6 $altmod+7 mark 7 $altmod+8 mark 8 $altmod+9 mark 9 $altmod+0 mark 0 $mod+1 [con_mark="1"] focus $mod+2 [con_mark="2"] focus $mod+3 [con_mark="3"] focus $mod+4 [con_mark="4"] focus $mod+5 [con_mark="5"] focus $mod+6 [con_mark="6"] focus $mod+7 [con_mark="7"] focus $mod+8 [con_mark="8"] focus $mod+9 [con_mark="9"] focus $mod+0 [con_mark="0"] focus $mod+Minus opacity minus 0.05 $altmod+Minus opacity plus 0.05 } bindsym --to-code { $altmod+KP_1 mark 1 $altmod+KP_2 mark 2 $altmod+KP_3 mark 3 $altmod+KP_4 mark 4 $altmod+KP_5 mark 5 $altmod+KP_6 mark 6 $altmod+KP_7 mark 7 $altmod+KP_8 mark 8 $altmod+KP_9 mark 9 $altmod+KP_0 mark 0 $mod+KP_1 [con_mark="1"] focus $mod+KP_2 [con_mark="2"] focus $mod+KP_3 [con_mark="3"] focus $mod+KP_4 [con_mark="4"] focus $mod+KP_5 [con_mark="5"] focus $mod+KP_6 [con_mark="6"] focus $mod+KP_7 [con_mark="7"] focus $mod+KP_8 [con_mark="8"] focus $mod+KP_9 [con_mark="9"] focus $mod+KP_0 [con_mark="0"] focus } bindsym --to-code { $altmod+p split v $mod+l layout splith $altmod+l split h $mod+f fullscreen $mod+w layout stacking $altmod+w split v; layout stacking $mod+q split v; layout stacking $mod+u split none $altmod+u split none $mod+y layout tabbed $altmod+y split h; layout tabbed $mod+j focus parent } bindsym --to-code { $mod+$fwd exec ~/.local/bin/sway/focus-cousin.sh prev $mod+$left focus left $mod+$up focus up $mod+$down focus down $mod+$right focus right $mod+$bwd exec ~/.local/bin/sway/focus-cousin.sh next $altmod+$left move left 40px $altmod+$up move up 40px $altmod+$down move down 40px $altmod+$right move right 40px $altmod2+$left resize shrink width 2ppt or 40px $altmod2+$up resize shrink height 4ppt or 40px $altmod2+$down resize grow height 4ppt or 40px $altmod2+$right resize grow width 2ppt or 40px } bindsym --to-code { $mod+d scratchpad show $altmod+d sticky enable; move scratchpad $mod+k focus tiling $altmod+k focus floating; floating disable; sticky disable $mod+h focus floating $altmod+h floating enable; sticky enable $mod+x exec wtype -M ctrl x -m ctrl $mod+c exec wtype -M ctrl c -m ctrl $mod+v exec wtype -M ctrl v -m ctrl $mod+Slash exec ~/.local/bin/sway/search-mode.sh $mod+z focus child } bindsym --to-code { $mod+Left focus left $mod+Up focus up $mod+Down focus down $mod+Right focus right $altmod+Left move left 40px $altmod+Up move up 40px $altmod+Down move down 40px $altmod+Right move right 40px } floating_modifier $mod normal ############################################ ################## actions #################### bindsym --to-code { # generic $mod+Escape kill # media XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%- XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+ XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle && pkill -SIGRTMIN+2 i3blocks XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% && pkill -SIGRTMIN+2 i3blocks XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks XF86Calculator exec .local/bin/bemenu/run-calc.sh calc tui # basic scripts $mod+Return exec alacritty msg create-window $mod+Colon exec ~/.local/bin/sway/command-mode.sh $mod+Space exec ~/.local/bin/bemenu/run.sh } ############################################## ################# daemons #################### exec mako exec swayidle exec alacritty --daemon ############################################## ############## app-specific ################## for_window [app_id="_float"] floating enable, resize set 960 540 #############################################