### Variables # Main keys set $mod Mod1 set $ctrl Control set $alt Mod4 # Home row direction keys, like vim set $left h set $down j set $up k set $right l # Your preferred terminal emulator set $term kitty # Your preferred application launcher set $menu kickoff # Workspaces set $ws1 "1" set $ws2 "2" set $ws3 "3" set $ws4 "4" set $ws5 "5" set $ws6 "6" set $ws7 "7" set $ws8 "8" set $ws9 "9" set $ws10 "10" set $bg #000000 set $br #ffa759 set $brbug #FF0000 set $textColor #cbccc6 set $mainMonitor "HDMI-A-1" set $laptopMonitor "eDP-1" set $wallpaperPathFile "~/.config/.wallpaper" set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock exec rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob -c ~/.config/wob.ini # ____ _____ _ _ _____ ____ _ _ # / ___| ____| \ | | ____| _ \ / \ | | # | | _| _| | \| | _| | |_) | / _ \ | | # | |_| | |___| |\ | |___| _ < / ___ \| |___ # \____|_____|_| \_|_____|_| \_\/_/ \_\_____| # default_border pixel 2px smart_borders on focus_follows_mouse no gaps inner 10 floating_modifier $mod normal font FiraCode 10 xwayland enable # class border backgr. text indicator child_border client.focused $br $br $textColor $brbug $br # Keyboard layout input type:keyboard { xkb_layout "us,ru" xkb_options "grp:win_space_toggle,caps:escape" } input type:touchpad { natural_scroll enabled tap enabled tap_button_map "lrm" drag enabled events enabled pointer_accel 0.3 scroll_factor 0.3 dwt disabled } output * { bg $(cat $wallpaperPathFile) fill } output $laptopMonitor { pos 0 1080 } output $mainMonitor { pos 0 0 mode 1920x1080@144Hz } bindswitch --reload --locked lid:on exec "$HOME/dotfiles/bin/lock.sh" bindswitch --reload --locked lid:off exec 'swaymsg "output eDP-1 enable"' # _ ____ ____ _ ___ ____ _ _____ ___ ___ _ _ ____ # / \ | _ \| _ \| | |_ _/ ___| / \|_ _|_ _/ _ \| \ | / ___| # / _ \ | |_) | |_) | | | | | / _ \ | | | | | | | \| \___ \ # / ___ \| __/| __/| |___ | | |___ / ___ \| | | | |_| | |\ |___) | # /_/ \_\_| |_| |_____|___\____/_/ \_\_| |___\___/|_| \_|____/ # # Start applications with keybindings bindsym $alt+f exec firefox-developer-edition bindsym $alt+r exec kitty sh -c "lf" bindsym $alt+s exec steam # Default settings for some applications for_window [class="mpv"] floating enable for_window [class="mpv"] move absolute center for_window [class="MuPDF"] floating enable for_window [app_id="pavucontrol"] floating enable for_window [app_id="blueman-manager"] floating enable for_window [title="Picture-in-Picture"] { sticky enable move position 78ppt 65ppt } for_window [class="feh"] { floating enable move absolute center resize set 1200 800 } for_window [app_id="thunar"] { floating enable resize set 1000 700 } assign [class="Slack"] workspace $ws4 # _ _ _ _____ ___ ____ _____ _ ____ _____ # / \ | | | |_ _/ _ \/ ___|_ _|/ \ | _ \_ _| # / _ \| | | | | || | | \___ \ | | / _ \ | |_) || | # / ___ \ |_| | | || |_| |___) || |/ ___ \| _ < | | # /_/ \_\___/ |_| \___/|____/ |_/_/ \_\_| \_\|_| # exec --no-startup-id swaync exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec_always --no-startup-id swaync-client -R exec_always --no-startup-id xrdb -load $HOME/.Xresources exec_always --no-startup-id $HOME/.config/waybar/launch.sh # exec_always --no-startup-id $HOME/dotfiles/bin/swayidle.sh exec_always --no-startup-id $HOME/dotfiles/bin/initial-mic-state.sh exec_always --no-startup-id $HOME/dotfiles/bin/sway-lid-watcher.sh # _ _________ ______ ___ _ _ ____ ___ _ _ ____ ____ # | |/ / ____\ \ / / __ )_ _| \ | | _ \_ _| \ | |/ ___/ ___| # | ' /| _| \ V /| _ \| || \| | | | | || \| | | _\___ \ # | . \| |___ | | | |_) | || |\ | |_| | || |\ | |_| |___) | # |_|\_\_____| |_| |____/___|_| \_|____/___|_| \_|\____|____/ # bindsym --to-code { # Bind media keys on a keyboard to control volume and playback XF86AudioRaiseVolume exec --no-startup-id pamixer --allow-boost -i 5 && $HOME/dotfiles/bin/notify-on-volume XF86AudioLowerVolume exec --no-startup-id pamixer --allow-boost -d 5 && $HOME/dotfiles/bin/notify-on-volume XF86AudioMute exec --no-startup-id pamixer -t XF86AudioPlay exec playerctl play-pause XF86AudioNext exec playerctl next XF86AudioPrev exec playerctl previous XF86AudioMicMute exec $HOME/dotfiles/bin/toggle-mic-mute.sh # brightness XF86MonBrightnessDown exec $HOME/dotfiles/bin/control-brightness.sh down | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK XF86MonBrightnessUp exec $HOME/dotfiles/bin/control-brightness.sh up | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK # screenshots $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f - # terminal $mod+Return exec $term # swaync $mod+Shift+n exec swaync-client -t -sw # Kill focused window $mod+Shift+q kill # Run wlogout to quit $mod+Shift+e exec --no-startup-id wlogout -m 250 # Start your launcher $alt+d exec $menu # Reload the configuration file $mod+Shift+r reload # Move focus between tiling and floating areas $mod+m focus mode_toggle # Move focus $mod+$left focus left $mod+$down focus down $mod+$up focus up $mod+$right focus right # Move focused windows $mod+Shift+$left move left $mod+Shift+$down move down $mod+Shift+$up move up $mod+Shift+$right move right # Cycle through workspaces $mod+Tab workspace next $mod+Shift+Tab workspace prev # Switch to workspace $mod+1 workspace number $ws1 $mod+2 workspace number $ws2 $mod+3 workspace number $ws3 $mod+4 workspace number $ws4 $mod+5 workspace number $ws5 $mod+6 workspace number $ws6 $mod+7 workspace number $ws7 $mod+8 workspace number $ws8 $mod+9 workspace number $ws9 $mod+0 workspace number $ws10 # Move focused container to workspace $mod+Shift+1 move container to workspace number $ws1 $mod+Shift+2 move container to workspace number $ws2 $mod+Shift+3 move container to workspace number $ws3 $mod+Shift+4 move container to workspace number $ws4 $mod+Shift+5 move container to workspace number $ws5 $mod+Shift+6 move container to workspace number $ws6 $mod+Shift+7 move container to workspace number $ws7 $mod+Shift+8 move container to workspace number $ws8 $mod+Shift+9 move container to workspace number $ws9 $mod+Shift+0 move container to workspace number $ws10 # Change split mode $mod+g splith $mod+v splitv # Switch the current container between different layout styles $mod+s layout stacking $mod+w layout tabbed $mod+e layout toggle split # Toggle between layout modes $mod+x layout toggle # Make the current focus fullscreen $mod+f fullscreen # Toggle the current focus between tiling and floating mode $mod+z floating toggle $mod+r mode "resize" # scratchpad $mod+minus scratchpad show $mod+Shift+minus move scratchpad $mod+o exec --no-startup-id echo '‎' | wl-copy } ### Resize mode mode "resize" { bindsym $left resize shrink width 100px bindsym $down resize shrink height 100px bindsym $up resize grow height 100px bindsym $right resize grow width 100px # Return to default mode bindsym Return mode "default" bindsym Escape mode "default" } include /etc/sway/config.d/*