From 286bfb1a9a9519611a3f7f97a52be9a107e4b804 Mon Sep 17 00:00:00 2001 From: root_sti Date: Wed, 11 Oct 2023 15:06:17 -0300 Subject: [PATCH] small changes. --- wms_mimic.sh | 20 +++++++++++++------- wms_moveresize.sh | 4 ++-- wms_term.sh | 5 ----- 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100755 wms_term.sh diff --git a/wms_mimic.sh b/wms_mimic.sh index 37c4918..ae4d707 100755 --- a/wms_mimic.sh +++ b/wms_mimic.sh @@ -1,9 +1,10 @@ #!/bin/sh -TARGET=$1 # image target -TMPCOL="/tmp/tmpcol" # path to the extracted colors file -WMVAR="$HOME/.config/wms/wms_var" # window manager variables -NC="3" # number of colors to extract +TARGET=$1 # image target +TMPCOL="/tmp/tmpcol" # path to the extracted colors file +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 colext() { @@ -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 diff --git a/wms_moveresize.sh b/wms_moveresize.sh index ba8427b..92a04bc 100755 --- a/wms_moveresize.sh +++ b/wms_moveresize.sh @@ -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 } diff --git a/wms_term.sh b/wms_term.sh deleted file mode 100755 index 3a8cb2f..0000000 --- a/wms_term.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -. $HOME/.config/wms/wms_var - -xterm -bc -ti -vt340 -bg "#$BC"