-
Notifications
You must be signed in to change notification settings - Fork 1
/
config
218 lines (184 loc) · 7.82 KB
/
config
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
###############################################################################
# Variables
###############################################################################
set $configDir $CHACHI_PATH/home/.config/sway
set $seniore $CHACHI_PATH/seniore/target/release/seniore
set $mod Mod4
set $term wezterm
set $browser firefox
set $appMenu $configDir/sway-menu-apps
set $fileMenu $configDir/sway-menu-files
set $powerMenu $configDir/sway-menu-power
set $emojiMenu $configDir/sway-menu-emoji
set $lock $configDir/sway-lock-screen
set $notifyBrightness notify-send -t 1000 "$($seniore linux get-brightness)"
set $notifyVolume notify-send -t 1000 "$($seniore linux get-volume)"
set $gnome-schema org.gnome.desktop.interface
set $screenLaptop eDP-1
###############################################################################
# Key bindings
###############################################################################
bindsym $mod+d exec $appMenu
bindsym $mod+Shift+d exec $powerMenu
bindsym $mod+e exec $fileMenu
bindsym $mod+Shift+e exec $emojiMenu
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $browser
bindsym $mod+a focus parent
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+s sticky toggle
bindsym $mod+Shift+f floating toggle
floating_modifier $mod normal
bindsym $mod+f fullscreen
bindsym $mod+r mode "resize"
mode "resize" {
bindsym Left resize shrink width 128px
bindsym Down resize grow height 128px
bindsym Up resize shrink height 128px
bindsym Right resize grow width 128px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && $notifyVolume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && $notifyVolume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessDown exec brightnessctl set 10%- && $notifyBrightness
bindsym XF86MonBrightnessUp exec brightnessctl set +10% && $notifyBrightness
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym Print exec grim -g "$(slurp)" - | swappy -f -
bindsym Ctrl+Print exec $term --class record_screen -e $configDir/sway-record-gif
bindsym Shift+Print exec $term --class record_screen -e $configDir/sway-record-screen
bindsym Shift+Ctrl+Print exec $term --class record_screen -e $configDir/sway-record-screen-with-audio
bindsym Alt+Print exec $term --class record_screen -e $configDir/sway-record-stop
bindsym $mod+l exec $lock
bindsym $mod+h exec notify-send "$(cat $configDir/sway.keybindings.txt)"
bindsym $mod+m exec $CHACHI_PATH/seniore/target/release/seniore linux screen-layout only
bindsym $mod+Shift+m exec $CHACHI_PATH/seniore/target/release/seniore linux screen-layout disabled
bindsym $mod+Ctrl+Shift+Left exec $CHACHI_PATH/seniore/target/release/seniore linux screen-layout left
bindsym $mod+Ctrl+Shift+Right exec $CHACHI_PATH/seniore/target/release/seniore linux screen-layout right
bindsym $mod+Ctrl+Shift+Down exec $CHACHI_PATH/seniore/target/release/seniore linux screen-layout down
bindsym $mod+Ctrl+1 exec /usr/bin/powerprofilesctl set performance
bindsym $mod+Ctrl+2 exec /usr/bin/powerprofilesctl set balanced
bindsym $mod+Ctrl+3 exec /usr/bin/powerprofilesctl set power-saver
###############################################################################
# Behaviour
###############################################################################
focus_follows_mouse no
input type:keyboard {
xkb_layout es,us
}
input type:touchpad {
dwt enabled
tap enabled
natural_scroll enabled
}
# Disable screen laptop on close
bindswitch --reload --locked lid:on output $screenLaptop disable
bindswitch --reload --locked lid:off output $screenLaptop enable
###############################################################################
# Other programs
###############################################################################
# Screen autolock
exec swayidle before-sleep 'exec $lock'
# Ensure that this env variables exist and are imported into dbus to enable screen sharing
exec systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
exec dbus-update-activation-environment WAYLAND_DISPLAY
# Start sway session
exec_always systemctl --user start chachi-sway-session.target
###############################################################################
# UI
###############################################################################
seat seat0 xcursor_theme default 48
default_border pixel 2
default_floating_border normal
hide_edge_borders none
smart_borders off
smart_gaps off
gaps inner 12
gaps outer 0
for_window {
[app_id="com.github.rafostar.Clapper"] floating enable, sticky enable
[app_id="eog"] floating enable
[app_id="org.gnome.Nautilus"] floating enable
[app_id="pavucontrol"] floating enable
[app_id="pcmanfm"] floating enable
[app_id="record_screen"] floating enable, move workspace $ws10
[class="jetbrains-(.*)" title="Welcome to IntelliJ IDEA"] floating enable
[class="jetbrains-(.*)" title="win0"] floating enable
[title="Firefox — Sharing Indicator"] floating enable, resize set height 30 px, resize set width 90 px
[title="Picture in picture"] floating enable, sticky enable
[title="Picture-in-Picture"] floating enable, sticky enable
[window_type="dialog"] floating enable
[window_type="dropdown_menu"] floating enable
[window_type="menu"] floating enable
[window_type="notification"] floating enable
[window_type="popup_menu"] floating enable
[window_type="splash"] floating enable
[window_type="toolbar"] floating enable
[window_type="tooltip"] floating enable
[window_type="utility"] floating enable
}
output * {
bg ~/.background.jpg fill
}
client.background #000000ff #000000ff #000000ff
# class border background text indicator child_border
client.focused #000000ff #000000ff #ffffffff #000000ff #000000ff
client.focused_inactive #00000066 #00000066 #ffffffff #00000066 #00000066
client.unfocused #00000066 #00000066 #ffffffff #00000066 #00000066
client.urgent #FF573366 #00000066 #ffffffff #00000066 #00000066
font pango:ZedMono Nerd Font 9
exec_always {
gsettings set $gnome-schema gtk-theme 'Adwaita'
gsettings set $gnome-schema icon-theme 'Adwaita'
gsettings set $gnome-schema cursor-theme 'Adwaita'
gsettings set $gnome-schema font-antialiasing 'grayscale'
gsettings set $gnome-schema font-hinting 'slight'
gsettings set $gnome-schema font-name 'Fira Sans Regular 10'
gsettings set $gnome-schema monospace-font-name 'ZedMono Nerd Font 9'
}
bar {
swaybar_command waybar
}