small changes.
This commit is contained in:
parent
23c12c246b
commit
286bfb1a9a
20
wms_mimic.sh
20
wms_mimic.sh
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
TARGET=$1 # image target
|
TARGET=$1 # image target
|
||||||
TMPCOL="/tmp/tmpcol" # path to the extracted colors file
|
TMPCOL="/tmp/tmpcol" # path to the extracted colors file
|
||||||
WMVAR="$HOME/.config/wms/wms_var" # window manager variables
|
WMSVAR="$HOME/.config/wms/wms_var" # window manager variables
|
||||||
NC="3" # number of colors to extract
|
XVAR="$HOME/.Xresources" # default x variable file
|
||||||
|
NC="3" # number of colors to extract
|
||||||
|
|
||||||
# color extractor
|
# color extractor
|
||||||
colext() {
|
colext() {
|
||||||
|
@ -20,13 +21,18 @@ if [ -f "$TARGET" ]; then
|
||||||
read ac ic bc < $TMPCOL
|
read ac ic bc < $TMPCOL
|
||||||
|
|
||||||
# overwrite the values in ~/.config/wms/wms_var
|
# overwrite the values in ~/.config/wms/wms_var
|
||||||
sed -i "s/^.*\bAC=\b.*$/AC=$ac/" $WMVAR # new acive color
|
sed -i "s/^.*\bAC=\b.*$/AC=$ac/" $WMSVAR # new acive color
|
||||||
sed -i "s/^.*\bIC=\b.*$/IC=$ic/" $WMVAR # new inactive color
|
sed -i "s/^.*\bIC=\b.*$/IC=$ic/" $WMSVAR # new inactive color
|
||||||
sed -i "s/^.*\bBC=\b.*$/BC=$bc/" $WMVAR # new background color
|
sed -i "s/^.*\bBC=\b.*$/BC=$bc/" $WMSVAR # new background color
|
||||||
|
|
||||||
|
# overwrite the term and nsxiv values in ~/.Xresources
|
||||||
|
sed -i "s/\(XTerm\*background:\).*/\XTerm\*background: \#$bc/" $XVAR
|
||||||
|
sed -i "s/\(Nsxiv\*window.background:\).*/\Nsxiv\*window.background: \#$bc/" $XVAR
|
||||||
|
|
||||||
# apply the change
|
# apply the change
|
||||||
wms_value.sh -d
|
wms_value.sh -d
|
||||||
wms_mainrole.sh -t
|
wms_mainrole.sh -t
|
||||||
|
xrdb -merge $XVAR
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -75,11 +75,11 @@ fullsize() {
|
||||||
# if atom exist and it is in fullsize
|
# if atom exist and it is in fullsize
|
||||||
if [ -n "$fs" ] & [ "$(wattr wh $FW)" = "$fs_width $fs_height" ]; then
|
if [ -n "$fs" ] & [ "$(wattr wh $FW)" = "$fs_width $fs_height" ]; then
|
||||||
wtp $fs $FW # restore size and position
|
wtp $fs $FW # restore size and position
|
||||||
atomx -d WM_FS $FW # remove from list
|
atomx -d WM_FS $FW # remove atom from window
|
||||||
|
|
||||||
else # if it's not atom and it's not in fullsize
|
else # if it's not atom and it's not in fullsize
|
||||||
atomx WM_FS="$(wattr xywh $FW)" $FW # create atom and save original size an position
|
atomx WM_FS="$(wattr xywh $FW)" $FW # create atom and save original size an position
|
||||||
wtp $x $y $fs_width $fs_height $FW # gets fullsize
|
wtp $x $y $fs_width $fs_height $FW # fullsize
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
. $HOME/.config/wms/wms_var
|
|
||||||
|
|
||||||
xterm -bc -ti -vt340 -bg "#$BC"
|
|
Loading…
Reference in a new issue