### Variables include /etc/sway/config.d/* include ~/.config/sway/config.d/* # # Logo key. Use Mod1 for Alt. set $mod Mod4 # Home row direction keys, like vim set $left h set $down j set $up k set $right l set $term alacritty set $menu fuzzel --font=undefined set $browser firefox set $wallpaper "~/.config/sway/wallpaper" set $wp_locked "~/.config/sway/wallpaper_blurred" set $lock swaylock -f -i $wp_locked ### Output configuration # output * bg $wallpaper fill output "Dell Inc. DELL P2319H BMNX5R2" transform 90 pos 4480,0 output "Dell Inc. DELL P2421D CB8RS03" pos 1920,0 output eDP-1 pos 0,0 ### Idle configuration # exec_always swayidle -w \ before-sleep '$lock' # timeout 600 'swaylock -f -i $wp_locked --inside-color $base03' \ # timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ # # lock screen after 600s (10min) of inactivity, then turn off displays after # another 300s (5min), and turn your screens back on when resumed. # It will also lock screen before your computer goes to sleep. ### Input configuration # input "type:pointer" { accel_profile "flat" pointer_accel 0 } input "type:touchpad" { dwt enabled tap enabled natural_scroll enabled middle_emulation enabled pointer_accel 0.3 } input "type:keyboard" { xkb_layout "us" xkb_options "compose:ralt" } ### Key bindings # # Basics: # bindsym $mod+Backspace exec makoctl dismiss --all # Start applications bindsym $mod+space exec $menu bindsym $mod+Return exec $term bindsym $mod+Shift+q kill floating_modifier $mod normal bindsym $mod+Shift+Backspace exec '$lock' 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' # Volume bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle # Control Brightness bindsym --locked XF86MonBrightnessDown exec light -T 0.72 bindsym --locked XF86MonBrightnessUp exec light -T 1.4 # Take a screenshot bindsym $mod+p exec grim -g "$(slurp)" - | swappy -f - bindsym Print exec ~/.local/bin/screenshot.sh # # Moving around: # # Move your focus around bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right # Move the focused window with the same, but add Shift bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right # # Workspaces: # # Switch to workspace bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 bindsym $mod+3 workspace number 3 bindsym $mod+4 workspace number 4 bindsym $mod+5 workspace number 5 bindsym $mod+6 workspace number 6 bindsym $mod+7 workspace number 7 bindsym $mod+8 workspace number 8 bindsym $mod+9 workspace number 9 bindsym $mod+0 workspace number 10 # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+3 move container to workspace number 3 bindsym $mod+Shift+4 move container to workspace number 4 bindsym $mod+Shift+5 move container to workspace number 5 bindsym $mod+Shift+6 move container to workspace number 6 bindsym $mod+Shift+7 move container to workspace number 7 bindsym $mod+Shift+8 move container to workspace number 8 bindsym $mod+Shift+9 move container to workspace number 9 bindsym $mod+Shift+0 move container to workspace number 10 # Note: workspaces can have any name you want, not just numbers. # We just use 1-10 as the default. bindsym $mod+m move workspace to output right # # Layout stuff: # # to get more info on opened window, use the following command # swaymsg -t get_tree for_window [class="PacketTracer"] floating enable for_window [class="VirtualBox"] floating enable for_window [class="^Minecraft*"] floating enable for_window [class="Lxappearance"] floating enable for_window [app_id="python3"] floating enable bindsym $mod+b splith bindsym $mod+v splitv bindsym $mod+s layout stacking bindsym $mod+t layout tabbed bindsym $mod+e layout toggle split # bindsym $mod+f fullscreen bindsym $mod+Shift+f floating toggle bindsym $mod+f focus mode_toggle bindsym $mod+a focus parent # # Scratchpad: # # Sway has a "scratchpad", which is a bag of holding for windows. # You can send windows there and get them back later. # Move the currently focused window to the scratchpad bindsym $mod+Shift+minus move scratchpad # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+minus scratchpad show # # Resizing containers: # mode "resize" { bindsym $left resize shrink width 10px bindsym $right resize grow width 10px bindsym $up resize shrink height 10px bindsym $down resize grow height 10px # Return to default mode bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" # # Assign to Workspaces # assign [class="Signal"] workspace 10 # # Autostart # exec signal-desktop # # Status Bar: # bar swaybar_command waybar default_border pixel gaps inner 0 bindsym $mod+Shift+u exec 'swaymsg gaps inner all minus 5' bindsym $mod+Shift+i exec 'swaymsg gaps inner all plus 5'