chore: remove old custom scripts
This commit is contained in:
parent
7886155cfb
commit
e80aeb96be
2 changed files with 0 additions and 138 deletions
|
@ -1,103 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# simple screenshot-script using scrot for manjaro-i3 by oberon@manjaro.org
|
|
||||||
|
|
||||||
_conf=$HOME/.config/i3-scrot.conf
|
|
||||||
|
|
||||||
if ! [ -f $_conf ]; then
|
|
||||||
echo "scrot_dir=$(xdg-user-dir PICTURES)" > $_conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
source $_conf
|
|
||||||
|
|
||||||
if ! [ -d $scrot_dir ]; then
|
|
||||||
mkdir -p $scrot_dir
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [[ -z "$2" ]]; then
|
|
||||||
cmd="scrot -d $2"
|
|
||||||
else
|
|
||||||
cmd='scrot'
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--desk|-d|$NULL)
|
|
||||||
cd $scrot_dir
|
|
||||||
$cmd &&
|
|
||||||
sleep 1 &&
|
|
||||||
notify-send "screenshot has been saved in $scrot_dir"
|
|
||||||
;;
|
|
||||||
--window|-w)
|
|
||||||
cd $scrot_dir
|
|
||||||
$cmd -u &&
|
|
||||||
sleep 1 &&
|
|
||||||
notify-send "screenshot has been saved in $scrot_dir"
|
|
||||||
;;
|
|
||||||
--select|-s)
|
|
||||||
cd $scrot_dir
|
|
||||||
notify-send 'select an area for the screenshot' &
|
|
||||||
scrot -s &&
|
|
||||||
sleep 1 && notify-send "screenshot has been saved in $scrot_dir"
|
|
||||||
;;
|
|
||||||
--desk-to-clipboard|-dc|$NULL)
|
|
||||||
cd $scrot_dir
|
|
||||||
scrot -e 'xclip -selection clipboard -t image/png -i $f && rm $f' &&
|
|
||||||
sleep 1 &&
|
|
||||||
notify-send "screenshot has been copied to clipboard"
|
|
||||||
;;
|
|
||||||
--window-to-clipboard|-wc)
|
|
||||||
cd $scrot_dir
|
|
||||||
scrot -u -e 'xclip -selection clipboard -t image/png -i $f && rm $f' &&
|
|
||||||
sleep 1 &&
|
|
||||||
notify-send "screenshot has been copied to clipboard"
|
|
||||||
;;
|
|
||||||
--select-to-clipboard|-sc)
|
|
||||||
cd $scrot_dir
|
|
||||||
notify-send 'select an area for the screenshot' &
|
|
||||||
scrot -s -e 'xclip -selection clipboard -t image/png -i $f && rm $f' &&
|
|
||||||
sleep 1 && notify-send "screenshot has been copied to clipboard"
|
|
||||||
;;
|
|
||||||
--help|-h)
|
|
||||||
echo "
|
|
||||||
available options:
|
|
||||||
-d | --desk full screen
|
|
||||||
-w | --window active window
|
|
||||||
-s | --select selection
|
|
||||||
-dc | --desk-to-clipboard full screen to clipboard
|
|
||||||
-wc | --window-to-clipboard active window to clipboard
|
|
||||||
-sc | --select-to-clipboard selection to clipboard
|
|
||||||
-h | --help display this information
|
|
||||||
|
|
||||||
The -d, -w, -dc, and -wc options can be used with a delay
|
|
||||||
by adding the number of seconds, like for example:
|
|
||||||
'i3-scrot -w 5'
|
|
||||||
|
|
||||||
Default option is 'full screen'.
|
|
||||||
|
|
||||||
The file destination can be set in ${_conf}.
|
|
||||||
Default is $scrot_dir
|
|
||||||
"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "
|
|
||||||
== ! i3-scrot: missing or wrong argument ! ==
|
|
||||||
|
|
||||||
available options:
|
|
||||||
-d | --desk full screen
|
|
||||||
-w | --window active window
|
|
||||||
-s | --select selection
|
|
||||||
-dc | --desk-to-clipboard full screen to clipboard
|
|
||||||
-wc | --window-to-clipboard active window to clipboard
|
|
||||||
-sc | --select-to-clipboard selection to clipboard
|
|
||||||
-h | --help display this information
|
|
||||||
|
|
||||||
Default option is 'full screen'.
|
|
||||||
|
|
||||||
The file destination can be set in ${_conf}.
|
|
||||||
Default is $scrot_dir
|
|
||||||
"
|
|
||||||
|
|
||||||
exit 2
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# with openrc use loginctl
|
|
||||||
[ "$(cat /proc/1/comm)" = "systemd" ] && logind=systemctl || logind=loginctl
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
lock)
|
|
||||||
xscreensaver-command -lock
|
|
||||||
;;
|
|
||||||
logout)
|
|
||||||
i3-msg exit
|
|
||||||
;;
|
|
||||||
switch_user)
|
|
||||||
dm-tool switch-to-greeter
|
|
||||||
;;
|
|
||||||
suspend)
|
|
||||||
xscreensaver-command -lock && $logind suspend
|
|
||||||
;;
|
|
||||||
hibernate)
|
|
||||||
xscreensaver-command -lock && $logind hibernate
|
|
||||||
;;
|
|
||||||
reboot)
|
|
||||||
$logind reboot
|
|
||||||
;;
|
|
||||||
shutdown)
|
|
||||||
$logind poweroff
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "== ! i3exit: missing or invalid argument ! =="
|
|
||||||
echo "Try again with: lock | logout | switch_user | suspend | hibernate | reboot | shutdown"
|
|
||||||
exit 2
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
Loading…
Reference in a new issue