# 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 # Apps set $term foot set $chat flatpak run org.signal.Signal set $office flatpak run org.libreoffice.LibreOffice set $passwords flatpak run com.bitwarden.desktop set $notes flatpak run net.cozic.joplin_desktop set $browser $BROWSER set $vm flatpak run org.gnome.Boxes set $file foot -T yazi -a yazi yazi set $editor $VISUAL set $music foot -T cmus -a cmus cmus set $rss foot -T newsboat -a newsboat newsboat set $ani-cli foot -T ani-cli -a ani-cli ani-cli set $ytfzf foot -T ytfzf -a ytfzf ytfzf -flstT chafa set $ytfzf-music foot -T ytfzf-music -a ytfzf-music ytfzf -mlstT chafa set $flix-cli foot -T flix-cli -a flix-cli flix-cli set $audiomixer foot -T pulsemixer -a pulsemixer pulsemixer set $monitor foot -T btop -a btop btop # JetBrains IDEs set $rider ~/.local/share/JetBrains/Toolbox/scripts/rider set $idea ~/.local/share/JetBrains/Toolbox/scripts/idea set $clion ~/.local/share/JetBrains/Toolbox/scripts/clion set $goland ~/.local/share/JetBrains/Toolbox/scripts/goland set $rustrover ~/.local/share/JetBrains/Toolbox/scripts/rustrover set $webstorm ~/.local/share/JetBrains/Toolbox/scripts/webstorm set $pycharm ~/.local/share/JetBrains/Toolbox/scripts/pycharm set $datagrip ~/.local/share/JetBrains/Toolbox/scripts/datagrip # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened # on the original workspace that the command was run on. set $menu fuzzel | xargs swaymsg exec -- set $menu-wifi ~/.config/fuzzel/scripts/rs_wifi | xargs swaymsg exec -- set $menu-power ~/.config/fuzzel/scripts/rs_power | xargs swaymsg exec -- set $menu-emoji ~/.config/fuzzel/scripts/rs_emoji | xargs swaymsg exec -- set $menu-wall ~/.config/fuzzel/scripts/rs_wall | xargs swaymsg exec -- set $menu-scrot ~/.config/fuzzel/scripts/rs_scrot | xargs swaymsg exec -- set $menu-blue ~/.config/fuzzel/scripts/rs_blue | xargs swaymsg exec -- set $menu-clip ~/.config/fuzzel/scripts/rs_clip | xargs swaymsg exec -- # Start a terminal bindsym $mod+Return exec $term # Kill focused window bindsym $mod+q kill # XF86 Keys bindsym XF86AudioRaiseVolume exec mediacontrol volume-up 5 bindsym XF86AudioLowerVolume exec mediacontrol volume-down 5 bindsym XF86AudioMute exec mediacontrol volume-mute bindsym XF86AudioMicMute exec mediacontrol mic-mute bindsym XF86AudioPause exec mediacontrol media-play-pause bindsym XF86AudioPlay exec mediacontrol media-play-pause bindsym XF86AudioNext exec mediacontrol media-play-next bindsym XF86AudioPrev exec mediacontrol media-play-prev bindsym XF86AudioStop exec mediacontrol media-play-stop bindsym XF86MonBrightnessUp exec mediacontrol brightness-up 5 bindsym XF86MonBrightnessDown exec mediacontrol brightness-down 5 bindsym XF86News exec $rss # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. # Change normal to inverse to use left mouse button for resizing and right # mouse button for dragging. floating_modifier $mod normal # Reload the configuration file bindsym $mod+Shift+Ctrl+r reload # Exit sway (logs you out of your Wayland session) bindsym $mod+Shift+Ctrl+q 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' ### 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 # Or use $mod+[up|down|left|right] 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 # Ditto, with arrow keys 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 [con_id=__focused__] move container to workspace number 1, focus bindsym $mod+Shift+2 [con_id=__focused__] move container to workspace number 2, focus bindsym $mod+Shift+3 [con_id=__focused__] move container to workspace number 3, focus bindsym $mod+Shift+4 [con_id=__focused__] move container to workspace number 4, focus bindsym $mod+Shift+5 [con_id=__focused__] move container to workspace number 5, focus bindsym $mod+Shift+6 [con_id=__focused__] move container to workspace number 6, focus bindsym $mod+Shift+7 [con_id=__focused__] move container to workspace number 7, focus bindsym $mod+Shift+8 [con_id=__focused__] move container to workspace number 8, focus bindsym $mod+Shift+9 [con_id=__focused__] move container to workspace number 9, focus bindsym $mod+Shift+0 [con_id=__focused__] move container to workspace number 10, focus # Note: workspaces can have any name you want, not just numbers. # We just use 1-10 as the default. ### Layout stuff: # You can "split" the current object of your focus with # $mod+s or $mod+v, for horizontal and vertical splits # respectively. mode "split" { bindsym v splith; mode "default" bindsym s splitv; mode "default" bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+w mode "split" # Switch the current container between different layout styles mode "layout" { bindsym s layout stacking; mode "default" bindsym w layout tabbed; mode "default" bindsym t layout toggle split; mode "default" bindsym f fullscreen; mode "default" bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+e mode "layout" # Toggle the current focus between tiling and floating mode bindsym $mod+Alt+space floating toggle # Swap focus between the tiling area and the floating area bindsym $mod+space focus mode_toggle # Move focus to the parent container bindsym $mod+Shift+Return 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+s 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+s scratchpad show ### Resizing containers: mode "resize" { # left will shrink the containers width # right will grow the containers width # up will shrink the containers height # down will grow the containers height bindsym $left resize shrink width 10px bindsym $down resize grow height 10px bindsym $up resize shrink height 10px bindsym $right resize grow width 10px # Ditto, with arrow keys bindsym Left resize shrink width 10px bindsym Down resize grow height 10px bindsym Up resize shrink height 10px bindsym Right resize grow width 10px # Return to default mode bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" ### Mode for launching apps mode "apps" { # Start apps bindsym f exec $file; mode "default" bindsym e exec $editor; mode "default" bindsym w exec $browser; mode "default" bindsym c exec $chat; mode "default" bindsym o exec $office; mode "default" bindsym n exec $notes; mode "default" bindsym m exec $music; mode "default" bindsym r exec $rss; mode "default" bindsym p exec $passwords; mode "default" bindsym v exec $vm; mode "default" bindsym Shift+b exec $monitor; mode "default" bindsym Shift+p exec $audiomixer; mode "default" bindsym Shift+y exec $ytfzf; mode "default" bindsym Shift+m exec $ytfzf-music; mode "default" bindsym Shift+a exec $ani-cli; mode "default" bindsym Shift+f exec $flix-cli; mode "default" bindsym Ctrl+d exec $rider; mode "default" bindsym Ctrl+i exec $idea; mode "default" bindsym Ctrl+g exec $goland; mode "default" bindsym Ctrl+r exec $rustrover; mode "default" bindsym Ctrl+c exec $clion; mode "default" bindsym Ctrl+w exec $webstorm; mode "default" bindsym Ctrl+p exec $pycharm; mode "default" bindsym Ctrl+t exec $datagrip; mode "default" bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+a mode "apps" # Run launcher scripts mode "launcher" { bindsym d exec $menu; mode "default" bindsym q exec $menu-power; mode "default" bindsym e exec $menu-emoji; mode "default" bindsym w exec $menu-wall; mode "default" bindsym s exec $menu-scrot; mode "default" bindsym b exec $menu-blue; mode "default" bindsym c exec $menu-clip; mode "default" bindsym i exec $menu-wifi; mode "default" bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+p mode "launcher"