some nice added comments.

This commit is contained in:
root_sti 2024-09-15 21:53:59 -03:00
parent 0e85002187
commit 057a8046cf

25
wms.sh
View file

@ -1,6 +1,10 @@
#!/bin/sh
# general viariables.
## general purpose script to get everything wms-related up and running. ##
# some (all) of the contents are capricious so feel free to change whatever you want.
# variables are defined redundantly to make them clearer to understand
# wms.sh by @root_informaica
# first a little art.
WMS_ART='"
──▄────▄▄▄▄▄▄▄────▄───
@ -13,6 +17,7 @@ WMS_ART='"
▀▄▀▄▀ █ ▀ █ ▄██
"'
# some very personal things?
WM=wms
TERMINAL=xterm
XMENU=xmenu.sh
@ -39,6 +44,15 @@ ROOT_HEIGHT=$(wattr h $ROOT_ID)
SCREEN_WIDTH=$((ROOT_WIDTH - 2 * BORDER_WIDTH))
SCREEN_HEIGHT=$((ROOT_HEIGHT - 2 * BORDER_WIDTH))
# a very brief pointer for root-window. (opcional?)
CURSOR="
#define wms_width 10
#define wms_height 10
static unsigned char wms_bits[] = {
0x00, 0x00, 0x78, 0x00, 0xfc, 0x00, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01,
0xfe, 0x01, 0xfc, 0x00, 0x78, 0x00, 0x00, 0x00 };
"
# a super simple desktop wallpaper
BITMAP="
#define wms_width 32
@ -81,11 +95,16 @@ printf "$NAMES" > /tmp/wms_names
# start the keyboard daemon listener.
sxhkd &
# if is not set,
# if is not set, put the brief cursor for root-window.
[ ! -f /tmp/cursor.xbm ] && \
printf "$CURSOR" > /tmp/cursor.xbm
# if is not set, put the nice background image.
[ ! -f $HOME/.bitmap.xbm ] && \
printf "$BITMAP" > $HOME/.bitmap.xbm
# put a nice background image.
# Time to make the cursor and image effective.
xsetroot -fg "#$ACTIVE_COLOR" -bg "#$BACKGROUND_COLOR" -cursor $HOME/.cursor.xbm $HOME/.cursor.xbm
xsetroot -fg "#$BACKGROUND_COLOR" -bg "#$INACTIVE_COLOR" -bitmap $HOME/.bitmap.xbm
# finaly, start the xorg event listener.