Various updates for cleaner polybar on toshiba 2 chromebook

This commit is contained in:
Shaun Reed 2020-03-23 19:52:33 -04:00
parent ae88fd790a
commit 1080742312
6 changed files with 74 additions and 46 deletions

View File

@ -35,17 +35,17 @@ ${voffset 3}$hr
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}RAM ${color} ${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}RAM ${color}
${goto 0}${color2}$alignc${memgraph 40,305}${color} ${goto 0}${color2}$alignc${memgraph 40,305}${color}
${voffset 4}${goto 0}${alignc}${color2}${membar 10, 305} ${voffset 4}${goto 0}${alignc}${color2}${membar 10, 305}
${color}${goto 10}${font}${memperc}%${alignr}${exec grep -w Active: /proc/meminfo | awk '{print $2 / 1024 / 1024}'}/${memmax} ${color}${goto 10}${font}${memperc}%${alignr}${exec grep -w Active: /proc/meminfo | awk '{print $2 / 1024 }'}MiB /${memmax}
${voffset 3}${color}$hr ${voffset 3}${color}$hr
# #
# CPU Display # CPU Display
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}CPU ${color} ${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}CPU ${color}
# Chipset # Chipset
${alignr}${font}${exec inxi |grep CPU | awk '{print $4" "$2" "$3" "$6}'}${exec lscpu |grep -w "Model name:"| awk '{print " - " $8}'} ${alignr}${font}${exec inxi |grep CPU | awk '{print $4" "$2" "$3" "$6}'}${exec lscpu |grep -w "Model name:"| awk '{print " - " $8}'}
# CPU Grpah # CPU Graph
${voffset 4}${goto 0}${alignc}${color2}${cpugraph 40, 305} ${voffset 4}${goto 0}${alignc}${color2}${cpugraph 40, 305}
# Percentage / GHz utilized # Percentage / GHz utilized
${voffset 0}${goto 10}${color}${font}${hwmon temp 1}F°${alignr}${cpu}% - ${freq_g}GHz ${voffset 0}${goto 10}${color}${font}${exec cat /sys/class/thermal/thermal_zone2/temp | awk '{print ( ( ( (9/5) * $1) / 1000) + 32) "°F" }'}${alignr}${cpu}% - ${freq_g}GHz
# CPU Core Graphs # CPU Core Graphs
${voffset 10}${color}${goto 10}${font Bitstream Vera Sans:size=8}${cpu cpu1}%${goto 43}${color2}${cpubar cpu1 12,110} ${goto 170}${color}${cpu cpu2}%${goto 203}${color2}${cpubar cpu2 12,110} ${voffset 10}${color}${goto 10}${font Bitstream Vera Sans:size=8}${cpu cpu1}%${goto 43}${color2}${cpubar cpu1 12,110} ${goto 170}${color}${cpu cpu2}%${goto 203}${color2}${cpubar cpu2 12,110}
${voffset 3}${color}$hr ${voffset 3}${color}$hr

View File

@ -155,12 +155,12 @@ bindsym $mod+Shift+slash move container to workspace $ws96; workspace $ws96
bindsym $mod+Shift+period move container to workspace $ws95; workspace $ws95 bindsym $mod+Shift+period move container to workspace $ws95; workspace $ws95
bindsym $mod+Shift+comma move container to workspace $ws94; workspace $ws94 bindsym $mod+Shift+comma move container to workspace $ws94; workspace $ws94
# Move to workspace # Move to workspace
bindsym $mod+backslash workspace number $ws99 # Chat bindsym $mod+backslash workspace number $ws99
bindsym $mod+bracketright workspace number $ws98 # Mail bindsym $mod+bracketright workspace number $ws98
bindsym $mod+apostrophe workspace number $ws97 # Sec bindsym $mod+apostrophe workspace number $ws97
bindsym $mod+slash workspace number $ws96 # Web bindsym $mod+slash workspace number $ws96
bindsym $mod+period workspace number $ws95 # Terminal bindsym $mod+period workspace number $ws95
bindsym $mod+comma workspace number $ws94 # Musak bindsym $mod+comma workspace number $ws94
# Switch to workspace # Switch to workspace
@ -206,6 +206,10 @@ for_window [class="Pavucontrol"] resize set height 400
for_window [class="Pavucontrol"] resize set width 600 for_window [class="Pavucontrol"] resize set width 600
for_window [class="Pavucontrol"] move position center for_window [class="Pavucontrol"] move position center
for_window [class="Yad"] floating enable
for_window [class="Yad"] resize set height 400
for_window [class="Yad"] resize set width 600
for_window [class="Bitwarden"] floating enable for_window [class="Bitwarden"] floating enable
for_window [class="Bitwarden"] resize set height 600 for_window [class="Bitwarden"] resize set height 600
for_window [class="Bitwarden"] resize set width 800 for_window [class="Bitwarden"] resize set width 800
@ -241,8 +245,9 @@ bindsym $mod+Return exec i3-sensible-terminal
# start a terminal # start a terminal
# Uses $TERMINAL environment setting # Uses $TERMINAL environment setting
# bindsym $mod+Return exec terminal # bindsym $mod+Return exec terminal
# Open dropdown terminal using tilix quake mode # Start / kill conky
bindsym $mod+t exec tilix -q bindsym $mod+t exec pkill compton
bindsym $mod+Shift+t exec compton
# Firefox # Firefox
bindsym $mod+Shift+f exec firefox bindsym $mod+Shift+f exec firefox
# Bluetooth device settings # Bluetooth device settings
@ -359,11 +364,15 @@ mode "resize" {
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
# Use polybar installed
exec_always --no-startup-id /home/kapper/.config/polybar/start-polybar.sh
exec_always --no-startup-id compton
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
bar { #bar {
status_command i3blocks #
} # status_command i3blocks
#}
# Theme colors # Theme colors
# class border backgr. text indic. child_border # class border backgr. text indic. child_border

View File

@ -2,25 +2,29 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[bar/top] [bar/top]
; Polybar Position ; Polybar Position
monitor = ${env:MONITOR} monitor = ${env:MONITOR}
width = 100% width = 100%
height = 34 height = 30
; Polybar Color ; Polybar Color
background = #000000 ; Depreciated..
;tray-transparent = true
; Transparent adds 2 leading values to color (2+hex)
background = #00000000
; Opaque is hex color (hex)
foreground = #00c24a foreground = #00c24a
line-color = ${bar/bottom.background} line-color = ${bar/bottom.background}
line-size = 16 line-size = 16
spacing = 2 spacing = 2
tray-background = #00111111
; Polybar Padding ; Polybar Padding
padding-left = 0 padding-left = 0
padding-right = 5 padding-right = 5
; Margin Between Modules ; Margin Between Modules
module-margin = 4 module-margin = 2
; Type font ; Type font
font-0 = NotoSans-Regular:size=8;0 font-0 = NotoSans-Regular:size=8;0
@ -30,14 +34,18 @@ font-2 = Noto Sans Mono:size=8;0
; Modules ; Modules
modules-left = powermenu weather modules-left = powermenu weather
modules-center = ki3 modules-center = ki3
modules-right = info-hackspeed keyboard volume wired-network clock modules-right = volume date
; Set the cursor to display pointer / resize is interaction available
cursor-click = pointer
cursor-scroll = ns-resize
[bar/bottom] [bar/bottom]
; Position, size of polybar ; Position, size of polybar
monitor = ${env:MONITOR} monitor = ${env:MONITOR}
bottom = true bottom = true
width = 100% width = 100%
height = 27 height = 20
; Use top bar colors ; Use top bar colors
background = ${bar/top.background} background = ${bar/top.background}
@ -51,8 +59,8 @@ padding-left = 6
padding-right = 6 padding-right = 6
; Margins between modules ; Margins between modules
module-margin-left = 4 module-margin-left = 1
module-margin-right = 6 module-margin-right = 2
; Font settings, order matters ; Font settings, order matters
; Top font takes priority over following ; Top font takes priority over following
@ -61,12 +69,14 @@ font-0 = NotoSans-Regular:size=8;0
font-1 = Inconsolata Nerd Font:size=12;0 font-1 = Inconsolata Nerd Font:size=12;0
font-2 = Noto Sans Mono:size=8;0 font-2 = Noto Sans Mono:size=8;0
; Modules ; Modules
modules-left = temp-cpu cpu modules-left = temp-cpu cpu memfree memory
modules-center = popup-utc network public-ip filesystem modules-center = popup-utc network public-ip filesystem
modules-right = info-idle caffeine temp-gpu memory modules-right = keyboard info-hackspeed info-idle
; Set the cursor to display pointer / resize is interaction available
cursor-click = pointer
cursor-scroll = ns-resize
; Modules ; Modules
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -218,10 +228,10 @@ interval = 5.0
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done ; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file ; to find path to desired file
; Default reverts to thermal zone setting ; Default reverts to thermal zone setting
exec = exec ~/.local/bin/i3scripts/cpusensor exec = cat /sys/class/thermal/thermal_zone2/temp | awk '{print ( ( ( (9/5) * $1) / 1000) + 32) "°F" }'
format = <label> format = <label>
tail = true tail = true
label =  %output% F° label = CPU: %output%
; GPU Temp ; GPU Temp
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -369,25 +379,34 @@ date = %%{F#999}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-}
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/date] [module/date]
type = internal/date type = internal/date
date =  %%{F#99}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-} date = %%{F#aaa}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-}
date-alt = %%{F#fff}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-} date-alt = %%{F#aaa}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-}
; Memory Free MiB
;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/memfree]
type = custom/script
exec = grep -w MemAvailable: /proc/meminfo | awk '{print $2 / 1024 "MiB"}'
interval = 5
label = RAM: %output%
; Memory Usage ; Memory Usage
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/memory] [module/memory]
type = internal/memory type = internal/memory
format = <label> <bar-used> format = <bar-used>
label =  label = RAM:
bar-used-width = 30 bar-used-width = 15
bar-used-foreground-0 = #aaff77 bar-used-foreground-0 = #aaff77
bar-used-foreground-1 = #aaff77 bar-used-foreground-1 = #aaff77
bar-used-foreground-2 = #fba922 bar-used-foreground-2 = #fba922
bar-used-foreground-3 = #ff5555 bar-used-foreground-3 = #ff5555
bar-used-indicator = | bar-used-indicator =
bar-used-indicator-font = 6 bar-used-indicator-font = 6
bar-used-indicator-foreground = #ff bar-used-indicator-foreground = #ff
bar-used-fill = ─
bar-used-fill = 
bar-used-fill-font = 6 bar-used-fill-font = 6
bar-used-empty = - bar-used-empty = -
bar-used-empty-font = 6 bar-used-empty-font = 6
@ -501,11 +520,11 @@ label-separator-foreground = #ffb52a
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/volume] [module/volume]
type = internal/alsa type = internal/alsa
speaker-mixer = IEC958 ;speaker-mixer =
headphone-mixer = Headphone ;headphone-mixer = Headphone
headphone-id = 9 ;headphone-id = 9
format-volume = <ramp-volume> <label-volume> format-volume = <ramp-volume> <label-volume>
label-muted = muted label-muted = muted
label-muted-foreground = #66 label-muted-foreground = #66
ramp-volume-0 = 奄 ramp-volume-0 = 奄
ramp-volume-1 = 奔 ramp-volume-1 = 奔

View File

@ -1,8 +1,7 @@
#!/bin/sh #!/bin/sh
# shellcheck disable=SC2016,SC2059 # shellcheck disable=SC2016,SC2059
KEYBOARD_ID="Corsair Corsair STRAFE Gaming Keyboard" KEYBOARD_ID="AT Translated Set 2 keyboard"
# cpm: characters per minute # cpm: characters per minute
# wpm: words per minute (1 word = 5 characters) # wpm: words per minute (1 word = 5 characters)
METRIC=wpm METRIC=wpm

View File

@ -7,7 +7,7 @@
METRIC=sec METRIC=sec
FORMAT=" %d $METRIC" FORMAT=" %d $METRIC"
INTERVAL=2 INTERVAL=2
case "$METRIC" in case "$METRIC" in

View File

@ -84,6 +84,7 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then
sun_set=$(echo "$current" | jq ".sys.sunset") sun_set=$(echo "$current" | jq ".sys.sunset")
now=$(date +%s) now=$(date +%s)
# Format of sunset/rise display and icons
if [ "$sun_rise" -gt "$now" ]; then if [ "$sun_rise" -gt "$now" ]; then
daytime="  $(get_duration "$((sun_rise-now))")" # Sun rise daytime="  $(get_duration "$((sun_rise-now))")" # Sun rise
elif [ "$sun_set" -gt "$now" ]; then elif [ "$sun_set" -gt "$now" ]; then
@ -92,7 +93,7 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then
daytime="  $(get_duration "$((sun_rise-now))")" # Unknown daytime="  $(get_duration "$((sun_rise-now))")" # Unknown
fi fi
# Format of resulting forecast
echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL$daytime" echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL$daytime"
#echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime" #echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
fi fi