summaryrefslogtreecommitdiffstats
path: root/.config/sway
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2024-04-26 18:21:56 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2024-04-27 18:20:11 +0200
commit73af89d935df5a8166114c9257f9f247f29850bf (patch)
treec8addfe86575b030ca5a61644dbc77adb8f63c43 /.config/sway
parent9ca1ae3ceca5944765af94514e75a96195de5716 (diff)
downloaddotfiles-73af89d935df5a8166114c9257f9f247f29850bf.tar.gz
dotfiles-73af89d935df5a8166114c9257f9f247f29850bf.zip
Migrate from stumpwm to sway and from manifests to home-services.
Diffstat (limited to '.config/sway')
-rw-r--r--.config/sway/config193
1 files changed, 193 insertions, 0 deletions
diff --git a/.config/sway/config b/.config/sway/config
new file mode 100644
index 0000000..2807f08
--- /dev/null
+++ b/.config/sway/config
@@ -0,0 +1,193 @@
1set $mod Mod4
2
3set $left h
4set $down j
5set $up k
6set $right l
7
8set $term alacritty
9set $emacs emacsclient -c
10set $menu fuzzel -r0 -b 282828f2 -C 458588f2 -B 3 -s 458588f2 -S 282828FF --font "Terminus:size=12" -p "run: "
11
12set $laptop-display eDP-1
13set $generic-display HDMI-A-1
14set $primary-home-display 'Iiyama North America PLE2407HDSD 0x01010101'
15set $secondary-home-display 'Dell Inc. DELL E190S M8VPV186CELI'
16
17set $primary-display-layout $primary-home-display $generic-display $laptop-display
18set $secondary-display-layout $secondary-home-display $laptop-display
19
20output * bg SPOILER_33.png fill
21
22output $laptop-display resolution 1920x1080 position 1920,0
23output $generic-display resolution 1920x1080 position 0,0
24output $primary-home-display resolution 1920x1080 position 0,0
25output $secondary-home-display resolution 1280x1024 position 1920,0
26set $opacity 0.9
27
28client.focused #002b36 #586e75 #eee8d5 #268bd2
29client.focused_inactive #002b36 #073642 #93a1a1 #268bd2
30client.unfocused #002b36 #073642 #93a1a1 #268bd2
31client.urgent #002b36 #dc322f #fdf6e3 #002b36
32
33input type:keyboard {
34 xkb_layout pl,us
35}
36
37input type:touchpad {
38 tap enabled
39 middle_emulation enabled
40}
41
42bindsym $mod+Shift+s output $laptop-display toggle
43
44set $swaylock 'swaylock -f -c 000000 --font "Terminus"'
45exec swayidle -w \
46 timeout 280 $swaylock \
47 timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
48 before-sleep $swaylock
49
50# inhibit_idle fullscreen
51
52bindsym $mod+Escape exec $swaylock
53
54bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
55bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
56
57bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
58bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
59bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
60
61bindsym XF86AudioNext exec playerctl next
62bindsym XF86AudioPrev exec playerctl previous
63bindsym XF86AudioPlay exec playerctl play-pause
64bindsym XF86AudioPause exec playerctl pause
65
66bindsym print exec grimshot --notify copy area
67bindsym $mod+print exec grimshot --notify copy output
68
69bindsym $mod+Return exec $term
70
71bindsym $mod+Shift+q kill
72
73floating_modifier $mod normal
74
75bindsym $mod+Shift+c reload
76bindsym $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'
77
78bindsym $mod+$left focus left
79bindsym $mod+$down focus down
80bindsym $mod+$up focus up
81bindsym $mod+$right focus right
82
83bindsym $mod+Shift+$left move left
84bindsym $mod+Shift+$down move down
85bindsym $mod+Shift+$up move up
86bindsym $mod+Shift+$right move right
87
88workspace 1 output $primary-display-layout
89workspace 2 output $primary-display-layout
90workspace 3 output $secondary-display-layout
91workspace 4 output $secondary-display-layout
92workspace 9 output $primary-display-layout
93workspace 10 output $secondary-display-layout
94
95bindsym $mod+1 workspace number 1
96bindsym $mod+2 workspace number 2
97bindsym $mod+3 workspace number 3
98bindsym $mod+4 workspace number 4
99bindsym $mod+5 workspace number 5
100bindsym $mod+6 workspace number 6
101bindsym $mod+7 workspace number 7
102bindsym $mod+8 workspace number 8
103bindsym $mod+9 workspace number 9
104bindsym $mod+0 workspace number 10
105
106bindsym $mod+Shift+1 move container to workspace number 1
107bindsym $mod+Shift+2 move container to workspace number 2
108bindsym $mod+Shift+3 move container to workspace number 3
109bindsym $mod+Shift+4 move container to workspace number 4
110bindsym $mod+Shift+5 move container to workspace number 5
111bindsym $mod+Shift+6 move container to workspace number 6
112bindsym $mod+Shift+7 move container to workspace number 7
113bindsym $mod+Shift+8 move container to workspace number 8
114bindsym $mod+Shift+9 move container to workspace number 9
115bindsym $mod+Shift+0 move container to workspace number 10
116
117assign [app_id="(firefox-default|qutebrowser|Chromium-browser)"] 2
118assign [instance="(chromium-browser)"] 2
119assign [instance="(spotify)"] 3
120assign [app_id=".blueman-manager-real"] 3
121assign [app_id="pavucontrol"] 3
122assign [app_id="(org.telegram.desktop)"] 4
123assign [app_id="vesktop"] 4
124assign [app_id="com.ktechpit.whatsie"] 4
125assign [instance="(discord)"] 4
126
127for_window [app_id="vesktop"] opacity $opacity
128
129
130bindsym $mod+b splith
131bindsym $mod+v splitv
132
133bindsym $mod+s layout stacking
134bindsym $mod+w layout tabbed
135bindsym $mod+e layout toggle split
136
137bindsym $mod+f fullscreen
138bindsym $mod+Shift+space floating toggle
139bindsym $mod+space focus mode_toggle
140bindsym $mod+a focus parent
141
142bindsym $mod+Shift+minus move scratchpad
143bindsym $mod+minus scratchpad show
144
145mode "resize" {
146 bindsym $left resize shrink width 10px
147 bindsym $down resize grow height 10px
148 bindsym $up resize shrink height 10px
149 bindsym $right resize grow width 10px
150
151 bindsym Return mode "default"
152 bindsym Control+g mode "default"
153 bindsym Escape mode "default"
154}
155bindsym $mod+r mode "resize"
156
157set $default swaymsg mode default
158mode "menu" {
159 bindsym --no-repeat e exec '$default; $emacs;'
160 bindsym --no-repeat w exec "$default; whois-at-hsp -n"
161
162 bindsym Return mode "default"
163 bindsym Control+g mode "default"
164 bindsym Escape mode "default"
165
166}
167bindsym $mod+o mode "menu"
168
169
170workspace_layout tabbed
171
172default_border normal 3
173gaps outer 0
174gaps inner 6
175font Terminus (TTF) 12
176corner_radius 4
177blur_xray disable
178blur enable
179layer_effects "waybar" blur enable
180bindsym $mod+p exec $menu
181
182
183# Taken from dawivil dotfiles.
184exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
185
186# exec udiskie -t
187exec mako --font "Terminus (TTF)" --outer-margin=5 --margin=3 --border-size=3 --default-timeout=7000 --background="#282828e0"
188
189exec nm-applet --indicator
190exec blueman-applet
191exec waybar
192exec udiskie -t
193exec wlsunset -l 51.919438 -L 19.145136