diff --git a/polybar/config b/polybar/config index 477a06e..c91a3f4 100644 --- a/polybar/config +++ b/polybar/config @@ -65,7 +65,7 @@ font-3 = Noto Sans CJK JP:size=10:antialias=true;0 modules-left = bspwm ; modules-center = winname -modules-right = xwindow spotify pulseaudio cpu cputemp date +modules-right = xwindow spotify pulseaudio cpu filesystem cputemp date ;override-redirect = true @@ -112,7 +112,7 @@ font-3 = Noto Sans CJK JP:size=10:antialias=true;0 modules-left = bspwm_small ; modules-center = winname -modules-right = xwindow spotify pulseaudio battery wlan cpu cputemp date +modules-right = xwindow spotify pulseaudio battery wlan cpu filesystem cputemp date ;wm-restack = bspwm diff --git a/polybar/launch.sh b/polybar/launch.sh index d87d8c8..91c4417 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -1,3 +1,5 @@ +#!/bin/bash + if type "xrandr"; then for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do MONITOR=$m polybar --reload $(cat /etc/hostname) & diff --git a/scripts/ctl-brightness b/scripts/ctl-brightness index 8df7233..b4843a5 100755 --- a/scripts/ctl-brightness +++ b/scripts/ctl-brightness @@ -1,5 +1,3 @@ #!/bin/bash -if [[ $(cat /etc/hostname) == "uzui" ]]; then - "${XDG_CONFIG_HOME}"/bin/uzui/oled-brightness "$@" -fi +${XDG_CONFIG_HOME}/bin/$(cat /etc/hostname)/ctl-brightness "$@" diff --git a/scripts/gojou/ctl-brightness b/scripts/gojou/ctl-brightness new file mode 100755 index 0000000..98e40e4 --- /dev/null +++ b/scripts/gojou/ctl-brightness @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "Cannot control brightness, check monitor" diff --git a/scripts/uzui/ctl-brightness b/scripts/uzui/ctl-brightness new file mode 100755 index 0000000..16425d7 --- /dev/null +++ b/scripts/uzui/ctl-brightness @@ -0,0 +1,32 @@ +#!/bin/sh + +BR_DIR="/sys/class/backlight/intel_backlight/" + + +test -d "$BR_DIR" || exit 0 + +MIN=0 +MAX=$(cat "$BR_DIR/max_brightness") +VAL=$(cat "$BR_DIR/brightness") + +if [ "$1" = down ]; then + VAL=$((VAL-4096)) +else + VAL=$((VAL+4096)) +fi + +if [ "$VAL" -lt $MIN ]; then + VAL=$MIN +elif [ "$VAL" -gt $MAX ]; then + VAL=$MAX +fi + +PERCENT=`echo "$VAL / $MAX" | bc -l` + +export XAUTHORITY=$HOME/.Xauthority # CHANGE "ivo" TO YOUR USER +export DISPLAY=:0 + +echo "xrandr --output eDP-1 --brightness $PERCENT" > /tmp/oled-brightness.log +xrandr --output eDP-1 --brightness $PERCENT + +echo $VAL | sudo tee "$BR_DIR/brightness" diff --git a/tex/handout.cls b/tex/handout.cls index 15077ff..58632b9 100644 --- a/tex/handout.cls +++ b/tex/handout.cls @@ -23,7 +23,7 @@ \RequirePackage{listings} \RequirePackage{geometry} \RequirePackage{graphicx} -\RequirePackage[dvipsnames]{xcolor} +\RequirePackage[usenames,dvipsnames]{xcolor} \RequirePackage{bm} \RequirePackage{siunitx}[=v2] \RequirePackage{physics} diff --git a/zsh/zshrc b/zsh/zshrc index db059b8..489fc3e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,4 +1,4 @@ -export PATH=$HOME/.config/bin:$HOME/.local/bin:$HOME/.local/share/texlive/2023/bin/x86_64-linux:$HOME/.local/share/cargo/bin:/home/emh/.local/share/solana/install/active_release/bin:$PATH +export PATH=$HOME/.config/bin/$(cat /etc/hostname):$HOME/.config/bin:$HOME/.local/bin:$HOME/.local/share/texlive/2023/bin/x86_64-linux:$HOME/.local/share/cargo/bin:/home/emh/.local/share/solana/install/active_release/bin:$PATH export MANPATH=$MANPATH:$HOME/.local/share/texlive/2023/texmf-dist/doc/man export INFOPATH=$INFOPATH:$HOME/.local/share/texlive/2023/texmf-dist/doc/info