Updates
This commit is contained in:
parent
79eff7ef55
commit
6c20fdbf8f
2
.bashrc
2
.bashrc
@ -30,7 +30,7 @@ alias screenshot='scrot'
|
||||
# GIT
|
||||
alias gs="git status"
|
||||
alias ga="git add"
|
||||
alias gc="git commit"
|
||||
alias gc="git commit -m"
|
||||
alias gp="git push"
|
||||
|
||||
# SCRIPTS
|
||||
|
Binary file not shown.
@ -62,6 +62,13 @@ if (os.path.isfile("/usr/bin/VBoxService")):
|
||||
else:
|
||||
terminal = "alacritty"
|
||||
|
||||
# --------------------------------------------------------
|
||||
# Check for Desktop/Laptop
|
||||
# --------------------------------------------------------
|
||||
|
||||
# Use output from /sys/class/dmi/id/chassis_type
|
||||
# 3 = Desktop
|
||||
|
||||
# --------------------------------------------------------
|
||||
# Set default apps
|
||||
# --------------------------------------------------------
|
||||
@ -255,15 +262,6 @@ screens = [
|
||||
text='|',
|
||||
foreground=ColorC,
|
||||
),
|
||||
# widget.CPU(),
|
||||
# widget.DF(
|
||||
# visible_on_warn=False,
|
||||
# mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e htop')},
|
||||
# ),
|
||||
# widget.TextBox(
|
||||
# text='|',
|
||||
# foreground=ColorC,
|
||||
# ),
|
||||
widget.Volume(
|
||||
fmt='Vol: {}',
|
||||
),
|
||||
@ -272,7 +270,17 @@ screens = [
|
||||
foreground=ColorC,
|
||||
),
|
||||
widget.Battery(),
|
||||
# widget.Backlight(),
|
||||
widget.TextBox(
|
||||
text='|',
|
||||
foreground=ColorC,
|
||||
),
|
||||
widget.GenPollText(
|
||||
name = "checkupdates",
|
||||
fmt="Updates: {}",
|
||||
update_interval = 3600,
|
||||
func = lambda: subprocess.check_output("/home/raabe/dotfiles/scripts/checkupdates.sh").decode()[:-1],
|
||||
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e yay')},
|
||||
),
|
||||
widget.TextBox(
|
||||
text='|',
|
||||
foreground=ColorC,
|
||||
|
19
scripts/checkupdates.sh
Executable file
19
scripts/checkupdates.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
format() {
|
||||
if [ "$1" -eq 0 ]; then
|
||||
echo '-'
|
||||
else
|
||||
echo "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
if ! updates_arch="$(checkupdates | wc -l)"; then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur="$(yay -Qum 2>/dev/null | wc -l)"; then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
echo "($(format $updates_arch)/$(format $updates_aur))"
|
Loading…
Reference in New Issue
Block a user