1 # Default config for sway
3 # Copy this to ~/.config/sway/config and edit it to your liking.
5 # Read `man 5 sway` for a complete reference.
9 # Logo key. Use Mod1 for Alt.
11 # Home row direction keys, like vim
16 # Your preferred terminal emulator
17 set $term ~/.bin/sensible-terminal.sh
18 # Your preferred application launcher
19 # Note: pass the final command to swaymsg so that the resulting window can be opened
20 # on the original workspace that the command was run on.
21 #set $menu dmenu_path | dmenu | xargs swaymsg exec --
22 set $menu /usr/bin/ulauncher
23 include /etc/sway/config-vars.d/*
25 ### Output configuration
27 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
28 #output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
30 # Example configuration:
32 # output HDMI-A-1 resolution 1920x1080 position 1920,0
34 # You can get the names of your outputs by running: swaymsg -t get_outputs
37 output HDMI-A-1 resolution 2560x1440 position 0 0 scale 1
38 output DP-1 resolution 1680x1050 position 2560 0 scale 1
40 bindsym $mod+F9 exec "sway output DP-1 disable; sway output HDMI-A-1 enable"
41 bindsym $mod+F10 exec "sway output DP-1 enable; sway output HDMI-A-1 enable"
42 bindsym $mod+F11 exec "sway output DP-1 enable; sway output HDMI-A-1 disable"
43 ### Idle configuration
45 # Example configuration:
47 set $lock_cmd ~/.bin/lockscreen.sh
49 timeout 1200 $lock_cmd \
50 timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
51 before-sleep $lock_cmd
53 bindsym $mod+Shift+x exec $lock_cmd
55 # This will lock your screen after 300 seconds of inactivity, then turn off
56 # your displays after another 300 seconds, and turn your screens back on when
57 # resumed. It will also lock your screen before your computer goes to sleep.
59 ### Input configuration
61 # Example configuration:
63 # input "2:14:SynPS/2_Synaptics_TouchPad" {
66 # natural_scroll enabled
67 # middle_emulation enabled
70 # You can get the names of your inputs by running: swaymsg -t get_inputs
71 # Read `man 5 sway-input` for more information about this section.
78 bindsym $mod+Return exec $term
81 bindsym $mod+Shift+q kill
84 bindsym $mod+d exec $menu
86 # Drag floating windows by holding down $mod and left mouse button.
87 # Resize them with right mouse button + $mod.
88 # Despite the name, also works for non-floating windows.
89 # Change normal to inverse to use left mouse button for resizing and right
90 # mouse button for dragging.
91 floating_modifier $mod normal
93 # Reload the configuration file
94 bindsym $mod+Shift+c reload
95 bindsym $mod+Shift+r restart
97 # Exit sway (logs you out of your Wayland session)
98 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'
103 # Move your focus around
104 bindsym $mod+$left focus left
105 bindsym $mod+$down focus down
106 bindsym $mod+$up focus up
107 bindsym $mod+$right focus right
108 # Or use $mod+[up|down|left|right]
109 bindsym $mod+Left focus left
110 bindsym $mod+Down focus down
111 bindsym $mod+Up focus up
112 bindsym $mod+Right focus right
114 # Move the focused window with the same, but add Shift
115 bindsym $mod+Shift+$left move left
116 bindsym $mod+Shift+$down move down
117 bindsym $mod+Shift+$up move up
118 bindsym $mod+Shift+$right move right
119 # Ditto, with arrow keys
120 bindsym $mod+Shift+Left move left
121 bindsym $mod+Shift+Down move down
122 bindsym $mod+Shift+Up move up
123 bindsym $mod+Shift+Right move right
127 # Switch to workspace
128 bindsym $mod+1 workspace number 1
129 bindsym $mod+2 workspace number 2
130 bindsym $mod+3 workspace number 3
131 bindsym $mod+4 workspace number 4
132 bindsym $mod+5 workspace number 5
133 bindsym $mod+6 workspace number 6
134 bindsym $mod+7 workspace number 7
135 bindsym $mod+8 workspace number 8
136 bindsym $mod+9 workspace number 9
137 bindsym $mod+0 workspace number 10
138 # Move focused container to workspace
139 bindsym $mod+Shift+1 move container to workspace number 1
140 bindsym $mod+Shift+2 move container to workspace number 2
141 bindsym $mod+Shift+3 move container to workspace number 3
142 bindsym $mod+Shift+4 move container to workspace number 4
143 bindsym $mod+Shift+5 move container to workspace number 5
144 bindsym $mod+Shift+6 move container to workspace number 6
145 bindsym $mod+Shift+7 move container to workspace number 7
146 bindsym $mod+Shift+8 move container to workspace number 8
147 bindsym $mod+Shift+9 move container to workspace number 9
148 bindsym $mod+Shift+0 move container to workspace number 10
149 # Note: workspaces can have any name you want, not just numbers.
150 # We just use 1-10 as the default.
154 # You can "split" the current object of your focus with
155 # $mod+b or $mod+v, for horizontal and vertical splits
157 bindsym $mod+b splith
158 bindsym $mod+v splitv
160 # Switch the current container between different layout styles
161 bindsym $mod+s layout stacking
162 bindsym $mod+w layout tabbed
163 bindsym $mod+e layout toggle split
165 # Make the current focus fullscreen
166 bindsym $mod+f fullscreen
168 # Toggle the current focus between tiling and floating mode
169 bindsym $mod+Shift+space floating toggle
171 # Swap focus between the tiling area and the floating area
172 bindsym $mod+space focus mode_toggle
174 # Move focus to the parent container
175 bindsym $mod+a focus parent
179 # Sway has a "scratchpad", which is a bag of holding for windows.
180 # You can send windows there and get them back later.
182 # Move the currently focused window to the scratchpad
183 bindsym $mod+Shift+minus move scratchpad
185 # Show the next scratchpad window or hide the focused scratchpad window.
186 # If there are multiple scratchpad windows, this command cycles through them.
187 bindsym $mod+minus scratchpad show
189 # Resizing containers:
192 # left will shrink the containers width
193 # right will grow the containers width
194 # up will shrink the containers height
195 # down will grow the containers height
196 bindsym $left resize shrink width 10px
197 bindsym $down resize grow height 10px
198 bindsym $up resize shrink height 10px
199 bindsym $right resize grow width 10px
201 # Ditto, with arrow keys
202 bindsym Left resize shrink width 10px
203 bindsym Down resize grow height 10px
204 bindsym Up resize shrink height 10px
205 bindsym Right resize grow width 10px
207 # Return to default mode
208 bindsym Return mode "default"
209 bindsym Escape mode "default"
211 bindsym $mod+r mode "resize"
216 # Read `man 5 sway-bar` for more information about this section.
220 ## # When the status_command prints a new line to stdout, swaybar updates.
221 ## # The default just shows the current date and time.
222 ## status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
224 ## icon_theme Adwaita ##
226 ## statusline #ffffff
227 ## background #323232
228 ## inactive_workspace #32323200 #32323200 #5c5c5c
233 swaybar_command waybar
236 include /etc/sway/config.d/*
239 # mako for notifications
242 exec sleep 3 && nextcloud --background
244 exec ~/.bin/set_sway_wallpaper.sh
245 default_border pixel 6
246 default_floating_border pixel 6
248 bindsym $mod+Shift+d exec dolphin
249 bindsym $mod+Shift+f exec firefox
250 bindsym $mod+Shift+Control+e exec "shutdown -h now"
252 bindsym Shift+Control+p exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy
254 for_window [window_role="About"] floating enable
255 for_window [class="vlc"] floating enable
257 input type:keyboard {
259 xkb_options grp:win_space_toggle