2WM
Forum rules
Post your scrot in the appropriate section. If the section does not exist yet - open a new thread ;)
Post your scrot in the appropriate section. If the section does not exist yet - open a new thread ;)
Re: 2WM
those scrots look gooooooooood!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: 2WM
1st attempt, but overall achieved what I wanted.
Possible by technical support from pidsley/ChefIronBelly/machinebacon
Inspired by ChefIronBelly/dkeg
http://www.spycolor.com/web-safe-colors
Vive les années 90
Digging up outdated threads because I'm digging up outdated window managers ;)
BBQ that $#1+!
Possible by technical support from pidsley/ChefIronBelly/machinebacon
Inspired by ChefIronBelly/dkeg
http://www.spycolor.com/web-safe-colors
Vive les années 90
Digging up outdated threads because I'm digging up outdated window managers ;)
BBQ that $#1+!
Thank You!
(I remember when debian "non-gui" installer scared me. #never-forget)
(I remember when debian "non-gui" installer scared me. #never-forget)
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: 2WM
Glad you got it working now tweak it till you break it :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
- noo_b_nomnoms
- MILF
- Posts: 522
- Joined: Sat Jan 09, 2016 5:13 pm
- Location: USA
Re: 2WM
Moving this over from the other 2wm-solved thread. Makes more sense to live here.
Still would need to logout and back in, but simple way to match borders to current color scheme.
1. Save as 2wmbcs (2wm border color switch) in $HOME/bin. Generally that is in your $PATH so able to be run simply by typing the name of the script in your terminal to run
2. type this into your terminal "chmod a+x bin/2wmbcs". This will make it executable.
3. If you change your color scheme, run this script to update the border colors within config.h to match with you new color scheme. Update the script to match the color you want. Right now, its set as color0 (black) and color7 (white). Options are below
background
color0 -black
color1-red
color2-green
color3-yellow
color4-blue
color5-magenta
color6-cayan
color7-white
color8-bold black
color9-bold red
color10-bold green
color11-bold yellow
color12-bold blue
color13-bold magenta
color14-bold cayan
color15-bold white
xrdb (Xresources database) is where the colors (amongst other things, i.e. font, etc.) is stored. Just like querying a database, you can query and extract values from xrdb. We'll query xrdb to get current colors and apply them as needed, in this case, updating 2wm's config.h.
Sure, you can manually do it. But what fun is that?
Hope that helps.
Name it and save in your $PATH
Make executable - chmod a+x
run it
Still would need to logout and back in, but simple way to match borders to current color scheme.
1. Save as 2wmbcs (2wm border color switch) in $HOME/bin. Generally that is in your $PATH so able to be run simply by typing the name of the script in your terminal to run
2. type this into your terminal "chmod a+x bin/2wmbcs". This will make it executable.
3. If you change your color scheme, run this script to update the border colors within config.h to match with you new color scheme. Update the script to match the color you want. Right now, its set as color0 (black) and color7 (white). Options are below
background
color0 -black
color1-red
color2-green
color3-yellow
color4-blue
color5-magenta
color6-cayan
color7-white
color8-bold black
color9-bold red
color10-bold green
color11-bold yellow
color12-bold blue
color13-bold magenta
color14-bold cayan
color15-bold white
xrdb (Xresources database) is where the colors (amongst other things, i.e. font, etc.) is stored. Just like querying a database, you can query and extract values from xrdb. We'll query xrdb to get current colors and apply them as needed, in this case, updating 2wm's config.h.
Sure, you can manually do it. But what fun is that?
Hope that helps.
Code: Select all
#! /bin/bash
## 2wmbcs
## match border colors from current color scheme for 2wm
## dkeg 2016
## paths - update as needed
dir=$HOME/git/2wm
file=$dir/config.h
## grab current border colors
CurNORM=$(awk '/\NORMCOLOR/ {gsub(/"/,"");print $3}' $file)
CurSEL=$(awk '/\SELCOLOR/ {gsub(/"/,"");print $3}' $file)
## take new colors from xrdb
NewNORM=$(xrdb -query|awk '/\*color0/ {print $2}')
NewSEL=$(xrdb -query|awk '/\*color7/ {print $2}')
## update border colors
sed -i "s/$CurNORM/"$NewNORM"/;
s/$CurSEL/"$NewSEL"/" $file
## compile
cd $dir && make && sudo make install && cd
Make executable - chmod a+x
run it
Work hard; Complain less
Re: 2WM
^That went way over my head, lol!
Not sure what $PATH is. Does this script have to have a specific name or specific location to run properly? Or does it just function of the internal paths you specified within the script(dir=where 2wm install file lives, file=look in <-dir for config.h)?
I don't know much about code at all, but am I to assume this basically autowrites over config.h then auto makes and make (re)installs 2wm? Hence the reboot for changes? Is chmod making it so the script can execute without root passwd?
I'm learning (I think), but i got a long ways to go...
Not sure what $PATH is. Does this script have to have a specific name or specific location to run properly? Or does it just function of the internal paths you specified within the script(dir=where 2wm install file lives, file=look in <-dir for config.h)?
I don't know much about code at all, but am I to assume this basically autowrites over config.h then auto makes and make (re)installs 2wm? Hence the reboot for changes? Is chmod making it so the script can execute without root passwd?
I'm learning (I think), but i got a long ways to go...
Thank You!
(I remember when debian "non-gui" installer scared me. #never-forget)
(I remember when debian "non-gui" installer scared me. #never-forget)
Re: 2WM
ixquick, startpage (or google) "what is $PATH linux" -- first hit: http://www.linfo.org/path_env_var.html
ixquick, etc "running a bash script" -- first hit: http://tldp.org/LDP/Bash-Beginners-Guid ... 02_01.html
type this in a terminal:
ixquick, etc "using chmod linux" -- I will let you do this search for yourself
further reading:
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://mywiki.wooledge.org/BashGuide
https://wiki.archlinux.org/index.php/Bash
ixquick, etc "running a bash script" -- first hit: http://tldp.org/LDP/Bash-Beginners-Guid ... 02_01.html
type this in a terminal:
Code: Select all
man chmod
further reading:
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://mywiki.wooledge.org/BashGuide
https://wiki.archlinux.org/index.php/Bash
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: 2WM
and our good old wiki:
http://linuxbbq.org/wiki/index.php/Environment_variable
http://linuxbbq.org/wiki/index.php/Permissions
Seriously, http://linuxbbq.org/wiki/index.php/Main_Page should be one of the first places to go, we have spent hundreds of hours adding content.
http://linuxbbq.org/wiki/index.php/Environment_variable
http://linuxbbq.org/wiki/index.php/Permissions
Seriously, http://linuxbbq.org/wiki/index.php/Main_Page should be one of the first places to go, we have spent hundreds of hours adding content.
..gnutella..
Re: 2WM
Thanks Pidsley. You don't have to look things up for me. I was just seeing if I kinda understood the jist of what his script did. I bookmarked all those pages. I plan on reading up on those subjects at some point. Just so many relevant to my situiation topics at once lately :D
Thanks dkeg, idiot-proofed. I can make it even if I don't fully understand its function yet.
Thanks bacon. I've started digging through wiki this week. Not sure specific things to research so just kinda reading from the top. Some makes sense, some still does not, or seem relevant yet...
Thanks dkeg, idiot-proofed. I can make it even if I don't fully understand its function yet.
Thanks bacon. I've started digging through wiki this week. Not sure specific things to research so just kinda reading from the top. Some makes sense, some still does not, or seem relevant yet...
Thank You!
(I remember when debian "non-gui" installer scared me. #never-forget)
(I remember when debian "non-gui" installer scared me. #never-forget)
Re: 2WM
I was trying to show you how to fish instead of giving you fish. (-:catfood wrote:Thanks Pidsley. You don't have to look things up for me.
I look things up all the time. Even when I was first learning Linux I found the best way to learn was to look things up myself. I often learned new things I wasn't even looking for...