mirror of
https://github.com/vbrandl/dotfiles
synced 2024-11-22 07:53:51 +01:00
Add custom scripts
This commit is contained in:
parent
e44ed12635
commit
216f510d55
7
bin/khal_sync.sh
Executable file
7
bin/khal_sync.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
notify_khal() {
|
||||
while inotifywait -r -e modify -e create -e delete "${HOME}/.calendars/"; do
|
||||
"${HOME}/bin/vdirsyncer.sh"
|
||||
done
|
||||
}
|
||||
notify_khal &
|
7
bin/lock.sh
Executable file
7
bin/lock.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
notify-send "DUNST_COMMAND_PAUSE"
|
||||
|
||||
i3lock-fancy -n
|
||||
|
||||
notify-send "DUNST_COMMAND_RESUME"
|
13
bin/polybar.sh
Executable file
13
bin/polybar.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# kill running polybar instances
|
||||
killall -q polybar
|
||||
|
||||
# wait for termination
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
||||
MONITOR=$m polybar --reload example &
|
||||
done
|
||||
|
||||
polybar example &
|
31
bin/tm
Executable file
31
bin/tm
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# abort if we're already inside a TMUX session
|
||||
[ "$TMUX" == "" ] || exit 0
|
||||
# startup a "default" session if non currently exists
|
||||
# tmux has-session -t _default || tmux new-session -s _default -d
|
||||
|
||||
# present menu for user to choose which workspace to open
|
||||
PS3="Please choose your session: "
|
||||
options=($(tmux list-sessions -F "#S" 2>/dev/null) "New Session" "zsh")
|
||||
echo "Available sessions"
|
||||
echo "------------------"
|
||||
echo " "
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"New Session")
|
||||
read -p "Enter new session name: " SESSION_NAME
|
||||
tmux new -s "$SESSION_NAME"
|
||||
break
|
||||
;;
|
||||
"zsh")
|
||||
zsh --login
|
||||
break;;
|
||||
*)
|
||||
tmux attach-session -t $opt
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# vim: set filetype=sh ts=4 sw=4 tw=120 noet :
|
7
bin/vdirsyncer.sh
Executable file
7
bin/vdirsyncer.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
/usr/bin/vdirsyncer sync
|
||||
/usr/bin/vdirsyncer metasync
|
||||
khal
|
Loading…
Reference in New Issue
Block a user