mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
Update 16.08.2023
This commit is contained in:
15
.local/bin/chtsh
Executable file
15
.local/bin/chtsh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
selected=$(cat ~/.config/tmux/tmux-cht-languages ~/.config/tmux/tmux-cht-command | fzf)
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -p "Enter Query: " query
|
||||
|
||||
if rg -qs "$selected" ~/.config/tmux/tmux-cht-languages; then
|
||||
query=$(echo $query | tr ' ' '+')
|
||||
tmux neww zsh -c "echo \"curl cht.sh/$selected/$query/\" & curl cht.sh/$selected/$query & while [ : ]; do sleep 1; done"
|
||||
else
|
||||
tmux neww zsh -c "curl -s cht.sh/$selected~$query | less"
|
||||
fi
|
||||
@@ -20,9 +20,9 @@ cd "$dir" || exit 1
|
||||
textype() {
|
||||
textarget="$(getcomproot "$file" || echo "$file")"
|
||||
echo "$textarget"
|
||||
command="luatex"
|
||||
(head -n5 "$textarget" | grep -qi "xelatex") && command="xelatex"
|
||||
$command --output-directory="${textarget%/*}" "${textarget%.*}"
|
||||
command="xelatex"
|
||||
(head -n5 "$textarget" | grep -qi "pdflatex") && command="pdflatex"
|
||||
$command -shell-escape --output-directory="${textarget%/*}" "${textarget%.*}"
|
||||
grep -qi addbibresource "$textarget" &&
|
||||
biber --input-directory "${textarget%/*}" "${textarget%.*}" &&
|
||||
$command --output-directory="${textarget%/*}" "${textarget%.*}" &&
|
||||
|
||||
0
.local/bin/imv-open
Normal file → Executable file
0
.local/bin/imv-open
Normal file → Executable file
7
.local/bin/lock
Executable file
7
.local/bin/lock
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
for o in HDMI-A-2 DP-1 eDP-1; do
|
||||
grim -o "$o" "/tmp/$o.png"
|
||||
corrupter "/tmp/$o.png" "/tmp/$o.png" &
|
||||
done
|
||||
wait
|
||||
exec gtklock "$@"
|
||||
3
.local/bin/song-change
Executable file
3
.local/bin/song-change
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
song=$(playerctl metadata --player=spotify --format "Title: {{ xesam:title }}\nArtist: {{ xesam:artist }}\nAlbum: {{ xesam:album }}")
|
||||
notify-send "Music Player" "$song" --icon=~/.config/spotifyd/spotify.png
|
||||
25
.local/bin/tmux-sessionizer
Executable file
25
.local/bin/tmux-sessionizer
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
else
|
||||
selected=$(find ~/repos/Rust/ ~/repos/ ~/vimwiki/university/3rd-semester/ ~/Nextcloud/repos/ -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
fi
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
selected_name=$(basename "$selected" | tr . _)
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||
tmux new-session -s "$selected_name" -c "$selected"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! tmux has-session -t="$selected_name" 2>/dev/null; then
|
||||
tmux new-session -ds "$selected_name" -c "$selected"
|
||||
fi
|
||||
|
||||
tmux switch-client -t "$selected_name"
|
||||
Reference in New Issue
Block a user