# 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_REGULAR $THEME_SIZE_FONT_SMALL_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$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT client.focused_inactive #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX client.unfocused #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX bar { position top font pango:$THEME_FONT_REGULAR $THEME_SIZE_FONT_BASE_PT status_command i3blocks strip_workspace_numbers yes separator_symbol | workspace_min_width 28 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 ##############################################