small changes.
This commit is contained in:
parent
23c12c246b
commit
286bfb1a9a
3 changed files with 15 additions and 14 deletions
14
wms_mimic.sh
14
wms_mimic.sh
|
@ -2,7 +2,8 @@
|
|||
|
||||
TARGET=$1 # image target
|
||||
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
|
||||
XVAR="$HOME/.Xresources" # default x variable file
|
||||
NC="3" # number of colors to extract
|
||||
|
||||
# color extractor
|
||||
|
@ -20,13 +21,18 @@ if [ -f "$TARGET" ]; then
|
|||
read ac ic bc < $TMPCOL
|
||||
|
||||
# overwrite the values in ~/.config/wms/wms_var
|
||||
sed -i "s/^.*\bAC=\b.*$/AC=$ac/" $WMVAR # new acive color
|
||||
sed -i "s/^.*\bIC=\b.*$/IC=$ic/" $WMVAR # new inactive color
|
||||
sed -i "s/^.*\bBC=\b.*$/BC=$bc/" $WMVAR # new background color
|
||||
sed -i "s/^.*\bAC=\b.*$/AC=$ac/" $WMSVAR # new acive color
|
||||
sed -i "s/^.*\bIC=\b.*$/IC=$ic/" $WMSVAR # new inactive 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
|
||||
wms_value.sh -d
|
||||
wms_mainrole.sh -t
|
||||
xrdb -merge $XVAR
|
||||
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -75,11 +75,11 @@ fullsize() {
|
|||
# if atom exist and it is in fullsize
|
||||
if [ -n "$fs" ] & [ "$(wattr wh $FW)" = "$fs_width $fs_height" ]; then
|
||||
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
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
|
||||
xterm -bc -ti -vt340 -bg "#$BC"
|
Loading…
Reference in a new issue