~eduardo_quiros/dotfiles

dotfiles/.config/sway/config -rw-r--r-- 6.1 KiB
992a4865Eduardo Quiros bin/live: add option to display list of streamers 6 days ago
                                                                                
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
222
223
224
225
226
227
# Variables
set {
    $mod Mod4
    $left h
    $down j
    $up k
    $right l
    $menu rofi -show run | xargs swaymsg exec
    $desktop exec rofi -show drun | xargs swaymsg exec
	$lock exec swaylock
}
######### Output configuration ############
#### Wallpaper ###
output * bg ~/.local/share/background-image fill

### Idle configuration ###

exec swayidle -w \
	timeout 300 '$lock' \
	timeout 600 'swaymsg "output * dpms off"' \
	resume 'swaymsg "output * dpms on"' \
	before-sleep '$lock'

#### Input configuration ####

#### Key bindings ####

bindsym {
	$mod+Return exec $TERMINAL #Launch Terminal
	$mod+Shift+e exec emacsclient -c
	$mod+F7 exec emoji
	$mod+F11 exec live
	$mod+m exec $TERMINAL -e $MUSIC
	$mod+z exec gopassmenu
	$mod+Shift+z exec gopassmenu otp
	$mod+q kill #Kill container
	$mod+d exec $menu #Launch wofi in command mode
	$mod+Shift+d exec $desktop #Launch wofi in desktop mode
	$mod+x exec $lock #Lock screen
	$mod+Shift+x exec amixer sset Master toggle && $lock
    # Move your focus around
	$mod+$left focus left
	$mod+$down focus down
	$mod+$up focus up
	$mod+$right focus right
    # or use $mod+[up|down|left|right]
	$mod+Left focus left
	$mod+Down focus down
	$mod+Up focus up
	$mod+Right focus right
    # _move_ the focused window with the same, but add Shift
	$mod+Shift+$left move left
	$mod+Shift+$down move down
	$mod+Shift+$up move up
	$mod+Shift+$right move right
    # ditto, with arrow keys
	$mod+Shift+Left move left
	$mod+Shift+Down move down
	$mod+Shift+Up move up
	$mod+Shift+Right move right
	$mod+c exec $TERMINAL -e $CALC

	$mod+p sticky toggle
}
floating_modifier $mod normal
#
# Moving around:
#
	bindsym $mod+Shift+q 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' # exit sway (logs you out of your Wayland session)
#
# Workspaces:
#
    # switch to workspace
    bindsym $mod+1 workspace 1
    bindsym $mod+2 workspace 2
    bindsym $mod+3 workspace 3
    bindsym $mod+4 workspace 4
    bindsym $mod+5 workspace 5
    bindsym $mod+6 workspace 6
    bindsym $mod+7 workspace 7
    bindsym $mod+8 workspace 8
    bindsym $mod+9 workspace 9
    bindsym $mod+0 workspace 10
    # move focused container to workspace
    bindsym $mod+Shift+1 move container to workspace 1
    bindsym $mod+Shift+2 move container to workspace 2
    bindsym $mod+Shift+3 move container to workspace 3
    bindsym $mod+Shift+4 move container to workspace 4
    bindsym $mod+Shift+5 move container to workspace 5
    bindsym $mod+Shift+6 move container to workspace 6
    bindsym $mod+Shift+7 move container to workspace 7
    bindsym $mod+Shift+8 move container to workspace 8
    bindsym $mod+Shift+9 move container to workspace 9
    bindsym $mod+Shift+0 move container to workspace 10
    # Note: workspaces can have any name you want, not just numbers.
    # We just use 1-10 as the default.
    #
    # Switch back and forth between workspaces.
    bindsym $mod+Tab workspace back_and_forth
	bindsym Mod1+Tab focus child
#
# Layout stuff:
#
    bindsym $mod+t splitt

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

    # Toggle the current focus between tiling and floating mode
    bindsym $mod+Shift+f floating toggle

    # Swap focus between the tiling area and the floating area
	bindsym $mod+Shift+space focus mode_toggle

# Launchers:

	#FeedReader
	bindsym $mod+n exec $TERMINAL -e newsboat

	#Launch mail client:
	bindsym $mod+e exec $TERMINAL -e $MAIL

	#Launch sys monitor:
	bindsym $mod+i exec $TERMINAL -e $MONITOR

	#Launch web browser:
	bindsym $mod+Shift+w exec $BROWSER
	bindsym $mod+w exec tor-browser

	#Launch file browser:
	bindsym $mod+r exec $TERMINAL -e $FILE

	#Launch nmtui
	bindsym $mod+F12 exec $TERMINAL -e nmtui

	#Brightness
	bindsym XF86MonBrightnessDown exec brightnessctl s 5%-
	bindsym XF86MonBrightnessUp exec brightnessctl s +5%

	#Audio
	bindsym --locked {
		$mod+a exec $TERMINAL -e pulsemixer
		XF86AudioMute exec amixer sset Master toggle
		XF86AudioRaiseVolume exec amixer sset Master 5%+
		XF86AudioLowerVolume exec amixer sset Master 5%-
		XF86AudioPlay exec mpc toggle
		XF86AudioStop exec mpc stop
		XF86AudioNext exec mpc next
		XF86AudioPrev exec mpc prev

	}

	# Bleh
	bindsym XF86Calculator exec $TERMINAL -e $CALC

	# Toggle transmission-daemon
	bindsym $mod+F6 exec transmission-toggle

# Scratchpad:

    # 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

# Screenshots:
bindsym {
	Print exec wlss # grimshot --notify window | swappy -
	Shift+Print exec grimshot --notify save window ~/Pictures/screenshots/$(date --iso-8601=ns).png
	$mod+Print exec share
	$mod+Shift+Print exec pkill wf-recorder
	#Control+Shift+Print exec mpv av://v4l2:/dev/video0
}


# Resizing containers:
mode "resize" {
    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+Shift+r mode "resize"


# Status Bar:
bar {
    font pango:DejaVu Sans Mono, FontAwesome 12
    position top
    status_command i3status-rs ~/.config/i3/status.toml
}

# Windows
default_border pixel #alters window borders (normal,pixel,none)

#smart_gaps on # Maximizes size of window when it is the only window in a workspace
bindsym $mod+s gaps outer current plus 5
bindsym $mod+Shift+s gaps outer current minus 5

# Autostart
exec {
	mako
	udiskie
	emacs --daemon
	pipewire
	syncthing
	transmission-daemon
	gammastep -l geoclue2
	jellyfin
}

include ~/.config/sway/`hostname`