936d8baefb58f2a585f0fdf74b76acc2a7fe7b75
[Dotty.git] / sway / .config / sway / config
1 # Default config for sway
2 #
3 # Copy this to ~/.config/sway/config and edit it to your liking.
4 #
5 # Read `man 5 sway` for a complete reference.
7 ### Variables
8 #
9 # Logo key. Use Mod1 for Alt.
10 set $mod Mod4
11 # Home row direction keys, like vim
12 set $left h
13 set $down j
14 set $up k
15 set $right l
16 # Your preferred terminal emulator
17 set $term urxvt
18 # Your preferred application launcher
19 # Note: it's recommended that you pass the final command to sway
20 set $menu dmenu_path | dmenu | xargs swaymsg exec --
22 ### Output configuration
23 #
24 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
25 output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
26 #
27 # Example configuration:
28 #
29 #   output HDMI-A-1 resolution 1920x1080 position 1920,0
30 #
31 # You can get the names of your outputs by running: swaymsg -t get_outputs
32 # Enable HiDPI
33 output eDP-1 scale 2
35 ### Idle configuration
36 #
37 # Example configuration:
38 #
39 # exec swayidle -w \
40 #          timeout 300 'swaylock -f -c 000000' \
41 #          timeout 600 'swaymsg "output * dpms off"' \
42 #               resume 'swaymsg "output * dpms on"' \
43 #          before-sleep 'swaylock -f -c 000000'
44 #
45 # This will lock your screen after 300 seconds of inactivity, then turn off
46 # your displays after another 300 seconds, and turn your screens back on when
47 # resumed. It will also lock your screen before your computer goes to sleep.
49 ### Input configuration
50 #
51 # Example configuration:
52 #
53 #   input "2:14:SynPS/2_Synaptics_TouchPad" {
54 #       dwt enabled
55 #       tap enabled
56 #       natural_scroll enabled
57 #       middle_emulation enabled
58 #   }
59 #
60 # You can get the names of your inputs by running: swaymsg -t get_inputs
61 # Read `man 5 sway-input` for more information about this section.
63 ### Key bindings
64 #
65 # Basics:
66 #
67     # Start a terminal
68     bindsym $mod+Return exec $term
70     # Kill focused window
71     bindsym $mod+Shift+q kill
73     # Start your launcher
74     bindsym $mod+d exec $menu
76     # Drag floating windows by holding down $mod and left mouse button.
77     # Resize them with right mouse button + $mod.
78     # Despite the name, also works for non-floating windows.
79     # Change normal to inverse to use left mouse button for resizing and right
80     # mouse button for dragging.
81     floating_modifier $mod normal
83     # Reload the configuration file
84     bindsym $mod+Shift+c reload
86     # Exit sway (logs you out of your Wayland session)
87     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'
88 #
89 # Moving around:
90 #
91     # Move your focus around
92     bindsym $mod+$left focus left
93     bindsym $mod+$down focus down
94     bindsym $mod+$up focus up
95     bindsym $mod+$right focus right
96     # Or use $mod+[up|down|left|right]
97     bindsym $mod+Left focus left
98     bindsym $mod+Down focus down
99     bindsym $mod+Up focus up
100     bindsym $mod+Right focus right
102     # Move the focused window with the same, but add Shift
103     bindsym $mod+Shift+$left move left
104     bindsym $mod+Shift+$down move down
105     bindsym $mod+Shift+$up move up
106     bindsym $mod+Shift+$right move right
107     # Ditto, with arrow keys
108     bindsym $mod+Shift+Left move left
109     bindsym $mod+Shift+Down move down
110     bindsym $mod+Shift+Up move up
111     bindsym $mod+Shift+Right move right
113 # Workspaces:
115     # Switch to workspace
116     bindsym $mod+1 workspace 1
117     bindsym $mod+2 workspace 2
118     bindsym $mod+3 workspace 3
119     bindsym $mod+4 workspace 4
120     bindsym $mod+5 workspace 5
121     bindsym $mod+6 workspace 6
122     bindsym $mod+7 workspace 7
123     bindsym $mod+8 workspace 8
124     bindsym $mod+9 workspace 9
125     bindsym $mod+0 workspace 10
126     # Move focused container to workspace
127     bindsym $mod+Shift+1 move container to workspace 1
128     bindsym $mod+Shift+2 move container to workspace 2
129     bindsym $mod+Shift+3 move container to workspace 3
130     bindsym $mod+Shift+4 move container to workspace 4
131     bindsym $mod+Shift+5 move container to workspace 5
132     bindsym $mod+Shift+6 move container to workspace 6
133     bindsym $mod+Shift+7 move container to workspace 7
134     bindsym $mod+Shift+8 move container to workspace 8
135     bindsym $mod+Shift+9 move container to workspace 9
136     bindsym $mod+Shift+0 move container to workspace 10
137     # Note: workspaces can have any name you want, not just numbers.
138     # We just use 1-10 as the default.
140 # Layout stuff:
142     # You can "split" the current object of your focus with
143     # $mod+b or $mod+v, for horizontal and vertical splits
144     # respectively.
145     bindsym $mod+b splith
146     bindsym $mod+v splitv
148     # Switch the current container between different layout styles
149     bindsym $mod+s layout stacking
150     bindsym $mod+w layout tabbed
151     bindsym $mod+e layout toggle split
153     # Make the current focus fullscreen
154     bindsym $mod+f fullscreen
156     # Toggle the current focus between tiling and floating mode
157     bindsym $mod+Shift+space floating toggle
159     # Swap focus between the tiling area and the floating area
160     bindsym $mod+space focus mode_toggle
162     # Move focus to the parent container
163     bindsym $mod+a focus parent
165 # Scratchpad:
167     # Sway has a "scratchpad", which is a bag of holding for windows.
168     # You can send windows there and get them back later.
170     # Move the currently focused window to the scratchpad
171     bindsym $mod+Shift+minus move scratchpad
173     # Show the next scratchpad window or hide the focused scratchpad window.
174     # If there are multiple scratchpad windows, this command cycles through them.
175     bindsym $mod+minus scratchpad show
177 # Resizing containers:
179 mode "resize" {
180     # left will shrink the containers width
181     # right will grow the containers width
182     # up will shrink the containers height
183     # down will grow the containers height
184     bindsym $left resize shrink width 10px
185     bindsym $down resize grow height 10px
186     bindsym $up resize shrink height 10px
187     bindsym $right resize grow width 10px
189     # Ditto, with arrow keys
190     bindsym Left resize shrink width 10px
191     bindsym Down resize grow height 10px
192     bindsym Up resize shrink height 10px
193     bindsym Right resize grow width 10px
195     # Return to default mode
196     bindsym Return mode "default"
197     bindsym Escape mode "default"
199 bindsym $mod+r mode "resize"
202 # Status Bar:
204 # Read `man 5 sway-bar` for more information about this section.
205 bar {
206     position top
208     # When the status_command prints a new line to stdout, swaybar updates.
209     # The default just shows the current date and time.
210     status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
212     colors {
213         statusline #ffffff
214         background #323232
215         inactive_workspace #32323200 #32323200 #5c5c5c
216     }
219 include /etc/sway/config.d/*