1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/bspwm/.config/bspwm/bspwmrc

105 lines
2.4 KiB
Plaintext
Raw Normal View History

2020-02-17 13:13:34 +00:00
#!/usr/bin/env fish
2019-12-10 12:40:20 +00:00
2020-03-13 17:51:27 +00:00
###---Functions---###
function start_if_not_running
if [ (pgrep -u (id -u) -x $argv[1] | wc -l) -lt 1 ]
eval "$argv[1] &"
end
end
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---###
setxkbmap -option caps:escape
2020-03-04 21:07:56 +00:00
if [ -x /usr/bin/numlockx ]
/usr/bin/numlockx on
end
2020-03-13 17:51:27 +00:00
###---Monitors---###
set SCREENCOUNT (xrandr | grep -c "\*")
if [ "$SCREENCOUNT" -eq 2 ]
bspc monitor DP-1 -d 2 3 4 5 6 7 8 9 0
bspc monitor HDMI-2 -d 1
if [ -f "$HOME/.local/bin/screen_desktop" ]
screen_desktop
end
if [ -f "$HOME/.local/bin/polybar-desktop" ]
polybar-desktop
end
else
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
if [ -f "$HOME/.local/bin/screen" ]
screen
end
if [ -f "$HOME/.local/bin/polybar-laptop" ]
polybar-laptop
end
end
2020-03-04 20:31:22 +00:00
2020-03-13 17:51:27 +00:00
###---Wallpaper & opacity---###
2020-03-04 20:31:22 +00:00
wal -R
~/.local/bin/wallpaper
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----###
bspc config border_width 2
2020-03-13 17:51:27 +00:00
bspc config window_gap 10
2020-03-13 17:51:27 +00:00
###---Rules---###
bspc rule -a "Syncthing GTK" state=floating
bspc rule -a Gimp state=floating
2020-03-12 11:26:46 +00:00
bspc rule -a wttr state=floating
bspc rule -a neomutt state=floating
bspc rule -a newsboat state=floating
bspc rule -a updatearch state=floating
2020-03-13 12:52:53 +00:00
bspc rule -a lf state=floating
bspc rule -a Spotify desktop='^4'
bspc rule -a Spt desktop='^4'
bspc rule -a Emacs state=tiled
bspc rule -a Zathura state=tiled
bspc rule -a Brave-browser desktop='^9'
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---###
start_if_not_running unclutter
2020-03-05 20:28:11 +00:00
start_if_not_running nm-applet
start_if_not_running pasystray
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
start_if_not_running brave
2020-03-13 17:51:27 +00:00
killall cleanfullscreen
~/.local/bin/cleanfullscreen &
pkill -f spt
alacritty --class Spt,Spt -e ~/.local/bin/spotify-command-line &
2019-12-10 12:40:20 +00:00
2020-03-13 17:51:27 +00:00
###---System lock---###
pkill -f xss-lock
2020-01-10 14:28:32 +00:00
xss-lock -n ~/.local/bin/lock -- ~/.local/bin/lock &
pkill -f xautolock
2020-01-10 14:28:32 +00:00
xautolock -time 10 -locker ~/.local/bin/lock &
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 &