forked from kunsi/dotfiles
add .bin and .screenlayout
This commit is contained in:
parent
03e1d4cd1d
commit
902a9187e5
10 changed files with 106 additions and 0 deletions
55
.bin/daily.sh
Executable file
55
.bin/daily.sh
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
export BORG_REPO=ssh://nas/media/backups/franzi
|
||||
export BORG_PASSCOMMAND='pass show nas/backup-pass'
|
||||
|
||||
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
|
||||
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
|
||||
|
||||
yay -Syu
|
||||
pass git push
|
||||
|
||||
info "Starting backup"
|
||||
|
||||
borg create \
|
||||
--verbose \
|
||||
--filter AME \
|
||||
--list \
|
||||
--stats \
|
||||
--show-rc \
|
||||
--compression lz4 \
|
||||
--exclude-caches \
|
||||
--exclude '/home/*/.cache/*' \
|
||||
--exclude '/home/*/.dbus' \
|
||||
\
|
||||
::'{hostname}-{now}' \
|
||||
/home/kunsi \
|
||||
|
||||
backup_exit=$?
|
||||
|
||||
info "Pruning repository"
|
||||
|
||||
borg prune \
|
||||
--list \
|
||||
--prefix '{hostname}-' \
|
||||
--show-rc \
|
||||
--keep-daily 7 \
|
||||
--keep-weekly 4 \
|
||||
--keep-monthly 6 \
|
||||
|
||||
prune_exit=$?
|
||||
|
||||
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
|
||||
|
||||
if [ ${global_exit} -eq 1 ];
|
||||
then
|
||||
info "Backup and/or Prune finished with a warning"
|
||||
fi
|
||||
|
||||
if [ ${global_exit} -gt 1 ];
|
||||
then
|
||||
info "Backup and/or Prune finished with an error"
|
||||
fi
|
||||
|
||||
exit ${global_exit}
|
||||
|
3
.bin/notify.sh
Executable file
3
.bin/notify.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo 'meowww?' | osd_cat --pos middle --align center --delay 9 -O 15 -f '-*-dejavu sans-*-*-*-*-120-200-*-*-*-*-*-*'
|
3
.bin/screenlayout.sh
Executable file
3
.bin/screenlayout.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
ls ~/.screenlayout | grep -v "^_" | sed "s/\.sh$//" | dmenu | sed "s|^.*$|/home/kunsi/.screenlayout/&.sh|" | xargs sh
|
20
.bin/screenlock.sh
Executable file
20
.bin/screenlock.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
xset s noblank
|
||||
xset s 90 10
|
||||
|
||||
pactl set-sink-mute alsa_output.pci-0000_00_1f.3.analog-stereo 1
|
||||
pactl set-source-mute alsa_input.pci-0000_00_1f.3.analog-stereo 1
|
||||
|
||||
#i3lock -e -t -i /home/kunsi/Pictures/laptop_unbenutzbar.png
|
||||
#i3lock -e -t -i /home/kunsi/Pictures/lockscreen-lenowo.png
|
||||
slock
|
||||
|
||||
|
||||
|
||||
#MOVIE="/home/kunsi/Movies/pause-langsamer.mp4"
|
||||
#
|
||||
#ffplay -fs -loop 0 $MOVIE &
|
||||
#PID=$(ps u | grep ffplay | grep $MOVIE | awk '{print $2}')
|
||||
#
|
||||
#alock -bg none && kill $PID
|
5
.bin/weechat
Executable file
5
.bin/weechat
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
#ssh kaito -t "tmux attach-session -t weechat"
|
||||
|
||||
mosh --server="LANG=en_US.UTF-8 mosh-server" kaito -- tmux attach-session -d -t weechat
|
5
.screenlayout/000-internal-only.sh
Executable file
5
.screenlayout/000-internal-only.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP2-1 --off --output DP2-2 --off
|
||||
|
||||
sudo rfkill unblock wifi
|
2
.screenlayout/1080p-clone.sh
Executable file
2
.screenlayout/1080p-clone.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP1 --off --output HDMI2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output DP2 --off
|
2
.screenlayout/1080p-left-of-laptop.sh
Executable file
2
.screenlayout/1080p-left-of-laptop.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output DP1 --off --output HDMI2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output DP2 --off
|
2
.screenlayout/1080p-right-of-laptop.sh
Executable file
2
.screenlayout/1080p-right-of-laptop.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output DP1 --off --output HDMI2 --mode 1920x1080 --pos 3840x0 --rotate normal --output HDMI1 --off --output DP2 --off
|
9
.screenlayout/docked.sh
Executable file
9
.screenlayout/docked.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
xrandr --output DP2-1 --mode 1920x1080 --pos 1920x0 --rotate normal
|
||||
xrandr --output DP2-2 --primary --mode 1920x1080 --pos 0x0 --rotate normal
|
||||
|
||||
xrandr --output eDP1 --off
|
||||
|
||||
xset s off
|
||||
|
||||
sudo rfkill block wifi
|
Loading…
Reference in a new issue