feat: conky, doas compatibility and dwm startup

This commit is contained in:
AngeD 2023-01-03 23:40:42 +01:00
parent f1fdfb2eb2
commit f002b34b6f
12 changed files with 54 additions and 18 deletions

2
bin/am
View file

@ -24,7 +24,7 @@ function umount_all() {
disks=($(mount | grep udisks2 | cut -f1 -d' '))
umount "${disks[@]}"
echo "unmounted ${disks[@]}"
echo "unmounted ${disks[*]}"
}
while getopts a o; do

View file

@ -27,7 +27,7 @@ while read -r line; do
QTY="$(echo "$line" | cut -d "$DELIM" -f 2)"
MARKET="$(get_value "$TO" "$COIN")"
VALUE="$(echo "$MARKET* $QTY" | bc)"
VALUE="$(echo "$MARKET * $QTY" | bc)"
TOTAL="$(echo "$TOTAL + $VALUE" | bc)"
printf "${BOLD}${COIN}${NORMAL}=%.2f€ " "$VALUE"

View file

@ -31,7 +31,8 @@ function add_opt() {
}
if ! [ -w '/var/run/docker.sock' ] && [ "$EUID" != 0 ]; then
exec sudo -- "$0" "$@"
command -v sudo > /dev/null && exec sudo -- "$0" "$@"
command -v doas > /dev/null && exec doas -- "$0" "$@"
fi
c=1

3
bin/lock Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
i3lock -ftni "$XDG_CONFIG_HOME/wallpapers/lock.png"

View file

@ -6,7 +6,7 @@ usage() {
exit
}
if [ "$1" != *.pdf ]; then
if [[ "$1" != *.pdf ]]; then
usage
fi

View file

@ -1,10 +1,13 @@
#!/bin/bash
set -e
command -v sudo > /dev/null && exec SUDO='sudo'
command -v doas > /dev/null && exec SUDO='doas'
CUR_LIGHT="$(set-light "$@")"
SCREENS="$(sudo ddcutil detect | awk '$1 == "Display" {print $2}')"
SCREENS="$($SUDO ddcutil detect | awk '$1 == "Display" {print $2}')"
for i in $SCREENS; do
sudo ddcutil -d "$i" setvcp 10 "$CUR_LIGHT"
$SUDO ddcutil -d "$i" setvcp 10 "$CUR_LIGHT"
done