Guest User

Untitled

a guest
Apr 24th, 2020
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## Environtment
  4. export PATH="${PATH}:$HOME/.scripts"
  5. export PATH="${PATH}:$HOME/.config/bspwm"
  6.  
  7. ## Coloring
  8. getcolors () {
  9. FOREGROUND=$(xrdb -query | grep 'foreground:'| awk '{print $NF}')
  10. BACKGROUND=$(xrdb -query | grep 'background:'| awk '{print $NF}')
  11. BLACK=$(xrdb -query | grep 'color0:'| awk '{print $NF}')
  12. # RED=$(xrdb -query | grep 'color1:'| awk '{print $NF}')
  13. RED="#ff0000"
  14. # GREEN=$(xrdb -query | grep 'color2:'| awk '{print $NF}')
  15. GREEN="#00ff00"
  16. YELLOW=$(xrdb -query | grep 'color3:'| awk '{print $NF}')
  17. BLUE=$(xrdb -query | grep 'color4:'| awk '{print $NF}')
  18. # MAGENTA=$(xrdb -query | grep 'color5:'| awk '{print $NF}')
  19. MAGENTA="#0000ff"
  20. CYAN=$(xrdb -query | grep 'color6:'| awk '{print $NF}')
  21. WHITE=$(xrdb -query | grep 'color7:'| awk '{print $NF}')
  22. }
  23. # xrdb ~/.Xresources
  24. # COLOR=$(shuf -n1 -e ~/.colors/*)
  25. # SHORTCOLOR=$(echo $COLOR | sed "s@.*/@@")
  26. # xrdb -merge $COLOR
  27. # paintee
  28. # # Only use the function above if the cache of paintee couldn't be found
  29. # if [ -e ~/.cache/paintee ]; then
  30. # . ~/.cache/paintee
  31. # else
  32. # getcolors
  33. # fi
  34.  
  35. ## Bspwm configurations
  36. bspc monitor -d '1' '2' '3' '4' '5'
  37. bspc config focus_follows_pointer true
  38. # bspc config border_width 2
  39. bspc config border_width 2
  40. bspc config border_width_in 4
  41. bspc config border_width_out 4
  42.  
  43.  
  44. bspc config border_radius 6
  45. bspc config window_gap 15
  46.  
  47. bspc config focused_border_color "#00ffff"
  48. bspc config normal_border_color "#ff0000"
  49. bspc config active_border_color "$MAGENTA"
  50. bspc config presel_feedback_color "$GREEN"
  51.  
  52. bspc config split_ratio 0.50
  53. bspc config borderless_monocle true
  54. bspc config gapless_monocle true
  55.  
  56. bspc config top_padding 0
  57. bspc config right_padding 0
  58. bspc config bottom_padding 150
  59. bspc config left_padding 0
  60.  
  61. ## Window rules
  62. # remove all rules first
  63. bspc rule -r *:*
  64. # 1 > terminal
  65. #bspc rule -a URxvt desktop='^1' follow=on focus=on
  66. # 2 > web
  67. # bspc rule -a Firefox desktop='^2' follow=on focus=on
  68. #bspc rule -a Transmission-gtk desktop='^2' follow=on focus=on
  69. # 3 > file
  70. #bspc rule -a Thunar desktop='^3' follow=on focus=on
  71. #bspc rule -a File-roller desktop='^3' follow=on focus=on
  72. # 4 > office
  73. # declare -a office=(Geany Gucharmap Evince \
  74. # libreoffice-writer libreoffice-calc libreoffice-impress \
  75. # libreoffice-startcenter libreoffice Soffice *:libreofficedev *:soffice)
  76. # for i in ${office[@]}; do
  77. # bspc rule -a $i desktop='^4' follow=on focus=on; done
  78. # # 5 > media
  79. # declare -a media=(Audacity mpv Gimp Gimp-2.8)
  80. # for i in ${media[@]}; do
  81. # bspc rule -a $i desktop='^5' follow=on focus=on; done
  82. # # 6 > settings
  83. # declare -a settings=(Lxappearance Lxtask Lxrandr Arandr \
  84. # System-config-printer.py Pavucontrol Exo-helper-1)
  85. # for i in ${settings[@]}; do
  86. # bspc rule -a $i desktop='^6' state=floating follow=on focus=on; done
  87. # bspc rule -a GParted desktop='^6' follow=on focus=on
  88. # # special rules
  89. bspc rule -a Audacious state=floating follow=on focus=on
  90. bspc rule -a Firefox:Places state=floating follow=on focus=on
  91. bspc rule -a Viewnior state=floating follow=on focus=on
  92. bspc rule -a Conky state=floating manage=off
  93. bspc rule -a stalonetray state=floating manage=off
  94. bspc rule -a xpad state=floating focus=on
  95. bspc rule -a vlc state=floating focus=on
  96. bspc rule -a Termite state=floating focus=on rectangle=700x325+600+350
  97. bspc rule -a Transmission-gtk state=floating focus=on
  98. # bspc rule -a qBittorrent desktop='^7' state=floating center=true rectangle=1376x625+0+0
  99. bspc rule -a java-lang-Thread state=floating focus=on
  100. bspc rule -a polybar sticky=on
  101. bspc rule -a Lxappearance state=floating
  102. bspc rule -a Font-manager state=floating
  103. bspc rule -a * border=off
  104. ## Autostartcondeccsscctoro
  105. xsetroot -cursor_name left_ptr
  106. xbacklight -set 50
  107. xset fp+ ~/.fonts/misc
  108. killall -9 sxhkd vanela xsettingsd dunst xcape
  109. sxhkd &
  110. vanela &
  111. xsettingsd &
  112. WALLPAPER=$(shuf -n1 -e ~/.wallpaper/*)
  113. SHORTWALLPAPER=$(echo $WALLPAPER | sed "s@.*/@@" | sed "s/\..*$//")
  114. ls ~/.wallpaper | sort -R | tail -$N | while read file; do # useless animation
  115. hsetroot -fill ~/.wallpaper/$file -tint '#3c6f86'; sleep 0.1; done
  116. hsetroot -fill $WALLPAPER -tint '#9ccfe6'
  117. dunst \
  118. -lb "$BACKGROUND" -lf "$FOREGROUND" -lfr "$GREEN" \
  119. -nb "$BACKGROUND" -nf "$FOREGROUND" -nfr "$BLUE" \
  120. -cb "$BACKGROUND" -cf "$FOREGROUND" -cfr "$RED" &
  121. nm-applet &
  122. picom &
  123. ~/.config/polybar/bspwm-4.sh
  124. wal -R
  125. numlockx
  126. # termite -t hello &
  127. # redshift -l 26.46:80.34 -t 5700:3600 -g 0.8 -m randr -v
  128. xmodmap ~/.xmodmap # && killall -9 xcape && sleep 5 && bash xcape -e 'Super_L=Alt_L|F1'
  129. # picom --experimental-backends --backend glx &
  130. # sleep 0.5
  131. # notify-send "Bspwm Loaded" "With $SHORTCOLOR color and $SHORTWALLPAPER wallpaper"
  132. ~/.scripts/startup.sh &
  133. libinput-gestures-setup restart
  134. xautolock -time 10 -locker blurlock
  135. mpd &
  136. # xcape -e 'Super_L=Alt_L|F1'
  137. # redshift-gtk -l 26.46:80.34 -t 5700:3600 -g 0.8 -m randr -v &
Add Comment
Please, Sign In to add comment