Update Polybar

This commit is contained in:
Marco Thomas
2020-11-11 19:13:02 +01:00
parent ac1c15d128
commit 9b66bdd5f5
8 changed files with 57 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
+ Compositor: [picom](https://github.com/ibhagwan/picom) + Compositor: [picom](https://github.com/ibhagwan/picom)
+ Notifications: dunst + Notifications: dunst
+ Shell: zsh + Shell: zsh
+ Term: alacritty + Terminal: alacritty
+ WM: i3 + WM: i3
## Programs ## Programs

View File

@@ -126,7 +126,7 @@
# %n progress value if set without any extra characters # %n progress value if set without any extra characters
# %% Literal % # %% Literal %
# Markup is allowed # Markup is allowed
format = "<b>%s</b>\n%b" format = "<b>%s</b>\n%b"
# Alignment of message text. # Alignment of message text.
# Possible values are "left", "center" and "right". # Possible values are "left", "center" and "right".
@@ -136,7 +136,7 @@
# Show age of message if message is older than show_age_threshold # Show age of message if message is older than show_age_threshold
# seconds. # seconds.
# Set to -1 to disable. # Set to -1 to disable.
show_age_threshold = -1 show_age_threshold = 5
# Split notifications into multiple lines if they don't fit into # Split notifications into multiple lines if they don't fit into
# geometry. # geometry.

View File

@@ -17,7 +17,7 @@ opacity-rule = [
#backend = "glx"; #backend = "glx";
#blur: { #blur: {
# method: "dual_kawase"; # method: "dual_kawase";
# size = 2; # size = 8;
# strength = 0; # strength = 0;
# background = false; # background = false;
# background-frame = false; # background-frame = false;

View File

@@ -30,7 +30,7 @@ separator =
modules-left = i3 xwindow modules-left = i3 xwindow
modules-center = spotify modules-center = spotify
modules-right = network volume backlight battery date modules-right = cpu temp memory network volume backlight battery date
tray-position = right tray-position = right
tray-padding = 1 tray-padding = 1
@@ -46,7 +46,7 @@ wm-restack = i3
[bar/desktop] [bar/desktop]
inherit = bar/laptop inherit = bar/laptop
modules-right = update_yay volume date modules-right = update_yay cpu temp memory volume date
[bar/desktop_second] [bar/desktop_second]
inherit = bar/desktop inherit = bar/desktop
@@ -199,7 +199,7 @@ tail = true
interval = 60 interval = 60
click-left = alacritty -e yay & click-left = alacritty -e yay &
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colors.accent-alt} format-prefix-foreground = ${colors.accent-alt}
format-underline = ${colors.accent} format-underline = ${colors.accent}
@@ -211,3 +211,29 @@ interval = 1
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colors.accent-alt} format-prefix-foreground = ${colors.accent-alt}
format-underline = ${colors.accent} format-underline = ${colors.accent}
[module/cpu]
type = custom/script
exec = ~/.config/polybar/scripts/cpu.sh
click-left = ~/.config/polybar/scripts/cpu.sh --popup
format-prefix = " "
format-prefix-foreground = ${colors.accent-alt}
format-underline = ${colors.accent}
[module/memory]
type = custom/script
exec = ~/.config/polybar/scripts/memory.sh
click-left = ~/.config/polybar/scripts/memory.sh --popup
format-prefix = " "
format-prefix-foreground = ${colors.accent-alt}
format-underline = ${colors.accent}
[module/temp]
type = custom/script
exec = ~/.config/polybar/scripts/temp.sh
format-prefix = " "
format-prefix-foreground = ${colors.accent-alt}
format-underline = ${colors.accent}

View File

@@ -0,0 +1,9 @@
#!/bin/sh
case "$1" in
--popup)
notify-send "CPU time (%)" "$(ps axch -o cmd:10,pcpu k -pcpu | head | awk '$0=$0"%"' )"
;;
*)
echo "$(grep 'cpu ' /proc/stat | awk '{cpu_usage=($2+$4)*100/($2+$4+$5)} END {printf "%0.2f%", cpu_usage}')"
;;
esac

View File

@@ -0,0 +1,9 @@
#!/bin/sh
case "$1" in
--popup)
notify-send "Memory (%)" "$(ps axch -o cmd:10,pmem k -pmem | head | awk '$0=$0"%"' )"
;;
*)
echo "$(free -h --si | awk '/^Mem:/ {print $3 "/" $2}')"
;;
esac

View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "$(sensors | grep Tctl | head -1 | awk '{print $2}')"

3
files/scripts/fix-mouse.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
xinput --set-prop 14 'libinput Accel Profile Enabled' 0, 1