Add script for counting pacman updates in polybar
This commit is contained in:
@@ -31,6 +31,7 @@ fi
|
||||
# Create symlinks
|
||||
ln -s $PWD/i3_config $HOME/.config/i3/config
|
||||
ln -s $PWD/alacritty.yml $HOME/.config/alacritty/alacritty.yml
|
||||
sudo ln -s $PWD/polybar/pacman-updates-module.sh /usr/bin/count-pacman-updates
|
||||
ln -s $PWD/polybar/config.ini $HOME/.config/polybar/config
|
||||
ln -s $PWD/polybar/launch.sh $HOME/.config/polybar/launch.sh
|
||||
ln -s $PWD/rofi_config.rasi $HOME/.config/rofi/config.rasi
|
||||
|
||||
@@ -18,7 +18,7 @@ font-2 = FontAwesome5FreeSolid:size=11
|
||||
|
||||
modules-left = workspaces active-window
|
||||
modules-center = date
|
||||
modules-right = keyboard-layout volume-control network power-menu
|
||||
modules-right = pacman-updates keyboard-layout volume-control network power-menu
|
||||
|
||||
module-margin = 1
|
||||
|
||||
@@ -70,6 +70,17 @@ label = %time% %date%
|
||||
; RIGHT MODULES
|
||||
;
|
||||
|
||||
[module/pacman-updates]
|
||||
type = custom/script
|
||||
|
||||
exec = count-pacman-updates
|
||||
interval = 300
|
||||
|
||||
format = <label>
|
||||
format-prefix = " "
|
||||
|
||||
label = %output% updates
|
||||
|
||||
[module/keyboard-layout]
|
||||
type = internal/xkeyboard
|
||||
|
||||
|
||||
5
polybar/pacman-updates-module.sh
Executable file
5
polybar/pacman-updates-module.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
updates=$(pacman -Qu | wc -l)
|
||||
|
||||
echo $updates
|
||||
Reference in New Issue
Block a user