diff options
Diffstat (limited to 'config')
-rw-r--r-- | config | 234 |
1 files changed, 122 insertions, 112 deletions
@@ -1,117 +1,127 @@ | |||
1 | # Default config for sway | 1 | # Default config for sway |
2 | # | 2 | # |
3 | # Copy this to ~/.config/sway/config and edit it to your liking. | ||
4 | # | ||
3 | # Sway is a work in progress implementation of i3 for wayland. | 5 | # Sway is a work in progress implementation of i3 for wayland. |
4 | # Note that some of these defaults may be unimplemented. | 6 | # Note that some of these defaults may be unimplemented. |
5 | # | 7 | # |
6 | # Please see http://i3wm.org/docs/userguide.html for a complete reference! | 8 | # Please see http://i3wm.org/docs/userguide.html for a (more) complete reference! |
7 | 9 | ||
8 | # Font for window titles. Will also be used by the bar unless a different font | 10 | |
9 | # is used in the bar {} block below. | 11 | ### Variables |
10 | font pango:DejaVu Sans Mono 8 | 12 | |
11 | 13 | set $mod Mod4 # Logo key. Use Mod1 for Alt. | |
12 | # use these keys for focus, movement, and resize directions when reaching for | 14 | set $term urxvt # Your preferred terminal emulator |
13 | # the arrows is not convenient | 15 | set $menu dmenu_run # Your preferred application launcher |
14 | set $up l | 16 | |
15 | set $down k | 17 | ### Key bindings |
16 | set $left j | 18 | # |
17 | set $right semicolon | 19 | # Basics: |
18 | 20 | # | |
19 | # use Mouse+Mod1 to drag floating windows to their wanted position | 21 | # start a terminal |
20 | floating_modifier Mod1 | 22 | bindsym $mod+Return exec urxvt |
21 | 23 | ||
22 | # start a terminal | 24 | # kill focused window |
23 | bindsym Mod1+Return exec urxvt | 25 | bindsym $mod+Shift+q kill |
24 | 26 | ||
25 | # kill focused window | 27 | # start your launcher |
26 | bindsym Mod1+Shift+q kill | 28 | bindsym $mod+d exec $menu |
27 | 29 | ||
28 | # start dmenu (a program launcher) | 30 | # Drag floating windows by holding down $mod and left mouse button. |
29 | bindsym Mod1+d exec dmenu_run | 31 | # Resize them with right mouse button + $mod. |
30 | 32 | floating_modifier $mod | |
31 | # change focus | 33 | |
32 | bindsym Mod1+$left focus left | 34 | # reload the configuration file |
33 | bindsym Mod1+$down focus down | 35 | bindsym $mod+Shift+c reload |
34 | bindsym Mod1+$up focus up | 36 | |
35 | bindsym Mod1+$right focus right | 37 | # restart sway inplace (preserves your layout/session, can be used to upgrade sway) |
36 | 38 | bindsym $mod+Shift+r restart | |
37 | # alternatively, you can use the cursor keys: | 39 | |
38 | bindsym Mod1+Left focus left | 40 | # exit sway (logs you out of your wayland session) |
39 | bindsym Mod1+Down focus down | 41 | bindsym $mod+Shift+e exit |
40 | bindsym Mod1+Up focus up | 42 | # |
41 | bindsym Mod1+Right focus right | 43 | # Moving around: |
42 | 44 | # | |
43 | # move focused window | 45 | # Move your focus around with $mod+[h|j|k|l], like vim |
44 | bindsym Mod1+Shift+$left move left | 46 | bindsym $mod+h focus left |
45 | bindsym Mod1+Shift+$down move down | 47 | bindsym $mod+j focus down |
46 | bindsym Mod1+Shift+$up move up | 48 | bindsym $mod+k focus up |
47 | bindsym Mod1+Shift+$right move right | 49 | bindsym $mod+l focus right |
48 | 50 | # or use $mod+[up|down|left|right] | |
49 | # alternatively, you can use the cursor keys: | 51 | bindsym $mod+Left focus left |
50 | bindsym Mod1+Shift+Left move left | 52 | bindsym $mod+Down focus down |
51 | bindsym Mod1+Shift+Down move down | 53 | bindsym $mod+Up focus up |
52 | bindsym Mod1+Shift+Up move up | 54 | bindsym $mod+Right focus right |
53 | bindsym Mod1+Shift+Right move right | 55 | |
54 | 56 | # _move_ the focused window with the same, but add Shift | |
55 | # split in horizontal orientation | 57 | bindsym $mod+Shift+h move left |
56 | bindsym Mod1+h splith | 58 | bindsym $mod+Shift+j move down |
57 | 59 | bindsym $mod+Shift+k move up | |
58 | # split in vertical orientation | 60 | bindsym $mod+Shift+l move right |
59 | bindsym Mod1+v splitv | 61 | # ditto, with arrow keys |
60 | 62 | bindsym $mod+Shift+Left move left | |
61 | # enter fullscreen mode for the focused container | 63 | bindsym $mod+Shift+Down move down |
62 | bindsym Mod1+f fullscreen | 64 | bindsym $mod+Shift+Up move up |
63 | 65 | bindsym $mod+Shift+Right move right | |
64 | # change container layout (stacked, tabbed, toggle split) | 66 | # |
65 | bindsym Mod1+s layout stacking | 67 | # Workspaces: |
66 | bindsym Mod1+w layout tabbed | 68 | # |
67 | bindsym Mod1+e layout toggle split | 69 | # switch to workspace |
68 | 70 | bindsym $mod+1 workspace 1 | |
69 | # toggle tiling / floating | 71 | bindsym $mod+2 workspace 2 |
70 | bindsym Mod1+Shift+space floating toggle | 72 | bindsym $mod+3 workspace 3 |
71 | 73 | bindsym $mod+4 workspace 4 | |
72 | # change focus between tiling / floating windows | 74 | bindsym $mod+5 workspace 5 |
73 | bindsym Mod1+space focus mode_toggle | 75 | bindsym $mod+6 workspace 6 |
74 | 76 | bindsym $mod+7 workspace 7 | |
75 | # focus the parent container | 77 | bindsym $mod+8 workspace 8 |
76 | bindsym Mod1+a focus parent | 78 | bindsym $mod+9 workspace 9 |
77 | 79 | bindsym $mod+0 workspace 10 | |
78 | # focus the child container | 80 | # move focused container to workspace |
79 | #bindsym Mod1+d focus child | 81 | bindsym $mod+Shift+1 move container to workspace 1 |
80 | 82 | bindsym $mod+Shift+2 move container to workspace 2 | |
81 | # move the currently focused window to the scratchpad | 83 | bindsym $mod+Shift+3 move container to workspace 3 |
82 | bindsym Mod1+Shift+minus move scratchpad | 84 | bindsym $mod+Shift+4 move container to workspace 4 |
83 | 85 | bindsym $mod+Shift+5 move container to workspace 5 | |
84 | # Show the next scratchpad window or hide the focused scratchpad window. | 86 | bindsym $mod+Shift+6 move container to workspace 6 |
85 | # If there are multiple scratchpad windows, this command cycles through them. | 87 | bindsym $mod+Shift+7 move container to workspace 7 |
86 | bindsym Mod1+minus scratchpad show | 88 | bindsym $mod+Shift+8 move container to workspace 8 |
87 | 89 | bindsym $mod+Shift+9 move container to workspace 9 | |
88 | # switch to workspace | 90 | bindsym $mod+Shift+0 move container to workspace 10 |
89 | bindsym Mod1+1 workspace 1 | 91 | # |
90 | bindsym Mod1+2 workspace 2 | 92 | # Layout stuff: |
91 | bindsym Mod1+3 workspace 3 | 93 | # |
92 | bindsym Mod1+4 workspace 4 | 94 | # You can "split" the current object of your focus with |
93 | bindsym Mod1+5 workspace 5 | 95 | # $mod+h or $mod+v, for horizontal and vertical splits |
94 | bindsym Mod1+6 workspace 6 | 96 | # respectively. |
95 | bindsym Mod1+7 workspace 7 | 97 | bindsym $mod+h splith |
96 | bindsym Mod1+8 workspace 8 | 98 | bindsym $mod+v splitv |
97 | bindsym Mod1+9 workspace 9 | 99 | |
98 | bindsym Mod1+0 workspace 10 | 100 | # Switch the current container between different layout styles |
99 | 101 | bindsym $mod+s layout stacking | |
100 | # move focused container to workspace | 102 | bindsym $mod+w layout tabbed |
101 | bindsym Mod1+Shift+1 move container to workspace 1 | 103 | bindsym $mod+e layout toggle split |
102 | bindsym Mod1+Shift+2 move container to workspace 2 | 104 | |
103 | bindsym Mod1+Shift+3 move container to workspace 3 | 105 | # Make the current focus fullscreen |
104 | bindsym Mod1+Shift+4 move container to workspace 4 | 106 | bindsym $mod+f fullscreen |
105 | bindsym Mod1+Shift+5 move container to workspace 5 | 107 | |
106 | bindsym Mod1+Shift+6 move container to workspace 6 | 108 | # Toggle the current focus between tiling and floating mode |
107 | bindsym Mod1+Shift+7 move container to workspace 7 | 109 | bindsym $mod+Shift+space floating toggle |
108 | bindsym Mod1+Shift+8 move container to workspace 8 | 110 | |
109 | bindsym Mod1+Shift+9 move container to workspace 9 | 111 | # Swap focus between the tiling area and the floating area |
110 | bindsym Mod1+Shift+0 move container to workspace 10 | 112 | bindsym $mod+space focus mode_toggle |
111 | 113 | ||
112 | # reload the configuration file | 114 | # move focus to the parent container |
113 | bindsym Mod1+Shift+c reload | 115 | bindsym $mod+a focus parent |
114 | # restart sway inplace (preserves your layout/session, can be used to upgrade sway) | 116 | # |
115 | bindsym Mod1+Shift+r restart | 117 | # Scratchpad: |
116 | # exit sway (logs you out of your wayland session) | 118 | # |
117 | bindsym Mod1+Shift+e exit | 119 | # Sway has a "scratchpad", which is a bag of holding for windows. |
120 | # You can send windows there and get them back later. | ||
121 | |||
122 | # Move the currently focused window to the scratchpad | ||
123 | bindsym $mod+Shift+minus move scratchpad | ||
124 | |||
125 | # Show the next scratchpad window or hide the focused scratchpad window. | ||
126 | # If there are multiple scratchpad windows, this command cycles through them. | ||
127 | bindsym $mod+minus scratchpad show | ||