aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <ddevault@linode.com>2015-08-17 16:49:54 -0400
committerLibravatar Drew DeVault <ddevault@linode.com>2015-08-17 16:50:05 -0400
commit55ad6ca2689a0d859f13fcd1f52e6c9a356bcdee (patch)
treee81729f49fd8fec9a405e3b90f22cbd20ee0087f /config
parentTypo fix and more clarification (diff)
downloadsway-55ad6ca2689a0d859f13fcd1f52e6c9a356bcdee.tar.gz
sway-55ad6ca2689a0d859f13fcd1f52e6c9a356bcdee.tar.zst
sway-55ad6ca2689a0d859f13fcd1f52e6c9a356bcdee.zip
Improve default config
Diffstat (limited to 'config')
-rw-r--r--config234
1 files changed, 122 insertions, 112 deletions
diff --git a/config b/config
index 114aa6bd..154f33ca 100644
--- a/config
+++ b/config
@@ -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
10font pango:DejaVu Sans Mono 8 12
11 13set $mod Mod4 # Logo key. Use Mod1 for Alt.
12# use these keys for focus, movement, and resize directions when reaching for 14set $term urxvt # Your preferred terminal emulator
13# the arrows is not convenient 15set $menu dmenu_run # Your preferred application launcher
14set $up l 16
15set $down k 17### Key bindings
16set $left j 18#
17set $right semicolon 19# Basics:
18 20#
19# use Mouse+Mod1 to drag floating windows to their wanted position 21 # start a terminal
20floating_modifier Mod1 22 bindsym $mod+Return exec urxvt
21 23
22# start a terminal 24 # kill focused window
23bindsym Mod1+Return exec urxvt 25 bindsym $mod+Shift+q kill
24 26
25# kill focused window 27 # start your launcher
26bindsym 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.
29bindsym Mod1+d exec dmenu_run 31 # Resize them with right mouse button + $mod.
30 32 floating_modifier $mod
31# change focus 33
32bindsym Mod1+$left focus left 34 # reload the configuration file
33bindsym Mod1+$down focus down 35 bindsym $mod+Shift+c reload
34bindsym Mod1+$up focus up 36
35bindsym 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
38bindsym Mod1+Left focus left 40 # exit sway (logs you out of your wayland session)
39bindsym Mod1+Down focus down 41 bindsym $mod+Shift+e exit
40bindsym Mod1+Up focus up 42#
41bindsym 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
44bindsym Mod1+Shift+$left move left 46 bindsym $mod+h focus left
45bindsym Mod1+Shift+$down move down 47 bindsym $mod+j focus down
46bindsym Mod1+Shift+$up move up 48 bindsym $mod+k focus up
47bindsym 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
50bindsym Mod1+Shift+Left move left 52 bindsym $mod+Down focus down
51bindsym Mod1+Shift+Down move down 53 bindsym $mod+Up focus up
52bindsym Mod1+Shift+Up move up 54 bindsym $mod+Right focus right
53bindsym 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
56bindsym 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
59bindsym 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
62bindsym 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#
65bindsym Mod1+s layout stacking 67# Workspaces:
66bindsym Mod1+w layout tabbed 68#
67bindsym 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
70bindsym 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
73bindsym 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
76bindsym 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
82bindsym 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
86bindsym 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
89bindsym Mod1+1 workspace 1 91#
90bindsym Mod1+2 workspace 2 92# Layout stuff:
91bindsym Mod1+3 workspace 3 93#
92bindsym Mod1+4 workspace 4 94 # You can "split" the current object of your focus with
93bindsym Mod1+5 workspace 5 95 # $mod+h or $mod+v, for horizontal and vertical splits
94bindsym Mod1+6 workspace 6 96 # respectively.
95bindsym Mod1+7 workspace 7 97 bindsym $mod+h splith
96bindsym Mod1+8 workspace 8 98 bindsym $mod+v splitv
97bindsym Mod1+9 workspace 9 99
98bindsym 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
101bindsym Mod1+Shift+1 move container to workspace 1 103 bindsym $mod+e layout toggle split
102bindsym Mod1+Shift+2 move container to workspace 2 104
103bindsym Mod1+Shift+3 move container to workspace 3 105 # Make the current focus fullscreen
104bindsym Mod1+Shift+4 move container to workspace 4 106 bindsym $mod+f fullscreen
105bindsym Mod1+Shift+5 move container to workspace 5 107
106bindsym Mod1+Shift+6 move container to workspace 6 108 # Toggle the current focus between tiling and floating mode
107bindsym Mod1+Shift+7 move container to workspace 7 109 bindsym $mod+Shift+space floating toggle
108bindsym Mod1+Shift+8 move container to workspace 8 110
109bindsym Mod1+Shift+9 move container to workspace 9 111 # Swap focus between the tiling area and the floating area
110bindsym 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
113bindsym 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#
115bindsym Mod1+Shift+r restart 117# Scratchpad:
116# exit sway (logs you out of your wayland session) 118#
117bindsym 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