Change polybar config

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2022-01-16 18:12:37 +01:00
parent a7b6ca91ad
commit 8078b529a6
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283
3 changed files with 21 additions and 180 deletions

View File

@ -5,16 +5,17 @@ pgrep -x sxhkd > /dev/null || sxhkd &
xrdb -load $HOME/.config/.Xresources &
dunst -conf $HOME/.config/dunst/dunstrc &
picom &
feh --bg-fill ~/Pictures/wallhaven-g7pw73.jpg &
feh --bg-fill ~/Pictures/nordic-obsession.png &
/usr/lib/kdeconnectd & disown
xset -b
DISPLAYS=$(xrandr -q | grep -w 'connected' | cut -d ' ' -f 1)
EXT_PRIMARY=""
INTEGRATED_DISPLAY="eDP"
for DISP in ${DISPLAYS}; do
if [ ${DISP} != 'eDP' ]; then
if [ ${DISP} != ${INTEGRATED_DISPLAY} ]; then
EXT_PRIMARY=${DISP}
fi
done
@ -22,20 +23,15 @@ done
killall -q polybar
if [ "${EXT_PRIMARY}" != "" ]; then
xrandr --output ${EXT_PRIMARY} --primary --output eDP --right-of ${EXT_PRIMARY}
xrandr --output ${EXT_PRIMARY} --primary --output ${INTEGRATED_DISPLAY} --right-of ${EXT_PRIMARY}
bspc monitor ${EXT_PRIMARY} -d 一 二 三 四 五
bspc monitor eDP -d 六 七 八 九 十
MONITOR=${EXT_PRIMARY} polybar left 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar center 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar right 2>&1 | tee -a /tmp/polybar.log & disown
bspc monitor ${INTEGRATED_DISPLAY} -d 六 七 八 九 十
MONITOR=${EXT_PRIMARY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown
else
bspc monitor eDP -d 一 二 三 四 五 六 七 八 九 十
fi
MONITOR="eDP" polybar left 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="eDP" polybar center 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="eDP" polybar right 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${INTEGRATED_DISPLAY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown
bspc config border_width 0
bspc config window_gap 8

View File

@ -10,7 +10,7 @@ shadow-opacity = 0.4;
shadow-exclude = [
"class_g = 'dmenu'",
"class_g = 'spotify'",
"class_g = 'polybar'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

View File

@ -17,24 +17,19 @@
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/left]
[bar/main]
monitor = ${env:MONITOR:eDP}
width = 12%
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 3.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
@ -45,154 +40,27 @@ line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = FiraCode Nerd Font:style=medium:size=10
font-1 = IPAゴシック:style=Regular
modules-center = date
;tray-position = right
;tray-padding = 2
;tray-background = #0063ff
modules-left = date bspwm
modules-center = xwindow
modules-right = pulseaudio memory cpu wlan eth battery
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[bar/center]
monitor = ${env:MONITOR:eDP}
width = 30%
height = 27
offset-x = 35%
;offset-y = 1%
radius = 3.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = FiraCode Nerd Font:style=medium:size=10
font-1= IPAゴシック:style=Regular
modules-center = bspwm
;tray-position = right
;tray-padding = 2
;tray-background = #0063ff
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[bar/right]
monitor = ${env:MONITOR:eDP}
width = 23%
height = 27
offset-x = 77%
;offset-y = 1%
radius = 3.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = FiraCode Nerd Font:style=medium:size=10
modules-center = alsa memory cpu wlan eth battery
;tray-position = right
;tray-padding = 2
;tray-background = #0063ff
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:50:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
@ -212,9 +80,6 @@ label-empty = %name%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/cpu]
type = internal/cpu
interval = 2
@ -276,8 +141,11 @@ format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date%
[module/alsa]
type = internal/alsa
[module/pulseaudio]
type = internal/pulseaudio
use-ui-max = false
interval = 2
format-volume = <label-volume>
format-volume-prefix = "蓼 "
@ -324,34 +192,11 @@ animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 85
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-foreground = ${colors.foreground-alt}
hwmon-path = /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp1_input
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
margin-bottom = 0
; vim:ft=dosini