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

View File

@ -110,16 +110,16 @@ env:
#multiplier: 3 #multiplier: 3
# Font configuration # Font configuration
font: #font:
# Normal (roman) font face # Normal (roman) font face
normal: #normal:
# Font family # Font family
# #
# Default: # Default:
# - (macOS) Menlo # - (macOS) Menlo
# - (Linux/BSD) monospace # - (Linux/BSD) monospace
# - (Windows) Consolas # - (Windows) Consolas
family: DejaVuSansMono Nerd Font #family: monospace
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Regular #style: Regular

14
.config/conky/conky.conf Normal file
View File

@ -0,0 +1,14 @@
conky.config = {
background = false,
out_to_console = true,
out_to_x = false,
short_units = true,
top_cpu_separate = true,
total_run_times = 0,
update_interval = 30,
use_spacer = 'none',
};
conky.text = [[
 ${loadavg 1} |  $memeasyfree |  $acpitemp |  $pa_sink_volume |  ${battery_percent BAT1} | ${time %a %m/%d %R}
]];

@ -1 +1 @@
Subproject commit 28baed769815c54b243f0df606ccb4114287e772 Subproject commit 8c71c6c5edfa447aaa867858e2e913340ea964b7

@ -1 +1 @@
Subproject commit 94e171daba4dd76fbf89c6245c69bea949a94b10 Subproject commit 6b02b9ca54709a98d5e947c24b379037358ba480

View File

@ -1,14 +1,14 @@
# system # system
alias cls='clear && ls -lah' alias cls='clear && ls -lah'
alias tmp='cd $(mktemp -d)' alias tmp='cd $(mktemp -d)'
alias update='paru -Syu; config submodule update --remote --recursive --init' alias update='sudo pacman -Syu; config submodule update --remote --recursive --init'
alias vi='$EDITOR' alias vi='$EDITOR'
# conf # conf
alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
alias viconf='(cd $XDG_CONFIG_HOME/nvim && $EDITOR .)' alias viconf='(cd $XDG_CONFIG_HOME/nvim && $EDITOR .)'
alias wconf='(cd $HOME/.config/suckless/dwm* && $EDITOR .)' alias wconf='(cd $HOME/.config/suckless/dwm* && $EDITOR .)'
alias zconf='(cd $ZDOTDIR/ && $EDITOR . && . $ZDOTDIR/.zshrc)' alias zconf='(cd $ZDOTDIR/ && $EDITOR .) && . $ZDOTDIR/.zshrc'
# dev # dev
alias epitest='docker run -it --rm -v $PWD:/usr/app/ epitechcontent/epitest-docker bash' alias epitest='docker run -it --rm -v $PWD:/usr/app/ epitechcontent/epitest-docker bash'
@ -24,6 +24,6 @@ function coloralias() {
$1 $(echo - "${@:2}" | sed 's/--color=\w\+/--color=always/') $1 $(echo - "${@:2}" | sed 's/--color=\w\+/--color=always/')
} }
alias sudo='sudo ' alias sudo='doas '
alias watch='coloralias watch -c -- ' alias watch='coloralias watch -c -- '
alias xargs='xargs ' alias xargs='xargs '

View File

@ -2,6 +2,7 @@
# keyboard # keyboard
setxkbmap us altgr-intl setxkbmap us altgr-intl
numlockx
# mouse # mouse
( (
@ -14,8 +15,22 @@ setxkbmap us altgr-intl
# display # display
xrandr \ xrandr \
--output eDP-1 --auto --primary \ --output eDP-1 --pos 0x0 --mode 1920x1080 --rate 60 --primary \
--output DisplayPort-1-2 --auto --pos 1920x0 \ --output DisplayPort-1-2 --pos 1920x0 --auto \
--output DisplayPort-1-1 --auto --pos 3840x0 --output DisplayPort-1-1 --pos 3840x0 --auto
# startup
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
picom &
redshift &
feh --bg-tile "$XDG_CONFIG_HOME/wallpapers/landscape.png" --no-fehbg
nm-applet &
dunst &
xset dpms 300 15 # dim 5m, lock 5m15s
xss-lock lock &
#bar
(conky | while read LINE; do xsetroot -name "$LINE"; done) &
exec dwm exec dwm

2
bin/am
View File

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

View File

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

View File

@ -31,7 +31,8 @@ function add_opt() {
} }
if ! [ -w '/var/run/docker.sock' ] && [ "$EUID" != 0 ]; then 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 fi
c=1 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 exit
} }
if [ "$1" != *.pdf ]; then if [[ "$1" != *.pdf ]]; then
usage usage
fi fi

View File

@ -1,10 +1,13 @@
#!/bin/bash #!/bin/bash
set -e set -e
command -v sudo > /dev/null && exec SUDO='sudo'
command -v doas > /dev/null && exec SUDO='doas'
CUR_LIGHT="$(set-light "$@")" 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 for i in $SCREENS; do
sudo ddcutil -d "$i" setvcp 10 "$CUR_LIGHT" $SUDO ddcutil -d "$i" setvcp 10 "$CUR_LIGHT"
done done