summaryrefslogtreecommitdiff
path: root/dot_config/sway
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/sway')
-rw-r--r--dot_config/sway/config183
1 files changed, 183 insertions, 0 deletions
diff --git a/dot_config/sway/config b/dot_config/sway/config
new file mode 100644
index 0000000..bdb65bd
--- /dev/null
+++ b/dot_config/sway/config
@@ -0,0 +1,183 @@
1xwayland enable
2
3
4# Layout configuration
5input * {
6 xkb_layout us,ru
7 xkb_variant altgr-intl,
8 xkb_options grp:shifts_toggle,ctrl:nocaps
9}
10
11
12# General settings:
13set $mod Mod4
14floating_modifier $mod normal
15bindsym --to-code $mod+Shift+r reload
16
17
18# Launching external applications:
19set $pass passmenu
20bindsym --to-code $mod+p exec $pass -ip "Copy pass: " -l 10
21bindsym --to-code $mod+Shift+p exec $pass --name -ip "Copy name: " -l 10
22bindsym --to-code $mod+Alt+p exec $pass --type -ip "Type pass: " -l 10
23bindsym --to-code $mod+Alt+Shift+p exec $pass --type --name -ip "Type name: " -l 10
24
25set $power-menu powermenu -ip "Power: "
26bindsym --to-code $mod+Shift+q exec $power-menu
27bindsym --to-code $mod+Control+q exec $power-menu
28
29set $term emacsclient --create-frame --quiet
30set $emacs emacs --background black
31set $backup-term foot
32bindsym $mod+Return exec $term
33bindsym $mod+Shift+Return exec $emacs
34bindsym $mod+Control+Shift+Return exec $backup-term
35
36set $menu menu-drun -ip "Run: "
37set $lock lock
38bindsym --to-code $mod+Shift+d exec $menu
39bindsym --to-code $mod+Shift+l exec $lock
40bindsym --to-code $mod+Control+d exec $menu
41bindsym --to-code $mod+Control+l exec $lock
42
43bindsym --to-code $mod+Control+n exec menu-network
44
45
46# Manipulating windows:
47bindsym --to-code $mod+Shift+c kill
48bindsym --to-code $mod+Shift+f fullscreen
49bindsym --to-code $mod+Control+c kill
50
51bindsym $mod+Shift+space floating toggle
52bindsym $mod+Ctrl+space focus mode_toggle
53
54bindsym $mod+Left focus left
55bindsym $mod+Down focus down
56bindsym $mod+Up focus up
57bindsym $mod+Right focus right
58
59bindsym $mod+Shift+Left move left
60bindsym $mod+Shift+Down move down
61bindsym $mod+Shift+Up move up
62bindsym $mod+Shift+Right move right
63
64bindsym $mod+Control+b focus left
65bindsym $mod+Control+n focus down
66bindsym $mod+Control+p focus up
67bindsym $mod+Control+f focus right
68
69bindsym $mod+Control+Shift+b move left
70bindsym $mod+Control+Shift+n move down
71bindsym $mod+Control+Shift+p move up
72bindsym $mod+Control+Shift+f move right
73
74
75# Moving around workspaces:
76
77bindsym $mod+tab workspace back_and_forth
78bindsym $mod+Control+i workspace back_and_forth
79
80bindsym $mod+1 workspace number 1
81bindsym $mod+2 workspace number 2
82bindsym $mod+3 workspace number 3
83bindsym $mod+4 workspace number 4
84bindsym $mod+5 workspace number 5
85bindsym $mod+6 workspace number 6
86bindsym $mod+7 workspace number 7
87bindsym $mod+8 workspace number 8
88bindsym $mod+9 workspace number 9
89bindsym $mod+0 workspace number 10
90
91bindsym $mod+Shift+1 move container to workspace number 1
92bindsym $mod+Shift+2 move container to workspace number 2
93bindsym $mod+Shift+3 move container to workspace number 3
94bindsym $mod+Shift+4 move container to workspace number 4
95bindsym $mod+Shift+5 move container to workspace number 5
96bindsym $mod+Shift+6 move container to workspace number 6
97bindsym $mod+Shift+7 move container to workspace number 7
98bindsym $mod+Shift+8 move container to workspace number 8
99bindsym $mod+Shift+9 move container to workspace number 9
100bindsym $mod+Shift+0 move container to workspace number 10
101
102
103# Scratchpad settings:
104bindsym --to-code $mod+Shift+minus move scratchpad
105bindsym --to-code $mod+minus scratchpad show
106
107
108# Other:
109
110bindsym $mod+Control+t exec emacsclient -e "(modus-themes-toggle)"
111
112default_border pixel
113default_floating_border pixel
114gaps inner 4
115exec gpg-connect-agent updatestartuptty /bye >/dev/null
116# exec pipewire
117exec --no-startup-id udiskie -s
118exec --no-startup-id $emacs
119exec --no-startup-id swayidle -w
120exec_always --no-startup-id mako
121
122# toggle waybar
123# bindsym $mod+o exec killall -SIGUSR1 waybar
124
125bindsym --locked XF86AudioRaiseVolume \
126 exec pactl set-sink-mute @DEFAULT_SINK@ false; \
127 exec pactl set-sink-volume @DEFAULT_SINK@ +5%
128bindsym --locked XF86AudioLowerVolume \
129 exec pactl set-sink-mute @DEFAULT_SINK@ false; \
130 exec pactl set-sink-volume @DEFAULT_SINK@ -5%
131bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
132bindsym --locked XF86AudioMicMute \
133 exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
134bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
135bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
136
137output LVDS-1 pos 0 0 res 1366x768
138output VGA-1 pos 1366 0 res 1024x768
139# output * adaptive_sync on # this may be good, test it
140bindswitch --reload --locked lid:on exec swaylock
141bindsym $mod+Shift+o [floating] kill
142input 6700:66:SEMICCHIP_Usb_Mouse {
143 pointer_accel 0.0
144 accel_profile flat
145}
146input 6127:24647:Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint {
147 pointer_accel -0.6
148 repeat_delay 150
149 repeat_rate 60
150}
151input type:keyboard {
152 repeat_delay 150
153 repeat_rate 60
154}
155input type:touchpad {
156 natural_scroll enabled
157 tap enabled
158}
159
160bindsym $mod+Alt+s exec sway-swappy-clipboard
161bindsym $mod+Shift+s exec sway-shot-window-or-selection
162
163bindsym $mod+Print exec sway-shot-output
164bindsym $mod+Alt+Print exec sway-swappy-clipboard
165bindsym XF86SelectiveScreenshot exec sway-shot-window-or-selection
166bindsym $mod+Shift+Print exec sway-shot-window-or-selection
167bindsym $mod+Control+Print exec toggle-screen-capture output
168bindsym $mod+Shift+Control+Print exec toggle-screen-capture window
169
170bindsym $mod+Control+s exec spotlight
171
172# bindsym --to-code XF86NotificationCenter exec toggle dunst
173
174bar swaybar_command waybar
175
176for_window [title=".* - Emacs Client"] floating enable
177for_window [title="cmatrix"] floating enable
178for_window [app_id="wdisplays"] floating enable
179for_window [app_id="iwgtk"] floating enable
180for_window [app_id="mpv"] floating enable
181
182smart_borders on
183smart_gaps on