1
0
Fork 0

clcleanup

This commit is contained in:
Luca Bilke 2024-02-08 17:04:57 +01:00
parent 633b06c813
commit 6ae9b07674
6 changed files with 12 additions and 12 deletions

View file

@ -30,8 +30,6 @@ cmd open-with ${{
rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -p $method $fx
}}
cmd mkdir &mkdir -p "$(echo $* | tr ' ' '\ ')"
cmd trash &{{
for f in $fx; do
trash-put $f &
@ -211,7 +209,7 @@ map P link
map <c-g> lazygit
map <a-g> $gdu
map <c-v> pushedit
map <c-n> push :mkdir<space>
map <c-n> push :&mkdir<space>-p<space>
map N push :&touch<space>
map <c-r> reload
map <c-s> set hidden!

View file

@ -3,7 +3,7 @@ local icons = require("config.icons")
M.opts = {
dev = {
path = (os.getenv("XDG_DOCUMENTS_DIR") or "~/Documents") .. "/code/nvim-plugins",
path = (os.getenv("XDG_DOCUMENTS_DIR") or "~/Documents") .. "/dev/nvim",
},
install = {
missing = true,

View file

@ -10,7 +10,7 @@ if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
command lf "$@"
else
[ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf"
export FIFO_UEBERZUG="$XDG_CACHE_HOME/lf/ueberzug-$$"
export FIFO_UEBERZUG="$XDG_RUNTIME_DIR/ueberzug-$$"
mkfifo "$FIFO_UEBERZUG"
ueberzug layer -s -p json <"$FIFO_UEBERZUG" &
exec 3>"$FIFO_UEBERZUG"

View file

@ -1,18 +1,18 @@
#!/bin/sh
trap 'trap - 2 15; kill $pids $(pidof xcape) 1>/dev/null 2>&1' 2 15 EXIT
trap 'kill $pids $(pidof xcape) 1>/dev/null 2>&1' 2 15 EXIT
LOGFILE="${LOGFILE:-${HOME}/.local/log/session.log}"
LOGFILE="${LOGFILE:-${HOME}/.local/log/session-$(date -I).log}"
infolog() {
while IFS= read -r line; do
echo "[$(date +%X)][INF][$1] $line" >"${LOGFILE}"
printf "%b" "[$(date +%X)][INF][$1]\t$line\n" >>"${LOGFILE}"
done
}
errorlog() {
while IFS= read -r line; do
echo "[$(date +%X)][ERR][$1] $line" >"${LOGFILE}"
printf "%b" "[$(date +%X)][ERR][$1]\t$line\n" >>"${LOGFILE}"
done
}

View file

@ -3,11 +3,13 @@
# If the colors change too often it could result in the statusbar disappearing
. "$HOME/.local/libexec/statusbar/colors"
cache=/tmp/cpubarscache
cache=$XDG_RUNTIME_DIR/cpubarscache
temp=$(sensors | awk '/CPU/ {printf ("%.f°C", $2)}' | tr -d "+")
[ -n "$temp" ] && temp="$temp "
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat 2>/dev/null)
[ ! -f $cache ] && echo "$stats" >"$cache" && exit
[ ! -f "$cache" ] && echo "$stats" >"$cache" && exit
old=$(cat "$cache")
printf "%b" " $temp"

View file

@ -8,7 +8,7 @@ update() {
read -r i <"$arg"
sum=$((sum + i))
done
cache=/tmp/${1##*/}
cache=$XDG_RUNTIME_DIR/${1##*/}
[ -f "$cache" ] && read -r old <"$cache" || old=0
printf "%b" "$sum\n" >"$cache"
printf "%b" "$((sum - old))\n"