summaryrefslogtreecommitdiffstats
path: root/config
blob: b6601d352312772b541d8c2c5540d6da6780481d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# Logo key. Use Mod1 for Alt, Mod4 for Super/Windows
set $mod Mod4

# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l

set $term sakura
set $browser firefox
set $lock swaylock -f -i /home/sre/data/locked.jpg
set $menu dmenu_path | dmenu | xargs swaymsg exec

# Output configuration (default wallpaper for all displays)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
output eDP-1 bg /home/sre/data/wallpapers/Yannix_-_debian-ng_black.jpg fill

# notification-daemon
exec mako

# auto-lock after one day (used to provide locking capabilities)
exec swayidle -w \
         timeout 86400 "$lock" \
         timeout 86400 'swaymsg "output * dpms off"' \
              resume 'swaymsg "output * dpms on"' \
         before-sleep "$lock"

# configure all input devices for German and nodeadkeys
input * {
	xkb_layout de
	xkb_variant nodeadkeys
}

# Disable touchscreen (Non RMI driver)
input 2:7:SynPS/2_Synaptics_TouchPad {
	events disabled
}

# Disable touchscreen (RMI driver)
input 1739:0:Synaptics_TM3075-002 {
	events disabled
}

### Key bindings
bindsym $mod+Return exec $term
bindsym Mod1+F2 exec $menu

# reload the configuration file
bindsym $mod+Shift+c reload

# Lock Screen
bindsym Mod4+Mod1+l exec "$lock"

bindsym XF86AudioMute exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler volumeMute
bindsym XF86AudioLowerVolume exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler volumeDec
bindsym XF86AudioRaiseVolume exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler volumeInc
bindsym XF86AudioMicMute exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler micMute

bindsym XF86AudioPlay exec /usr/local/bin/xf86-mpv play
bindsym XF86AudioPause exec /usr/local/bin/xf86-mpv play

bindsym XF86MonBrightnessDown exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler backlightDec
bindsym XF86MonBrightnessUp exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler backlightInc
bindsym XF86Display exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler XF86Display
bindsym XF86WLAN exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler WLAN

bindsym XF86Tools exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler XF86Tools
bindsym XF86Search exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler XF86Search
bindsym XF86LaunchA exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler XF86LaunchA
bindsym XF86Explorer exec busctl --user call org.elektranox.keyhandler /org/elektranox/keyhandler org.elektranox.keyhandler XF86Explorer

# kill focused window
bindsym $mod+Shift+q kill

# 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 Mod1 normal

# exit sway (logs you out of your Wayland session)
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'

# 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

# switch to workspace
bindsym $mod+F1 workspace 1
bindsym $mod+F2 workspace 2
bindsym $mod+F3 workspace 3
bindsym $mod+F4 workspace 4
bindsym $mod+F5 workspace 5
bindsym $mod+F6 workspace 6
bindsym $mod+F7 workspace 7
bindsym $mod+F8 workspace 8
bindsym $mod+F9 workspace 9
bindsym $mod+F10 workspace 10

# move focused container to workspace
bindsym $mod+Shift+F1 move container to workspace 1
bindsym $mod+Shift+F2 move container to workspace 2
bindsym $mod+Shift+F3 move container to workspace 3
bindsym $mod+Shift+F4 move container to workspace 4
bindsym $mod+Shift+F5 move container to workspace 5
bindsym $mod+Shift+F6 move container to workspace 6
bindsym $mod+Shift+F7 move container to workspace 7
bindsym $mod+Shift+F8 move container to workspace 8
bindsym $mod+Shift+F9 move container to workspace 9
bindsym $mod+Shift+F10 move container to workspace 10

# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.

# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv

# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# Make the current focus fullscreen
bindsym $mod+f fullscreen

# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+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+a focus parent

# 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+minus 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+minus 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"

# Status Bar (`man 5 sway-bar`)
bar {
    position top
	pango_markup enabled

    # When the status_command prints a new line to stdout, swaybar updates.
    # The default just shows the current date and time.
    status_command while /usr/local/bin/swaystatus; do sleep 10; done

	try {

	}

    colors {
        statusline #ffffff
        background #323232
        inactive_workspace #32323200 #32323200 #5c5c5c
    }
}

for_window [title="wl-clipboard"] floating enable

# mpv in X
for_window [class=mpv] floating enable

# mpv in Wayland
for_window [app_id="mpv"] floating enable

include /etc/sway/config.d/*