2020-02-17 13:13:34 +00:00
|
|
|
#!/usr/bin/env fish
|
2019-12-10 12:40:20 +00:00
|
|
|
|
2020-11-18 09:09:23 +00:00
|
|
|
###---Start app if not running already---###
|
2020-03-02 20:51:51 +00:00
|
|
|
function start_if_not_running
|
2021-03-13 14:27:16 +00:00
|
|
|
set PROCESS_NAME $argv[1]
|
2020-11-18 09:09:23 +00:00
|
|
|
|
2020-11-20 08:04:18 +00:00
|
|
|
|
2020-11-18 09:09:23 +00:00
|
|
|
if [ (pgrep -u (id -u) -x "$PROCESS_NAME" | wc -l) -lt 1 ]
|
|
|
|
if type -q $argv[1]
|
|
|
|
eval "$argv[1] &"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
###---Start app in alacritty if not running already---###
|
|
|
|
function start_shell_if_not_running
|
2020-03-02 20:51:51 +00:00
|
|
|
if [ (pgrep -u (id -u) -x $argv[1] | wc -l) -lt 1 ]
|
2020-11-18 09:09:23 +00:00
|
|
|
if type -q $argv[1]
|
|
|
|
eval "alacritty --class $argv[1],$argv[1] -e $argv[1] &"
|
|
|
|
end
|
2020-03-02 20:51:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-03-25 09:44:24 +00:00
|
|
|
###---Load xresources---###
|
|
|
|
xrdb -load ~/.config/X11/xresources
|
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Flush rules---###
|
|
|
|
bspc rule -r "*"
|
|
|
|
|
|
|
|
###---Sxhkd---###
|
2020-03-05 23:42:39 +00:00
|
|
|
set -U SXHKD_SHELL sh
|
2020-03-13 17:51:27 +00:00
|
|
|
sxhkd &
|
2020-03-05 23:42:39 +00:00
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Keyboard---###
|
2020-03-04 21:03:40 +00:00
|
|
|
setxkbmap -option caps:escape
|
|
|
|
|
2020-11-18 09:09:23 +00:00
|
|
|
###---Monitors---###
|
2022-10-09 15:30:41 +00:00
|
|
|
{{ if eq .type "desktop" }}
|
|
|
|
bspc monitor DP-3 -d 2 3 4 5 6 7 8 9 0
|
|
|
|
bspc monitor DP-2 -d 1
|
|
|
|
xrandr --output DP-3 --primary --mode 3840x2160 --rotate normal --output DP-2 --mode 2560x1440 --pos 0x0 --rotate left
|
|
|
|
{{ else }}
|
|
|
|
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
###---Polybar---###
|
|
|
|
# Terminate already running bar instances
|
|
|
|
killall -q polybar
|
|
|
|
|
|
|
|
# Wait until the processes have been shut down
|
|
|
|
while pgrep -u (id -u) -x polybar >/dev/null
|
|
|
|
sleep 1
|
2020-03-13 17:51:27 +00:00
|
|
|
end
|
2022-10-09 15:30:41 +00:00
|
|
|
{{ if eq .type "desktop" }}
|
|
|
|
polybar-monitor1 &
|
|
|
|
polybar-monitor2 &
|
|
|
|
{{ else }}
|
|
|
|
polybar framework-top &
|
|
|
|
polybar framework-bottom &
|
|
|
|
{{ end }}
|
|
|
|
|
2020-03-04 20:31:22 +00:00
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Wallpaper & opacity---###
|
2022-10-09 15:30:41 +00:00
|
|
|
{{ if eq .type "desktop" }}
|
|
|
|
xwallpaper --output DP-2 --zoom ~/.cache/wall2.png --output DP-3 --zoom ~/.cache/wall1.png &
|
|
|
|
{{ else }}
|
|
|
|
xwallpaper --output eDP-1 --zoom ~/.cache/wall1.png &
|
|
|
|
{{ end }}
|
2020-08-22 14:37:43 +00:00
|
|
|
wal -n -R
|
2020-03-04 20:31:22 +00:00
|
|
|
picom -b
|
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Global Settings---###
|
2020-02-18 01:32:08 +00:00
|
|
|
. ~/.cache/wal/colors.fish
|
|
|
|
bspc config normal_border_color "$color1"
|
|
|
|
bspc config active_border_color "$color2"
|
|
|
|
bspc config focused_border_color "$color15"
|
|
|
|
bspc config presel_feedback_color "$color1"
|
2020-03-13 17:51:27 +00:00
|
|
|
|
|
|
|
bspc config automatic_scheme alternate
|
|
|
|
bspc config initial_polarity second_child
|
|
|
|
|
|
|
|
###---Desktop Settings----###
|
2020-03-02 20:51:51 +00:00
|
|
|
bspc config border_width 2
|
2020-04-11 11:15:53 +00:00
|
|
|
bspc config window_gap 4
|
2020-03-02 20:51:51 +00:00
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Rules---###
|
2020-03-02 20:51:51 +00:00
|
|
|
bspc rule -a "Syncthing GTK" state=floating
|
2020-04-11 11:15:53 +00:00
|
|
|
bspc rule -a Gimp state=floating follow=on
|
2020-11-18 09:09:23 +00:00
|
|
|
|
2020-03-14 13:21:22 +00:00
|
|
|
bspc rule -a float state=floating
|
2020-04-12 09:11:43 +00:00
|
|
|
bspc rule -a fullscreen state=fullscreen
|
2020-11-18 09:09:23 +00:00
|
|
|
|
2020-03-02 20:51:51 +00:00
|
|
|
bspc rule -a Emacs state=tiled
|
|
|
|
bspc rule -a Zathura state=tiled
|
2020-11-18 09:09:23 +00:00
|
|
|
|
2021-03-13 14:27:16 +00:00
|
|
|
bspc rule -a firefox desktop='^1'
|
2020-11-18 09:09:23 +00:00
|
|
|
bspc rule -a Brave-browser desktop='^1'
|
2020-11-20 07:55:36 +00:00
|
|
|
bspc rule -a bashtop desktop='^2'
|
2020-11-25 05:21:38 +00:00
|
|
|
bspc rule -a Slack='^3'
|
2020-11-18 09:09:23 +00:00
|
|
|
bspc rule -a Element desktop='^3'
|
|
|
|
bspc rule -a weechat desktop='^3'
|
|
|
|
bspc rule -a castero desktop='^4'
|
|
|
|
bspc rule -a Spt desktop='^4'
|
|
|
|
bspc rule -a jetbrains-webstorm desktop='^8'
|
|
|
|
bspc rule -a Emacs desktop='^9'
|
|
|
|
|
2020-03-02 20:51:51 +00:00
|
|
|
bspc rule -a scratchpad sticky=on state=floating
|
|
|
|
bspc rule -a scratchmacs sticky=on state=floating
|
2020-02-18 01:32:08 +00:00
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Autostart---###
|
2020-10-20 08:18:07 +00:00
|
|
|
start_if_not_running dunst
|
2020-03-02 20:51:51 +00:00
|
|
|
start_if_not_running unclutter
|
2020-12-06 09:33:29 +00:00
|
|
|
start_if_not_running xbanish
|
2020-03-05 20:28:11 +00:00
|
|
|
start_if_not_running nm-applet
|
|
|
|
start_if_not_running pasystray
|
2020-03-02 20:51:51 +00:00
|
|
|
start_if_not_running redshift-gtk
|
|
|
|
start_if_not_running syncthing-gtk
|
2020-03-09 10:50:29 +00:00
|
|
|
start_if_not_running caffeine
|
2021-07-12 12:48:44 +00:00
|
|
|
start_if_not_running clipmenud
|
2020-11-18 09:09:23 +00:00
|
|
|
|
2021-03-13 14:27:16 +00:00
|
|
|
start_if_not_running firefox
|
2020-11-18 09:09:23 +00:00
|
|
|
start_if_not_running emacs
|
|
|
|
start_if_not_running element-desktop
|
2020-11-19 07:03:32 +00:00
|
|
|
start_if_not_running element-desktop-nightly
|
2021-01-20 20:39:49 +00:00
|
|
|
start_if_not_running gpodder
|
2022-10-09 15:30:41 +00:00
|
|
|
{{ if eq .type "desktop" }}start_if_not_running slack{{ end }}
|
2020-03-13 17:51:27 +00:00
|
|
|
|
2020-03-13 19:45:21 +00:00
|
|
|
pkill -f cleanfullscreen
|
2020-03-13 17:51:27 +00:00
|
|
|
~/.local/bin/cleanfullscreen &
|
|
|
|
|
|
|
|
###---System lock---###
|
2020-03-02 20:51:51 +00:00
|
|
|
pkill -f xss-lock
|
2020-12-01 19:02:19 +00:00
|
|
|
xset s 300 5
|
2020-12-02 12:17:26 +00:00
|
|
|
env XSECURELOCK_FONT="Hack Nerd Font" xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
|
2020-01-10 14:28:32 +00:00
|
|
|
|
2020-03-13 17:51:27 +00:00
|
|
|
###---Misc---###
|
2020-03-04 15:15:41 +00:00
|
|
|
# Needed for Jetbrains products to work
|
|
|
|
wmname LG3D &
|
2020-06-19 09:57:13 +00:00
|
|
|
|
|
|
|
# Enable bspswallow
|
|
|
|
pidof bspswallow || bash bspswallow &
|