# vim: filetype=swayconfig set $mod Mod4 set $altmod Mod4+Mod5 set $altmod2 Mod4+Shift set $kbmod Alt_R set $fwd m set $left n set $up e set $down i set $right o set $bwd apostrophe ################ styles #################### default_border pixel 1 smart_borders on title_align center font pango:{{ .theme.font.name_regular }} {{ math.Mul .theme.font.size_base_pt .theme.font.size_smaller_em }} 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 }} client.focused_inactive #{{ .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.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" }} 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(yz),ru(yz) 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 $altmod+r move container to workspace 2:r $altmod+s move container to workspace 3:s $altmod+t move container to workspace 4:t $altmod+g move container to workspace 5:g } bindgesture swipe:right workspace prev bindgesture swipe:left workspace next ############################################ ############### containers ################# # top row - layout modes, resize bindsym --to-code { $mod+q layout stacking $mod+w layout tabbed $mod+f fullscreen $mod+p layout toggle split $mod+l split v $mod+u split h $mod+y split none } # mid row - focus, movement bindsym --to-code { $mod+$fwd focus child $mod+$left focus left $mod+$up focus up $mod+$down focus down $mod+$right focus right $mod+$bwd focus parent $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 } # bottom row - modeless, extra focus bindsym --to-code { $altmod+x move scratchpad $mod+x scratchpad show $altmod+z floating toggle $mod+z focus mode_toggle $mod+k focus prev sibling $mod+h sticky toggle $mod+Comma opacity minus 0.1 $mod+Period opacity plus 0.1 $mod+slash focus next sibling } floating_modifier $mod normal ############################################ ################## actions #################### bindsym --to-code { # generic $mod+Escape kill # copy paste $mod+d exec wtype -P XF86Cut $mod+c exec wtype -P XF86Copy $mod+v exec wtype -P XF86Paste # 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 # basic scripts $mod+Return exec footclient $mod+Space exec run.sh } ############################################## ################# daemons #################### exec foot -s exec ~/.local/bin/mako/init.sh exec swayidle ############################################## ############## app-specific ################## for_window [app_id="_float"] floating enable, resize set 960 540 ##############################################