Update scripts
This commit is contained in:
parent
40be036e2e
commit
d00219422a
|
@ -17,8 +17,10 @@ printf "[Desktop Entry]\nEncoding=UTF-8\nName=speedwm\nComment=Dynamic window ma
|
||||||
# If the bar is on the top, touch /usr/share/speedwm-topbar
|
# If the bar is on the top, touch /usr/share/speedwm-topbar
|
||||||
TOPBAR=$(grep "barposition" options.h | grep "1" | awk '{ print $5 }')
|
TOPBAR=$(grep "barposition" options.h | grep "1" | awk '{ print $5 }')
|
||||||
PADDING=$(grep "barpaddingv" options.h | grep "0" | awk '{ print $5 }')
|
PADDING=$(grep "barpaddingv" options.h | grep "0" | awk '{ print $5 }')
|
||||||
|
COMPOSITOR=$(grep "define COMPOSITOR " options.h | awk '{ print $3 }' | sed 's/"//g')
|
||||||
echo $TOPBAR | grep "1" && touch /usr/share/speedwm-topbar
|
echo $TOPBAR | grep "1" && touch /usr/share/speedwm-topbar
|
||||||
echo $PADDING | grep "0" && touch /usr/share/speedwm-nopadding
|
echo $PADDING | grep "0" && touch /usr/share/speedwm-nopadding
|
||||||
|
echo $COMPOSITOR > /usr/share/speedwm-compositor
|
||||||
echo $(pwd) > /usr/share/speedwm-sourcedir
|
echo $(pwd) > /usr/share/speedwm-sourcedir
|
||||||
|
|
||||||
# Copy .Xresources file
|
# Copy .Xresources file
|
||||||
|
|
|
@ -94,6 +94,23 @@ SWAL_MKCONFIG() {
|
||||||
printf "\nSWAL_RANDOMIZE=$SWAL_RANDOMIZE" >> $SWAL_EXPORTDIR/config
|
printf "\nSWAL_RANDOMIZE=$SWAL_RANDOMIZE" >> $SWAL_EXPORTDIR/config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# use a solid color
|
||||||
|
SOLIDCOLOR() {
|
||||||
|
ISCOL="$(printf "#000000\n#bbbbbb" | $RUNLAUNCHER -l 2 $GRIDARG $GRIDNUM -p "Enter a hex color:")"
|
||||||
|
|
||||||
|
echo $ISCOL | grep -q "#" || exit 1
|
||||||
|
|
||||||
|
xwallpaper --clear
|
||||||
|
xsetroot -solid "$ISCOL"
|
||||||
|
rm -f $SWAL_EXPORTDIR/swal_wm
|
||||||
|
xrdb -remove
|
||||||
|
xsetroot -name "fsignal:31"
|
||||||
|
test ${BINDIR}notify-send && notify-send " Solid color $ISCOL set as wallpaper."
|
||||||
|
pgrep -x picom > /dev/null && pkill picom # Fix picom related bug
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
BINDIR=$(cat /usr/share/speedwm-bindir)
|
BINDIR=$(cat /usr/share/speedwm-bindir)
|
||||||
SWAL_OLDWALLPAPERDIR=$SWAL_WALLPAPERDIR
|
SWAL_OLDWALLPAPERDIR=$SWAL_WALLPAPERDIR
|
||||||
|
|
||||||
|
@ -138,7 +155,7 @@ SWAL_USAGE() {
|
||||||
SWAL_SELWALLPAPER()
|
SWAL_SELWALLPAPER()
|
||||||
{
|
{
|
||||||
case "$NEW1" in
|
case "$NEW1" in
|
||||||
"") ls /tmp/swal_cpath || SWAL_SELWALLPAPER="$(printf "$(ls "$SWAL_WALLPAPERDIR")\n------\n..\nPreview\nPrevious\nRandom\nFavorites\nAdd used wallpaper to favorites\nOptions\nHelp\nExit" | $RUNLAUNCHER $GRIDARG $GRIDNUM -l 100 -p "What wallpaper would you like to set?")" ;;
|
"") ls /tmp/swal_cpath || SWAL_SELWALLPAPER="$(printf "$(ls "$SWAL_WALLPAPERDIR")\n------\n..\nPreview\nPrevious\nSolid Color\nRandom\nFavorites\nAdd used wallpaper to favorites\nOptions\nHelp\nExit" | $RUNLAUNCHER $GRIDARG $GRIDNUM -l 100 -p "What wallpaper would you like to set?")" ;;
|
||||||
"-w") SWAL_SELWALLPAPER="$(basename "$NEW2")" && touch /tmp/swal_cpath ;;
|
"-w") SWAL_SELWALLPAPER="$(basename "$NEW2")" && touch /tmp/swal_cpath ;;
|
||||||
"-h") SWAL_HELP | $RUNLAUNCHER $GRIDARG $GRIDNUM 1 -l 90 ;;
|
"-h") SWAL_HELP | $RUNLAUNCHER $GRIDARG $GRIDNUM 1 -l 90 ;;
|
||||||
"-f") SWAL_FSIGNAL_RELOAD_XRESOURCES="$NEW2" ;;
|
"-f") SWAL_FSIGNAL_RELOAD_XRESOURCES="$NEW2" ;;
|
||||||
|
@ -169,6 +186,7 @@ SWAL_SETTYPE()
|
||||||
"Random") SWAL_FULL="$(find $SWAL_WALLPAPERDIR/* -type f | shuf -n 1)" ; SWAL_WALLPAPERDIR="$(dirname "$SWAL_FULL")" ; SWAL_SELWALLPAPER="$(basename "$SWAL_FULL")" ; SWAL_SELWAL=$SWAL_SELWALLPAPER ;;
|
"Random") SWAL_FULL="$(find $SWAL_WALLPAPERDIR/* -type f | shuf -n 1)" ; SWAL_WALLPAPERDIR="$(dirname "$SWAL_FULL")" ; SWAL_SELWALLPAPER="$(basename "$SWAL_FULL")" ; SWAL_SELWAL=$SWAL_SELWALLPAPER ;;
|
||||||
"Previous") SWAL_PREVWAL=$(readlink $SWAL_EXPORTDIR/CurrentWallpaper_prev) ; SWAL_WALLPAPERDIR="$(dirname "$SWAL_PREVWAL")" ; SWAL_SELWALLPAPER="$(basename "$SWAL_PREVWAL")" ;;
|
"Previous") SWAL_PREVWAL=$(readlink $SWAL_EXPORTDIR/CurrentWallpaper_prev) ; SWAL_WALLPAPERDIR="$(dirname "$SWAL_PREVWAL")" ; SWAL_SELWALLPAPER="$(basename "$SWAL_PREVWAL")" ;;
|
||||||
"Exit") exit 0 ;;
|
"Exit") exit 0 ;;
|
||||||
|
"Solid Color") SOLIDCOLOR ;;
|
||||||
"Help") SWAL_USAGE | $RUNLAUNCHER $GRIDARG $GRIDNUM -l 50 -p "How to use" && $0 && exit 0 ;;
|
"Help") SWAL_USAGE | $RUNLAUNCHER $GRIDARG $GRIDNUM -l 50 -p "How to use" && $0 && exit 0 ;;
|
||||||
"------") $0 && exit 0 ;;
|
"------") $0 && exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
2
status
2
status
|
@ -26,7 +26,7 @@ SEP="<" # Separator to use. Alternative separators: "❰", "<", "|"
|
||||||
COLORFG=true # Color foreground (true/false)
|
COLORFG=true # Color foreground (true/false)
|
||||||
COLORBG=false # Color background (true/false)
|
COLORBG=false # Color background (true/false)
|
||||||
USEBUILTINCOL=false # Use built in speedwm colors (col_status<num>). This also supports Pywal. (true/false)
|
USEBUILTINCOL=false # Use built in speedwm colors (col_status<num>). This also supports Pywal. (true/false)
|
||||||
CHARLIMIT=auto # Limit characters to CHARLIMIT. Enter false to not have a limit. Enter auto to use xdpyinfo. (num/auto/false)
|
CHARLIMIT=30 # Limit characters to CHARLIMIT. Enter false to not have a limit. Enter auto to use xdpyinfo. (num/auto/false)
|
||||||
|
|
||||||
# Status bar modules
|
# Status bar modules
|
||||||
# Set to true/false to enable/disable.
|
# Set to true/false to enable/disable.
|
||||||
|
|
Loading…
Reference in a new issue