mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Compare commits
7 Commits
ea5fe4ec45
...
1ebff0faed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ebff0faed | ||
|
|
b8cd0ab495 | ||
|
|
c550a7c6e5 | ||
|
|
7bf7b73a4e | ||
|
|
c389d429bb | ||
|
|
fc1cd24557 | ||
|
|
236b082078 |
@ -31,3 +31,4 @@ progressbar_elapsed_color = blue:b
|
|||||||
statusbar_color = red
|
statusbar_color = red
|
||||||
statusbar_time_color = cyan:b
|
statusbar_time_color = cyan:b
|
||||||
execute_on_song_change="pkill -RTMIN+11 dwmblocks"
|
execute_on_song_change="pkill -RTMIN+11 dwmblocks"
|
||||||
|
execute_on_player_state_change="pkill -RTMIN+11 dwmblocks"
|
||||||
|
|||||||
@ -16,7 +16,26 @@ done; unset command
|
|||||||
se() {
|
se() {
|
||||||
choice="$(find ~/.local/bin -mindepth 1 -printf '%P\n' | fzf)"
|
choice="$(find ~/.local/bin -mindepth 1 -printf '%P\n' | fzf)"
|
||||||
[ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
|
[ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
|
||||||
;}
|
}
|
||||||
|
|
||||||
|
weath() {
|
||||||
|
if [ "$1" = 'cp' ]; then
|
||||||
|
[ -z "$2" ] && sed 's/\x1b\[[^m]*m//g' "${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" | xclip -selection clipboard &&
|
||||||
|
notify-send "Weather forecast for '$LOCATION' copied to clipboard." ||
|
||||||
|
{ data="$(curl -sfm 5 "${WTTRURL:-wttr.in}/$2?T")" &&
|
||||||
|
notify-send "Weather forecast for '$2' copied to clipboard." &&
|
||||||
|
echo "$data" | xclip -selection clipboard ||
|
||||||
|
notify-send 'Failed to get weather forecast!' 'Check your internet connection and if the location is correct.'; }
|
||||||
|
else
|
||||||
|
[ -n "$2" ] &&
|
||||||
|
notify-send "Invalid option '$1'! The only valid option is 'cp'." &&
|
||||||
|
return 1
|
||||||
|
|
||||||
|
[ -z "$1" ] && less -S "${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" ||
|
||||||
|
data="$(curl -sfm 5 "${WTTRURL:-wttr.in}/$1")" && echo "$data" | less -S ||
|
||||||
|
notify-send 'Failed to get weather forecast!' 'Check your internet connection and if the location is correct.'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Verbosity and settings that you pretty much just always are going to want.
|
# Verbosity and settings that you pretty much just always are going to want.
|
||||||
alias \
|
alias \
|
||||||
@ -58,4 +77,3 @@ alias \
|
|||||||
lf="lfub" \
|
lf="lfub" \
|
||||||
magit="nvim -c MagitOnly" \
|
magit="nvim -c MagitOnly" \
|
||||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||||
weath="less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" \
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ inputaudio="$1"
|
|||||||
ext="${1##*.}"
|
ext="${1##*.}"
|
||||||
|
|
||||||
# Get a safe file name from the book.
|
# Get a safe file name from the book.
|
||||||
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
escbook="$(echo "$booktitle" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||||
|
|
||||||
! mkdir -p "$escbook" &&
|
! mkdir -p "$escbook" &&
|
||||||
echo "Do you have write access in this directory?" &&
|
echo "Do you have write access in this directory?" &&
|
||||||
@ -31,7 +31,7 @@ do
|
|||||||
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" "
|
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" "
|
||||||
fi
|
fi
|
||||||
title="$(echo "$x" | cut -d' ' -f2-)"
|
title="$(echo "$x" | cut -d' ' -f2-)"
|
||||||
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
esctitle="$(echo "$title" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||||
track="$((track+1))"
|
track="$((track+1))"
|
||||||
start="$end"
|
start="$end"
|
||||||
done < "$2"
|
done < "$2"
|
||||||
|
|||||||
@ -7,7 +7,7 @@ url="${WTTRURL:-wttr.in}"
|
|||||||
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
|
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
|
||||||
|
|
||||||
# Get a weather report from 'wttr.in' and save it locally.
|
# Get a weather report from 'wttr.in' and save it locally.
|
||||||
getforecast() { curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
|
getforecast() { timeout --signal=1 2s curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
|
||||||
|
|
||||||
# Forecast should be updated only once a day.
|
# Forecast should be updated only once a day.
|
||||||
checkforecast() {
|
checkforecast() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user