initial commit
This commit is contained in:
commit
23d4795228
99 changed files with 6691 additions and 0 deletions
56
scripts/x
Executable file
56
scripts/x
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
|
||||
cmd="$1"; shift
|
||||
|
||||
case "$cmd" in
|
||||
setup)
|
||||
xrdb -merge "$XDG_CONFIG_HOME"/X11/xresources."$THEME"
|
||||
xset b off
|
||||
xset m 0
|
||||
xset r rate 300 50
|
||||
xset s 300
|
||||
xset dpms 420 540 720
|
||||
xmodmap "$XDG_CONFIG_HOME"/X11/xmodmap
|
||||
xss-lock -- slock &
|
||||
;;
|
||||
bg)
|
||||
randr="$(xrandr | rg ' connected ')"
|
||||
mons="$(echo "$randr" | wc -l)"
|
||||
wpdir="$HOME"/img/wp
|
||||
|
||||
[ "$1" ] && bgone="$1" || bgone="$wpdir"/one/cliff.jpg
|
||||
cmd="feh --no-fehbg --bg-fill $bgone"
|
||||
|
||||
if [ "$mons" = 2 ]; then
|
||||
[ "$2" ] && bgtwo="$2" || bgtwo="$wpdir"/two/lilies.jpg
|
||||
cmd="$cmd --bg-fill $bgtwo"
|
||||
else
|
||||
cmd="feh --no-fehbg --bg-fill $bgone"
|
||||
fi
|
||||
|
||||
eval "$cmd"
|
||||
;;
|
||||
mon)
|
||||
mons="$(xrandr | rg --no-config ' connected ' | awk '{ print $1 }')"
|
||||
|
||||
one="$(echo "$mons" | head -n 1)"
|
||||
two="$(echo "$mons" | tail -n 1)"
|
||||
case "$two" in
|
||||
*None* | "$one")
|
||||
unset two
|
||||
;;
|
||||
esac
|
||||
|
||||
xrandr --auto
|
||||
|
||||
xrandr --output "$one" --primary --mode 1920x1200 --scale 1x1 --set TearFree on --dpi 161.73
|
||||
|
||||
[ -z "$two" ] && exit
|
||||
|
||||
xrandr --output "$one" --pos 960x2160 --output "$two" --scale 1.5x1.5 --pos 0x0
|
||||
;;
|
||||
*)
|
||||
echo "Usage: x {setup|bg|mon}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue