diff --git a/README.md b/README.md index f69fe12..d6e3bca 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ + Compositor: [picom](https://github.com/ibhagwan/picom) + Notifications: dunst + Shell: zsh -+ Term: alacritty ++ Terminal: alacritty + WM: i3 ## Programs diff --git a/files/.config/dunst/dunstrc b/files/.config/dunst/dunstrc index 07ca4a3..f89b432 100644 --- a/files/.config/dunst/dunstrc +++ b/files/.config/dunst/dunstrc @@ -126,7 +126,7 @@ # %n progress value if set without any extra characters # %% Literal % # Markup is allowed - format = "%s\n%b" + format = "%s\n%b" # Alignment of message text. # Possible values are "left", "center" and "right". @@ -136,7 +136,7 @@ # Show age of message if message is older than show_age_threshold # seconds. # Set to -1 to disable. - show_age_threshold = -1 + show_age_threshold = 5 # Split notifications into multiple lines if they don't fit into # geometry. diff --git a/files/.config/picom.conf b/files/.config/picom.conf index a7a76cf..3a1842d 100644 --- a/files/.config/picom.conf +++ b/files/.config/picom.conf @@ -17,7 +17,7 @@ opacity-rule = [ #backend = "glx"; #blur: { # method: "dual_kawase"; -# size = 2; +# size = 8; # strength = 0; # background = false; # background-frame = false; diff --git a/files/.config/polybar/config b/files/.config/polybar/config index 029d406..3ad0507 100644 --- a/files/.config/polybar/config +++ b/files/.config/polybar/config @@ -30,7 +30,7 @@ separator = modules-left = i3 xwindow modules-center = spotify -modules-right = network volume backlight battery date +modules-right = cpu temp memory network volume backlight battery date tray-position = right tray-padding = 1 @@ -46,7 +46,7 @@ wm-restack = i3 [bar/desktop] inherit = bar/laptop -modules-right = update_yay volume date +modules-right = update_yay cpu temp memory volume date [bar/desktop_second] inherit = bar/desktop @@ -199,7 +199,7 @@ tail = true interval = 60 click-left = alacritty -e yay & -format-prefix = " " +format-prefix = " " format-prefix-foreground = ${colors.accent-alt} format-underline = ${colors.accent} @@ -211,3 +211,29 @@ interval = 1 format-prefix = " " format-prefix-foreground = ${colors.accent-alt} 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} diff --git a/files/.config/polybar/scripts/cpu.sh b/files/.config/polybar/scripts/cpu.sh new file mode 100755 index 0000000..4c58622 --- /dev/null +++ b/files/.config/polybar/scripts/cpu.sh @@ -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 diff --git a/files/.config/polybar/scripts/memory.sh b/files/.config/polybar/scripts/memory.sh new file mode 100755 index 0000000..1052346 --- /dev/null +++ b/files/.config/polybar/scripts/memory.sh @@ -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 diff --git a/files/.config/polybar/scripts/temp.sh b/files/.config/polybar/scripts/temp.sh new file mode 100755 index 0000000..67a357c --- /dev/null +++ b/files/.config/polybar/scripts/temp.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "$(sensors | grep Tctl | head -1 | awk '{print $2}')" diff --git a/files/scripts/fix-mouse.sh b/files/scripts/fix-mouse.sh new file mode 100755 index 0000000..cbc5bb0 --- /dev/null +++ b/files/scripts/fix-mouse.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +xinput --set-prop 14 'libinput Accel Profile Enabled' 0, 1