Move .scripts -> .local/bin
This commit is contained in:
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
for m in `bspc query -M`; do
|
||||
bspc monitor $m -d \
|
||||
"$WS1" "$WS2" "$WS3" "$WS4" "$WS5" \
|
||||
"$WS6" "$WS7" "$WS8" "$WS9" "$WS0"
|
||||
done
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Enable mathematics in POSIX shell
|
||||
calc() { awk "BEGIN{print $*}"; }
|
||||
|
||||
# Calculate size
|
||||
MON_WIDTH=$(xdotool getdisplaygeometry | awk '{print $1}')
|
||||
MON_HEIGHT=$(xdotool getdisplaygeometry | awk '{print $2}')
|
||||
NEW_WIDTH=$(calc "$MON_WIDTH * 0.2")
|
||||
NEW_HEIGHT=$(calc "$NEW_WIDTH / 16 * 9")
|
||||
|
||||
# Calculate position
|
||||
BORDER=23
|
||||
X=$(calc "$MON_WIDTH - $NEW_WIDTH - $BORDER")
|
||||
Y=$(calc "$MON_HEIGHT - $NEW_HEIGHT - $BORDER")
|
||||
|
||||
# Set window
|
||||
CURRENT=$(xdotool getwindowfocus)
|
||||
xdotool windowsize "$CURRENT" "$NEW_WIDTH" "$NEW_HEIGHT"
|
||||
xdotool windowmove "$CURRENT" "$X" "$Y"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOCK="$XDG_CACHE_HOME/lock.png"
|
||||
|
||||
# Cache the lock image
|
||||
if [ ! -f "$LOCK" ]; then
|
||||
touch "$LOCK"
|
||||
|
||||
# Get the resolution of the primary monitor
|
||||
RES="$(xrandr -q | grep ' connected primary' \
|
||||
| grep -Eo '[0-9]{3,4}x[0-9]{3,4}' | head -c -1)"
|
||||
|
||||
# Generate lock image
|
||||
convert "$(dirname "$0")/lock.png" -background none -gravity center -extent "$RES" "$LOCK"
|
||||
fi
|
||||
|
||||
# Disable screensaver
|
||||
revert() {
|
||||
xset s off
|
||||
xset -dpms
|
||||
}
|
||||
|
||||
# Set screensaver to 30 seconds
|
||||
trap revert HUP INT TERM
|
||||
xset +dpms dpms 30 30 30
|
||||
|
||||
i3lock -n -i "$LOCK" -B 6 -S 1 -e \
|
||||
--radius=47 \
|
||||
--ring-width=5.0 \
|
||||
--verifcolor=00000000 \
|
||||
--wrongcolor=00000000 \
|
||||
--timecolor=00000000 \
|
||||
--datecolor=00000000 \
|
||||
--layoutcolor=00000000 \
|
||||
--insidecolor=00000000 \
|
||||
--insidevercolor=00000000 --insidewrongcolor=00000000 \
|
||||
--ringcolor=00000000 \
|
||||
--ringvercolor=FFFFFFC0 --ringwrongcolor=DA2825C0 \
|
||||
--keyhlcolor=FFFFFFC0 --bshlcolor=DA2825C0 \
|
||||
--linecolor=00000000 --separatorcolor=00000000 \
|
||||
-k \
|
||||
--timesize=64 --datesize=24 \
|
||||
--timestr="%I:%M %p" --datestr="%A, %B %e" \
|
||||
--timepos="ix:iy-250" --datepos="ix:iy-200" \
|
||||
--timecolor=FFFFFFC0 --datecolor=FFFFFFC0
|
||||
|
||||
revert
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Overwrite wallpaper with new image if provided
|
||||
[ -n "$1" ] && cp "$1" "$HOME/pictures/wallpaper.jpg"
|
||||
|
||||
# Set wallpaper
|
||||
feh --no-fehbg --bg-fill "$HOME/pictures/wallpaper.jpg"
|
||||
Reference in New Issue
Block a user