Browse Source

Switch to polybar

master
Riyyi 4 years ago
parent
commit
c86afedf0b
  1. 20
      .config/bspwm/bspwmrc
  2. 4
      .config/polybar/config
  3. 2
      .config/xorg/xinitrc
  4. 2
      .config/zsh/.zprofile
  5. 10
      .scripts/monctl.sh

20
.config/bspwm/bspwmrc

@ -8,11 +8,6 @@ bspc config window_gap 20
bspc config split_ratio 0.502
bspc config top_padding "$PANEL_HEIGHT"
# Program startup
"$HOME"/.scripts/wm/wallpaper.sh &
"$HOME"/.scripts/wm/programs.sh &
"$HOME"/.scripts/panel/lemonbar.sh &
# Colors
bspc config focused_border_color "$FGCOLOR_INACTIVE"
bspc config normal_border_color "$BGCOLOR_INACTIVE"
@ -30,10 +25,7 @@ bspc config focus_follows_pointer true
bspc config pointer_follows_monitor true
bspc config pointer_modifier mod4
#--- Desktops ---#
# Set desktops
"$HOME"/.scripts/wm/desktops.sh
#--- Rules ---#
# Open program on specific desktop
bspc rule -a firefox desktop="$WS1"
@ -51,3 +43,13 @@ bspc rule -a Pavucontrol state=floating
bspc rule -a Qemu-system-i386 state=floating
bspc rule -a Qemu-system-x86_64 state=floating
bspc rule -a Zathura state=tiled
#--- Scripts ---#
# Set desktops
"$HOME"/.scripts/wm/desktops.sh
# Program startup
"$HOME"/.scripts/wm/wallpaper.sh &
"$HOME"/.scripts/wm/programs.sh &
"$HOME"/.scripts/panel/polybar.sh &

4
.config/polybar/config

@ -51,7 +51,7 @@ fgcolor-inactive = ${xrdb:WmColor.fgcolor_Inactive:#676e7d}
monitor = ${env:MONITOR:eDP-1}
width = 100%
height = 38
height = ${env:PANEL_HEIGHT:38}
; offset-x = 1%
; offset-y = 1%
radius = 0.0
@ -88,7 +88,7 @@ tray-padding = 2
tray-detached = true
;tray-background = #0063ff
; wm-restack = bspwm
wm-restack = bspwm
; wm-name = ${env:PANEL_NAME:polybar_panel}
scroll-up = bspwm-desknext

2
.config/xorg/xinitrc

@ -29,6 +29,4 @@ thunar --daemon &
sxhkd "$XDG_CONFIG_HOME/sxhkd/$WM" &
xss-lock -- "$HOME"/.scripts/wm/lock.sh &
[ "$WM" = "bspwm" ] && stalonetray &
exec $WM

2
.config/zsh/.zprofile

@ -34,7 +34,7 @@ export LESS_TERMCAP_ue="$(printf '%b' '\e[0m')" # reset underline
# Panel
export PANEL_HEIGHT=38
export PANEL_NAME="lemonbar_panel"
export PANEL_NAME="polybar_panel"
export PANEL_PIPE="/tmp/lemonbar_pipe"
# Qt5

10
.scripts/monctl.sh

@ -42,10 +42,10 @@ update() {
sleep 1
# Restart panel
"$HOME"/.scripts/panel/lemonbar.sh &
"$HOME"/.scripts/panel/polybar.sh &
# Reload wallpaper
"$HOME"/.scripts/wm/wallpaper.sh
"$HOME"/.scripts/wm/wallpaper.sh &
}
auto() {
@ -54,17 +54,17 @@ auto() {
# Skip first argument
shift 1
# Add mode to primary display
# Add mode to primary monitor
OUTPUT="$(xrandr -q)"
if ! echo "$OUTPUT" | grep -Fq "$1x$2_$3.00"; then
eval xrandr --newmode $(cvt "$1" "$2" "$3" | awk '/Modeline/{ $1=""; print $0 }')
xrandr --addmode "$4" "$1x$2_$3.00"
fi
# Get all connected displays
# Get all connected monitor
CONNECTED="$(xrandr -q | awk '/ connected/{print $1}')"
# Disable all other displays
# Disable all other monitors
eval xrandr --output "$4" --mode "$1x$2_$3.00" --primary \
"$(echo "$CONNECTED" | grep -vx "$4" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ')"

Loading…
Cancel
Save