wmutils / sxhkd
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
Ok got it and you about nailed it. I went back to just focus and hadnt added the pulse bit. That is how he does the active window. The other focus.sh I never used but seen the border size and color settings at the top and had them confused. All sorted out now thanks for the pointer.
Edit damn I feel dumb :)
Edit damn I feel dumb :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
Yeah, it can get a bit disparate. This is how I have it working.
Identified the similar scripts
Identified the similar scripts
- focus_wrapper and yawee
focus.sh and vroum
closest and focus (closest is a bit different, and for whatever reason, I can't get it to work)
rainbow and pulse
groups and groaw
- Yawee - focus new windows, to place new windows in center and focus the next window if window in focus is killed (depends on vroum). Also changed by taking out the chwb pieces to keep my borders and colors consistent
Pulse - sourcing my colr script to use current xcolors. I also added to it to take the current BW from focus.sh (which is sourced by focus_wrapper).
Focus.sh - again, I'm sourcing colr for active and inactive border colors
Corners - added padding; giving it X and Y, and division by BW to keep it consistent in case I change BW
Groaw - for groups
Maxv - maximize vertically (this is new)
Fullsreen, tile and switch_grid
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
Good summary I updated my post above .sxhkdrc and statusbar.
I ended up removing pulse and setting window border size and colors in vroum.
I did the same moved the used scripts to
-rwxr-xr-x 1 chef users 376 Aug 12 14:00 corner.sh
-rwxr-xr-x 1 chef users 824 Aug 12 14:00 focus
-rwxr-xr-x 1 chef users 247 Jun 24 05:13 focus_watcher.sh
-rwxr-xr-x 1 chef users 1251 Jun 24 05:13 fullscreen.sh
-rwxr-xr-x 1 chef users 1694 Aug 12 14:00 groaw
-rwxr-xr-x 1 chef users 903 Jun 24 05:13 tile.sh
-rwxr-xr-x 1 chef users 1253 Aug 18 07:27 vroum
-rwxr-xr-x 1 chef users 7940 Aug 12 08:10 xwait
-rwxr-xr-x 1 chef users 448 Aug 12 14:00 yawee
I ended up removing pulse and setting window border size and colors in vroum.
I did the same moved the used scripts to
Code: Select all
l ~/wmutils
-rwxr-xr-x 1 chef users 824 Aug 12 14:00 focus
-rwxr-xr-x 1 chef users 247 Jun 24 05:13 focus_watcher.sh
-rwxr-xr-x 1 chef users 1251 Jun 24 05:13 fullscreen.sh
-rwxr-xr-x 1 chef users 1694 Aug 12 14:00 groaw
-rwxr-xr-x 1 chef users 903 Jun 24 05:13 tile.sh
-rwxr-xr-x 1 chef users 1253 Aug 18 07:27 vroum
-rwxr-xr-x 1 chef users 7940 Aug 12 08:10 xwait
-rwxr-xr-x 1 chef users 448 Aug 12 14:00 yawee
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
Yay! Isn't this fun! Next project probably Hipster as base with wm-utils
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
I just finished a fresh new install on a laptop. Everything is dialed in minus a issue with groups (groaw) that I need to sort out. I thought it was a privilege issue where groups are written to a sub /tmp/groaw.d/ but the error doesn't give a cant create but a directory doesn't exist . I moved the pointer to ~/tmp/groaw.d/ just to isolate privilege and get the same results. I need to take a closer look and make sure I have a complete understanding of that and what it is doing.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
What is the base? BSD or Debian. And for the obvious, you do have a /tmp or ~/tmp and it's not temp? How about a member of the wheel group?
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
BSD and yes and yes. I need to get back into this today I'm sure its operator error :)
EDIT: just for the sake of completeness.
NetBSD 7.0_RC2
drwxrwxrwt 7 chef users 512 Aug 19 08:05 tmp
drwxr-xr-x 3 chef users 512 Aug 18 13:22 tmp
users wheel
Going to change owner back on the /tmp to chef:wheel what is was originally.
EDIT: just for the sake of completeness.
Code: Select all
$ uname -rs
Code: Select all
$ l /
Code: Select all
$ l ~/
Code: Select all
$ groups
Going to change owner back on the /tmp to chef:wheel what is was originally.
Last edited by ChefIronBelly on Wed Aug 19, 2015 4:40 pm, edited 2 times in total.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
OK sorted out had keys mapped for 5 groups.
mod4 + shift + {1,2,3,4,5}
~/wmutils/groaw -a {1,2,3,4,5}
but only had 3 groups setup in GROAW
GNUMBER=3
changed that to 5 and it created the directory's.
1 2 3 4 5
I had started on group 4. I hope this helps someone else out down the line.
Edit: to match current setup.
mod4 + shift + {1,2,3,4,5}
~/wmutils/groaw -a {1,2,3,4,5}
but only had 3 groups setup in GROAW
GNUMBER=3
changed that to 5 and it created the directory's.
Code: Select all
ls /tmp/groaw.d/
I had started on group 4. I hope this helps someone else out down the line.
Edit: to match current setup.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
/dkeg I saw what you did there sourcing your colors... do tell :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
Sure ... we love to be consistent!
I still use my old colr script even though it sucks, but it works. That's what you see using the array. But there is also this one I came across and also use. They both work. I'll pass this one along to avoid embarassment. Keep in mind the output is just the rrggbb, no '#'.
just save it and source it. Sorry, I'm in a pretty crappy mood
I still use my old colr script even though it sucks, but it works. That's what you see using the array. But there is also this one I came across and also use. They both work. I'll pass this one along to avoid embarassment. Keep in mind the output is just the rrggbb, no '#'.
Code: Select all
color(){
echo -n "$( xrdb -query | grep "\*$1:" | grep -oE "#[a-zA-Z0-9]{6}" | cut -c 2- )"
}
BG="$(color background)"
FG="$(color foreground)"
BLK="$(color color0)"
RED="$(color color1)"
GRN="$(color color2)"
YLW="$(color color3)"
BLU="$(color color4)"
MAG="$(color color5)"
CYN="$(color color6)"
WHT="$(color color7)"
BBLK="#$(color color8)"
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
thanks for the idea, no script needed.
I went with the base16 way where every color is defined at 'xrdb -load'. So all colors are already there with the '#' and whenever changed.
I went with the base16 way where every color is defined at 'xrdb -load'. So all colors are already there with the '#' and whenever changed.
Code: Select all
BW=${BW:-4} # border width
ACTIVE=${ACTIVE:-0x{base06}} # active border color
INACTIVE=${INACTIVE:-0x{base03}} # inactive border color
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
Oh, neat!
So no sourcing needed? Also, I looked to not need the '#' in the wm tools scripts
So no sourcing needed? Also, I looked to not need the '#' in the wm tools scripts
Code: Select all
#ACTIVE=${ACTIVE:-0xffffff} # active border color
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
Its defined and sourced thru .Xresource @ xrdb -load.
Yeah you are right about that '#' the games we play with formatting. I need to see if mine is really working correctly now, I suspect not.
Yeah you are right about that '#' the games we play with formatting. I need to see if mine is really working correctly now, I suspect not.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
Ok so define does not make a global variable until export VARNAME="value" (checked with 'env')
So now its not as a elegant solution, I don't have a problem exporting the colors and awk ing the # I guess. Now back to your script :)
hmm lets see where this rabbit hole ends up.
So now its not as a elegant solution, I don't have a problem exporting the colors and awk ing the # I guess. Now back to your script :)
hmm lets see where this rabbit hole ends up.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
EST I have been chat sober for 15 years I may have to have a little drink. :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
Ha, no worries and no pressure. I'm also EST. I'll be drinking some IPA of course.
Work hard; Complain less
Re: wmutils / sxhkd
I recently realized that when you comment out code in sxhkd, you want to not have it within a specific keybind syntax. For example
No
Yes
No
Code: Select all
alt + {h,j,k,l}
#focus {h,j,k,l}
closest {h,j,k,l}
Code: Select all
alt + {h,j,k,l}
closest {h,j,k,l}
#focus {h,j,k,l}
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: wmutils / sxhkd
middles.sh
Gives you left, center and right middle placement.
Edit: added a fudge factor adjust for your fudge loving needs.
Gives you left, center and right middle placement.
Code: Select all
#!/bin/sh
CUR=${2:-$(pfw)}
ROOT=$(lsw -r)
SW=$(wattr w $ROOT)
SH=$(wattr h $ROOT)
BW=$(wattr b $CUR)
W=$(wattr w $CUR)
H=$(wattr h $CUR)
offlm=20
offrm=20
X=0
Y=0
case $1 in
y) X=$((SW/4 - W/2 - BW + ${offlm}))
Y=$((SH/2 - H/2 - BW));;
g) X=$((SW/2 - W/2 - BW))
Y=$((SH/2 - H/2 - BW)) ;;
u) X=$((SW/2 + W/2 - BW - ${offrm}))
Y=$((SH/2 - H/2 - BW));;
esac
echo $X $Y
wtp $X $Y $W $H $CUR
Last edited by ChefIronBelly on Tue Aug 25, 2015 1:19 pm, edited 5 times in total.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
Re: wmutils / sxhkd
oh, that's a neat idea! Wonder if you could implement though yawee, randomizing the placement, so new windows don't all overlap
Work hard; Complain less