generated from 2KAbhishek/bare-minimum
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefinitions.conf
164 lines (135 loc) Β· 7.38 KB
/
definitions.conf
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
### Variables
#
# Logo key. Use Mod1 for Alt and Mod4 for Super.
set $mod Mod4
set $alt_mod Mod1
# Direction keys
set $left Left
set $down Down
set $up Up
set $right Right
# Alternative direction keys
set $left_alt h
set $down_alt j
set $up_alt k
set $right_alt l
# Add --to-code to bindsym, support for non-latin layouts
set $bindsym bindsym --to-code
# For user's convenience, the same for unbindsym
set $unbindsym unbindsym --to-code
# background
set $background $HOME/.config/sway/images/wallpaper.jpg
# once-script
set $once $HOME/.config/sway/scripts/once.sh
# Your preferred terminal emulator
set $term $HOME/.config/sway/scripts/foot.sh
set $term_cwd $term -D "$(swaycwd 2>/dev/null || echo $HOME)"
set $term_float footclient --app-id floating_shell --window-size-chars 120x40
set $term_float_large footclient --app-id floating_shell --window-size-chars 165x55
# Your preferred apps
set $browser qutebrowser
set $camera guvcview
# onscreen bar
set $onscreen_bar $HOME/.config/sway/scripts/wob.sh "$accent-color" "$background-color"
# brightness control
set $brightness $HOME/.config/sway/scripts/brightness.sh
set $brightness_up $brightness up | $onscreen_bar
set $brightness_down $brightness down | $onscreen_bar
# scaling
set $scale_up $HOME/.config/sway/scripts/scale.sh up
set $scale_down $HOME/.config/sway/scripts/scale.sh down
# audio control
set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
set $volume_down $onscreen_bar $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume)
set $volume_up $onscreen_bar $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume)
set $volume_mute $onscreen_bar $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p")
set $mic_mute $onscreen_bar $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p")
# clipboard history
set $clipboard cliphist list | rofi -dmenu -font "$gui-font" -p "Select item to copy" -lines 10 -width 35 | cliphist decode | wl-copy
set $clipboard-del cliphist list | rofi -dmenu -font "$gui-font" -p "Select item to delete" -lines 10 -width 35 | cliphist delete
# zeit tracking
set $zeit_list zeit list --only-projects-and-tasks --append-project-id-to-task | \
rofi -dmenu -font "$gui-font" -p "Select task to track" -lines 10 -width 35 | \
$HOME/.config/sway/scripts/zeit.sh track && \
pkill -RTMIN+10 waybar
# Your preferred application launcher
set $menu rofi -show combi -combi-modi "drun,run" -terminal $term -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -run-shell-command "{terminal} {cmd}" -show-icons -font "$gui-font" -lines 10 -width 35
### Lockscreen configuration
set $locking swaylock --daemonize --color "$selection-color" --inside-color "$selection-color" --inside-clear-color "$text-color" --ring-color "$color2" --ring-clear-color "$color11" --ring-ver-color "$color13" --show-failed-attempts --fade-in 0.2 --grace 2 --effect-vignette 0.5:0.5 --effect-blur 7x5 --ignore-empty-password --screenshots --clock
# bluetooth menu
set $bluetooth $once $term_float bluetuith
### Idle configuration
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
#
set $idle_timeout 240
set $locking_timeout 300
set $screen_timeout 600
set $sleep_timeout 900
set $sleep_delay 2
set $swayidle swayidle -w \
timeout $idle_timeout 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)' \
timeout $locking_timeout 'exec $locking' \
timeout $screen_timeout 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
timeout $sleep_timeout 'swaymsg "output * dpms on"; sleep $sleep_delay; systemctl suspend' \
before-sleep 'playerctl pause' \
before-sleep 'exec $locking & sleep $sleep_delay'
# statusbar command
set $statusbar waybar
set $waybar_position top
# pulseaudio command
set $pulseaudio $term_float pulsemixer
# help command
set $help $HOME/.config/sway/scripts/help.sh --toggle
# calendar application
set $calendar $term_float calcurse
# workspace names
set $ws1 number 1
set $ws2 number 2
set $ws3 number 3
set $ws4 number 4
set $ws5 number 5
set $ws6 number 6
set $ws7 number 7
set $ws8 number 8
set $ws9 number 9
set $ws10 number 10
# screenshot
set $grimshot $HOME/.config/sway/scripts/grimshot.sh
set $pipe_output $grimshot save output -
set $pipe_selection $grimshot save window -
set $notify_paste [[ $(wl-paste -l) == "image/png" ]] && notify-send "Screenshot copied to clipboard"
set $swappy swappy -f -
set $swappy_pipe swappy -f - -o -
set $upload_pipe curl -s -F "file=@-;filename=.png" https://x0.at/ | tee >(wl-copy) >(xargs notify-send)
set $screenshot_screen $pipe_output | $swappy && $notify_paste
set $screenshot_screen_upload $pipe_output | $swappy_pipe | $upload_pipe
set $screenshot_selection $pipe_selection | $swappy && $notify_paste
set $screenshot_selection_upload $pipe_selection | $swappy_pipe | $upload_pipe
# autostarts
set $autostart_dex '[ -x "$(command -v dex)" ] && gdbus wait --session org.kde.StatusNotifierWatcher && dex --autostart'
set $flashfocus '[ -x "$(command -v flashfocus)" ] && flashfocus'
set $wlsunset '[ -x "$(command -v wlsunset)" ] && $HOME/.config/sway/scripts/sunset.sh "on"'
set $autotiling '[ -x "$(command -v autotiling-rs)" ] && autotiling-rs'
set $foot_server '[ -x "$(command -v foot)" ] && $HOME/.config/sway/scripts/foot.sh --server'
set $help_menu '[ -x "$(command -v nwg-wrapper)" ] && [ -f $HOME/.config/nwg-wrapper/help.sh ] && $HOME/.config/sway/scripts/help.sh'
set $workspace_icons '[ -x "$(command -v sworkstyle)" ] && sworkstyle -d -l info &> /tmp/sworkstyle.log'
set $mounting_daemon '[ -x "$(command -v pcmanfm)" ] && pcmanfm -d'
# restart kanshi https://github.com/emersion/kanshi/issues/43#issuecomment-531679213
set $kanshi '[ -x "$(command -v kanshi)" ] && pkill kanshi; exec kanshi'
set $xdg-dirs '[ -x "$(command -v xdg-user-dirs-update)" ] && exec xdg-user-dirs-update'
# apply the keyboard layout from localectl if no keyboard layout has been set via config.d
set $auto_xdg_keyboard 'grep -q xkb_layout ~/.config/sway/config.d/*.conf || $HOME/.config/sway/scripts/keyboard.sh'
# daemons
set $mako '$HOME/.config/sway/scripts/mako.sh'
set $poweralert '[ -x "$(command -v poweralertd)" ] && pkill poweralertd; poweralertd -s -i "line power" &'
set $swayr_daemon '[ -x "$(command -v swayrd)" ] && pkill swayrd; RUST_BACKTRACE=1 RUST_LOG=swayr=debug swayrd &> /tmp/swayrd.log'
set $cliphist_watch '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch pkill -RTMIN+9 waybar'
set $cliphist_store '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch cliphist store'
set $calendar_daemon 'calcurse --daemon'
set $dropbox_daemon '[ -x "$(command -v dropbox)" ] && dropbox start'
set $nm_applet '[ -x "$(command -v nm-applet)" ] && nm-applet'
set $watch_playerctl '[ -x "$(command -v playerctl)" ] && pkill playerctl; playerctl -a metadata --format \'{{status}} {{title}}\' --follow | while read line; do pkill -RTMIN+5 waybar; done'