Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ## Environtment
- export PATH="${PATH}:$HOME/.scripts"
- export PATH="${PATH}:$HOME/.config/bspwm"
- ## Coloring
- getcolors () {
- FOREGROUND=$(xrdb -query | grep 'foreground:'| awk '{print $NF}')
- BACKGROUND=$(xrdb -query | grep 'background:'| awk '{print $NF}')
- BLACK=$(xrdb -query | grep 'color0:'| awk '{print $NF}')
- # RED=$(xrdb -query | grep 'color1:'| awk '{print $NF}')
- RED="#ff0000"
- # GREEN=$(xrdb -query | grep 'color2:'| awk '{print $NF}')
- GREEN="#00ff00"
- YELLOW=$(xrdb -query | grep 'color3:'| awk '{print $NF}')
- BLUE=$(xrdb -query | grep 'color4:'| awk '{print $NF}')
- # MAGENTA=$(xrdb -query | grep 'color5:'| awk '{print $NF}')
- MAGENTA="#0000ff"
- CYAN=$(xrdb -query | grep 'color6:'| awk '{print $NF}')
- WHITE=$(xrdb -query | grep 'color7:'| awk '{print $NF}')
- }
- # xrdb ~/.Xresources
- # COLOR=$(shuf -n1 -e ~/.colors/*)
- # SHORTCOLOR=$(echo $COLOR | sed "s@.*/@@")
- # xrdb -merge $COLOR
- # paintee
- # # Only use the function above if the cache of paintee couldn't be found
- # if [ -e ~/.cache/paintee ]; then
- # . ~/.cache/paintee
- # else
- # getcolors
- # fi
- ## Bspwm configurations
- bspc monitor -d '1' '2' '3' '4' '5'
- bspc config focus_follows_pointer true
- # bspc config border_width 2
- bspc config border_width 2
- bspc config border_width_in 4
- bspc config border_width_out 4
- bspc config border_radius 6
- bspc config window_gap 15
- bspc config focused_border_color "#00ffff"
- bspc config normal_border_color "#ff0000"
- bspc config active_border_color "$MAGENTA"
- bspc config presel_feedback_color "$GREEN"
- bspc config split_ratio 0.50
- bspc config borderless_monocle true
- bspc config gapless_monocle true
- bspc config top_padding 0
- bspc config right_padding 0
- bspc config bottom_padding 150
- bspc config left_padding 0
- ## Window rules
- # remove all rules first
- bspc rule -r *:*
- # 1 > terminal
- #bspc rule -a URxvt desktop='^1' follow=on focus=on
- # 2 > web
- # bspc rule -a Firefox desktop='^2' follow=on focus=on
- #bspc rule -a Transmission-gtk desktop='^2' follow=on focus=on
- # 3 > file
- #bspc rule -a Thunar desktop='^3' follow=on focus=on
- #bspc rule -a File-roller desktop='^3' follow=on focus=on
- # 4 > office
- # declare -a office=(Geany Gucharmap Evince \
- # libreoffice-writer libreoffice-calc libreoffice-impress \
- # libreoffice-startcenter libreoffice Soffice *:libreofficedev *:soffice)
- # for i in ${office[@]}; do
- # bspc rule -a $i desktop='^4' follow=on focus=on; done
- # # 5 > media
- # declare -a media=(Audacity mpv Gimp Gimp-2.8)
- # for i in ${media[@]}; do
- # bspc rule -a $i desktop='^5' follow=on focus=on; done
- # # 6 > settings
- # declare -a settings=(Lxappearance Lxtask Lxrandr Arandr \
- # System-config-printer.py Pavucontrol Exo-helper-1)
- # for i in ${settings[@]}; do
- # bspc rule -a $i desktop='^6' state=floating follow=on focus=on; done
- # bspc rule -a GParted desktop='^6' follow=on focus=on
- # # special rules
- bspc rule -a Audacious state=floating follow=on focus=on
- bspc rule -a Firefox:Places state=floating follow=on focus=on
- bspc rule -a Viewnior state=floating follow=on focus=on
- bspc rule -a Conky state=floating manage=off
- bspc rule -a stalonetray state=floating manage=off
- bspc rule -a xpad state=floating focus=on
- bspc rule -a vlc state=floating focus=on
- bspc rule -a Termite state=floating focus=on rectangle=700x325+600+350
- bspc rule -a Transmission-gtk state=floating focus=on
- # bspc rule -a qBittorrent desktop='^7' state=floating center=true rectangle=1376x625+0+0
- bspc rule -a java-lang-Thread state=floating focus=on
- bspc rule -a polybar sticky=on
- bspc rule -a Lxappearance state=floating
- bspc rule -a Font-manager state=floating
- bspc rule -a * border=off
- ## Autostartcondeccsscctoro
- xsetroot -cursor_name left_ptr
- xbacklight -set 50
- xset fp+ ~/.fonts/misc
- killall -9 sxhkd vanela xsettingsd dunst xcape
- sxhkd &
- vanela &
- xsettingsd &
- WALLPAPER=$(shuf -n1 -e ~/.wallpaper/*)
- SHORTWALLPAPER=$(echo $WALLPAPER | sed "s@.*/@@" | sed "s/\..*$//")
- ls ~/.wallpaper | sort -R | tail -$N | while read file; do # useless animation
- hsetroot -fill ~/.wallpaper/$file -tint '#3c6f86'; sleep 0.1; done
- hsetroot -fill $WALLPAPER -tint '#9ccfe6'
- dunst \
- -lb "$BACKGROUND" -lf "$FOREGROUND" -lfr "$GREEN" \
- -nb "$BACKGROUND" -nf "$FOREGROUND" -nfr "$BLUE" \
- -cb "$BACKGROUND" -cf "$FOREGROUND" -cfr "$RED" &
- nm-applet &
- picom &
- ~/.config/polybar/bspwm-4.sh
- wal -R
- numlockx
- # termite -t hello &
- # redshift -l 26.46:80.34 -t 5700:3600 -g 0.8 -m randr -v
- xmodmap ~/.xmodmap # && killall -9 xcape && sleep 5 && bash xcape -e 'Super_L=Alt_L|F1'
- # picom --experimental-backends --backend glx &
- # sleep 0.5
- # notify-send "Bspwm Loaded" "With $SHORTCOLOR color and $SHORTWALLPAPER wallpaper"
- ~/.scripts/startup.sh &
- libinput-gestures-setup restart
- xautolock -time 10 -locker blurlock
- mpd &
- # xcape -e 'Super_L=Alt_L|F1'
- # redshift-gtk -l 26.46:80.34 -t 5700:3600 -g 0.8 -m randr -v &
Add Comment
Please, Sign In to add comment