Initial commit
This commit is contained in:
commit
153479352c
18 changed files with 3402 additions and 0 deletions
39
bin/lock
Executable file
39
bin/lock
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo RELOADAGENT | gpg-connect-agent
|
||||
ssh-add -D
|
||||
|
||||
if [ "$(xrandr | grep 3440x1440)" != "" ]; then
|
||||
SCALE="100%"
|
||||
DIR=$(echo -e "+800+0\n-800+0" | sort -R | head -1)
|
||||
else
|
||||
SCALE="75%"
|
||||
DIR=$(echo -e "+500+0\n-500+0" | sort -R | head -1)
|
||||
fi
|
||||
|
||||
IMAGE=/tmp/screenlock.png
|
||||
|
||||
IMG="$HOME/.LinuxConfig/imgs/"
|
||||
IMG=$IMG$(ls $IMG | sort -R | head -1)
|
||||
|
||||
echo $DIR
|
||||
|
||||
maim -m 1 $IMAGE
|
||||
convert $IMAGE -filter gaussian -blur 0x9 \
|
||||
-gravity center -matte \
|
||||
"$IMG[$SCALE]" -geometry $DIR -composite \
|
||||
~/.LinuxConfig/lock.png -composite \
|
||||
-font Noto-Sans-CJK-JP-Regular -pointsize 25 -fill 'rgba(255,255,255,0.85)' -draw "text 0,150 'Enter password'" \
|
||||
-font Noto-Sans-CJK-JP-Regular -pointsize 20 -fill 'rgba(255,255,255,0.60)' -draw "text 0,200 'パスワードを入力する'" \
|
||||
$IMAGE
|
||||
|
||||
i3lock \
|
||||
--textcolor=00000000 \
|
||||
--separatorcolor=00000000 --linecolor=00000000 \
|
||||
--keyhlcolor=22cc2288 --bshlcolor=cc222288 \
|
||||
--insidecolor=33333344 --ringcolor=aaaaaa88 \
|
||||
--insidevercolor=55555544 --ringvercolor=cccccc88 \
|
||||
--insidewrongcolor=cc222244 --ringwrongcolor=cc222288 \
|
||||
-eni $IMAGE
|
||||
|
||||
rm $IMAGE
|
13
bin/panel
Executable file
13
bin/panel
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
while (true); do
|
||||
if [ "$(mpc | wc -l)" -eq "3" ]; then
|
||||
SONG=$(mpc | head -1)
|
||||
if [ "$(mpc | grep '\[paused\]' | wc -l)" -eq "1" ]; then
|
||||
SONG="⏸ $SONG"
|
||||
fi
|
||||
fi
|
||||
|
||||
xsetroot -name " $SONG | $(date '+%Y-%m-%d %H:%M:%S') "
|
||||
sleep 0.3s;
|
||||
done
|
26
bin/screenie
Executable file
26
bin/screenie
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
NAME="ss-$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c${1:-32};)"
|
||||
|
||||
maim -m 1 -s /tmp/$NAME.png -c 1,0.25,0.25,0.6 --hidecursor
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
notify-send 'Screenshot canceled' -u low
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -e /tmp/$NAME.png ]
|
||||
then
|
||||
notify-send 'Screenshot failed' 'File does <u>not</u> exist' -u critical
|
||||
exit
|
||||
fi
|
||||
|
||||
scp /tmp/$NAME.png ss:ss
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo -n 'https://ss.fuyu.moe/nisevoid/'$NAME'.png' | xclip -selection "clip-board"
|
||||
notify-send 'Screenshot uploaded' -u low
|
||||
else
|
||||
notify-send 'Screenshot failed' 'Could not upload image' -u critical
|
||||
fi
|
||||
rm /tmp/$NAME.png
|
10
bin/song
Executable file
10
bin/song
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
song=$(mpc --format "%position%\t%artist%\t%title%" playlist | sort | column -s" " -t | fzf)
|
||||
|
||||
if [ "$song" == "" ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
mpc play $(echo $song | awk '{print $1}')
|
5
bin/switchbg
Executable file
5
bin/switchbg
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
IMG="$HOME/images/"$(ls ~/images/ | sort -R | head -1)
|
||||
|
||||
feh --bg-fill "$IMG"
|
13
bin/watch-screen
Executable file
13
bin/watch-screen
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
xset s 300
|
||||
xset dpms 300 450 600
|
||||
|
||||
while true; do
|
||||
sleep 1s;
|
||||
if [ "$(xset q | grep 'Monitor is' | grep -v 'On' 2> /dev/null)" != "" ]; then
|
||||
if [ "$(ps aux | grep '[i]3lock')" == "" ]; then
|
||||
lock;
|
||||
fi
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue