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}
${goto 0}${color2}$alignc${memgraph 40,305}${color}
${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
#
# CPU Display
${color2}${voffset 4}${alignr}${font Bitstream Vera Sans:size=10}CPU ${color}
# Chipset
${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}
# 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
${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

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+comma move container to workspace $ws94; workspace $ws94
# Move to workspace
bindsym $mod+backslash workspace number $ws99 # Chat
bindsym $mod+bracketright workspace number $ws98 # Mail
bindsym $mod+apostrophe workspace number $ws97 # Sec
bindsym $mod+slash workspace number $ws96 # Web
bindsym $mod+period workspace number $ws95 # Terminal
bindsym $mod+comma workspace number $ws94 # Musak
bindsym $mod+backslash workspace number $ws99
bindsym $mod+bracketright workspace number $ws98
bindsym $mod+apostrophe workspace number $ws97
bindsym $mod+slash workspace number $ws96
bindsym $mod+period workspace number $ws95
bindsym $mod+comma workspace number $ws94
# 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"] 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"] resize set height 600
for_window [class="Bitwarden"] resize set width 800
@ -241,8 +245,9 @@ bindsym $mod+Return exec i3-sensible-terminal
# start a terminal
# Uses $TERMINAL environment setting
# bindsym $mod+Return exec terminal
# Open dropdown terminal using tilix quake mode
bindsym $mod+t exec tilix -q
# Start / kill conky
bindsym $mod+t exec pkill compton
bindsym $mod+Shift+t exec compton
# Firefox
bindsym $mod+Shift+f exec firefox
# Bluetooth device settings
@ -359,11 +364,15 @@ 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
# finds out, if available)
bar {
status_command i3blocks
}
#bar {
#
# status_command i3blocks
#}
# Theme colors
# class border backgr. text indic. child_border

View File

@ -2,25 +2,29 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[bar/top]
; Polybar Position
monitor = ${env:MONITOR}
width = 100%
height = 34
height = 30
; 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
line-color = ${bar/bottom.background}
line-size = 16
spacing = 2
tray-background = #00111111
; Polybar Padding
padding-left = 0
padding-right = 5
; Margin Between Modules
module-margin = 4
module-margin = 2
; Type font
font-0 = NotoSans-Regular:size=8;0
@ -30,14 +34,18 @@ font-2 = Noto Sans Mono:size=8;0
; Modules
modules-left = powermenu weather
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]
; Position, size of polybar
monitor = ${env:MONITOR}
bottom = true
width = 100%
height = 27
height = 20
; Use top bar colors
background = ${bar/top.background}
@ -51,8 +59,8 @@ padding-left = 6
padding-right = 6
; Margins between modules
module-margin-left = 4
module-margin-right = 6
module-margin-left = 1
module-margin-right = 2
; Font settings, order matters
; 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-2 = Noto Sans Mono:size=8;0
; Modules
modules-left = temp-cpu cpu
modules-left = temp-cpu cpu memfree memory
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -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
; to find path to desired file
; 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>
tail = true
label =  %output% F°
label = CPU: %output%
; GPU Temp
;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -369,25 +379,34 @@ date = %%{F#999}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{F-}
;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/date]
type = internal/date
date =  %%{F#99}%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 = %%{F#aaa}%Y-%m-%d%%{F-} %%{F#fff}%H:%M%%{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
;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/memory]
type = internal/memory
format = <label> <bar-used>
label = 
bar-used-width = 30
format = <bar-used>
label = RAM:
bar-used-width = 15
bar-used-foreground-0 = #aaff77
bar-used-foreground-1 = #aaff77
bar-used-foreground-2 = #fba922
bar-used-foreground-3 = #ff5555
bar-used-indicator = |
bar-used-indicator =
bar-used-indicator-font = 6
bar-used-indicator-foreground = #ff
bar-used-fill = ─
bar-used-fill = 
bar-used-fill-font = 6
bar-used-empty = -
bar-used-empty-font = 6
@ -501,11 +520,11 @@ label-separator-foreground = #ffb52a
;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/volume]
type = internal/alsa
speaker-mixer = IEC958
headphone-mixer = Headphone
headphone-id = 9
;speaker-mixer =
;headphone-mixer = Headphone
;headphone-id = 9
format-volume = <ramp-volume> <label-volume>
label-muted = muted
label-muted = muted
label-muted-foreground = #66
ramp-volume-0 = 奄
ramp-volume-1 = 奔

View File

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

View File

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

View File

@ -84,15 +84,16 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then
sun_set=$(echo "$current" | jq ".sys.sunset")
now=$(date +%s)
# Format of sunset/rise display and icons
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
daytime=" $(get_duration "$((sun_set-now))")" # Sun set
daytime=" $(get_duration "$((sun_set-now))")" # Sun set
else
daytime=" $(get_duration "$((sun_rise-now))")" # Unknown
daytime=" $(get_duration "$((sun_rise-now))")" # Unknown
fi
echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
# 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"
fi