Page 2 of 2

Re: 2wm Make Install

Posted: Fri Nov 04, 2016 11:20 pm
by catfood
Yea, I have a backup folder for copies of everything before I change any file.
Kinda nice they include a default backup file for you though. I saw it, but made my own out of habit.

Restored original. Looks the same, but I'm guessing there was an accidental space or something added somewhere...

2wm Make output #2:

Code: Select all

 break@grill:~/Downloads/2wm-0.1$ make
2wm build options:
CFLAGS   = -g -Wall -O2 -I. -I/usr/include -I/usr/X11R6/include -DVERSION="0.1"
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lX11
CC       = cc
CC client.c
CC event.c
event.c: In function ‘keypress’:
event.c:209:2: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
  keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
  ^~~~~~
In file included from 2wm.h:6:0,
                 from event.c:4:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 extern KeySym XKeycodeToKeysym(
               ^~~~~~~~~~~~~~~~
CC main.c
CC util.c
CC view.c
CC -o 2wm
Did this work? What's the depreciated warning mean? Safe to Make Install now?

Re: 2wm Make Install

Posted: Fri Nov 04, 2016 11:38 pm
by wuxmedia
in general, as in spoken English, a warning is just that.
bit like this

Code: Select all

       Kernel constant   Level value   Meaning
       KERN_EMERG             0        System is unusable
       KERN_ALERT             1        Action must be taken immediately
       KERN_CRIT              2        Critical conditions
       KERN_ERR               3        Error conditions
       KERN_WARNING           4        Warning conditions
       KERN_NOTICE            5        Normal but significant condition
       KERN_INFO              6        Informational
       KERN_DEBUG             7        Debug-level messages
I think code has a few less levels, but not critical anyway

Re: 2wm Make Install

Posted: Fri Nov 04, 2016 11:43 pm
by catfood
Ok, thanks. Just seem to have been breaking this for over a week now. Trying to be cautious now that I'm close. Building from source has turned out harder than expected, or just really bad luck for a first attempt.

Re: 2wm Make Install

Posted: Sat Nov 05, 2016 12:04 am
by pidsley
catfood wrote: Restored original. Looks the same, but I'm guessing there was an accidental space or something added somewhere...
Spaces don't matter in C code. Python, on the other hand...

That warning is normal. Did you change the terminal line? If it builds after you change that, then go ahead and install.

You can always check to see what's different using "diff":

Code: Select all

diff config.default.h config.h

Re: 2wm Make Install

Posted: Sat Nov 05, 2016 12:48 am
by catfood
Final note:
Most colors are sourced from current dkeger choice on install. Main terminal colors are however overwritten by config.h under #define KEYS BG and FG hex color choices there.

Re: 2wm Make Install *Solved

Posted: Sat Nov 05, 2016 12:59 am
by pidsley
You're welcome.

Re: 2wm Make Install *Solved

Posted: Sat Nov 05, 2016 5:38 pm
by catfood
^You are the man!!!!

Definitefly worth a sticky HOW-TO thread with your methods!

Re: 2wm Make Install

Posted: Sat Nov 05, 2016 5:41 pm
by catfood
pidsley wrote: You can always check to see what's different using "diff":

Code: Select all

diff config.default.h config.h
I installed on USB Break yesterday as practice. Installing on Actual HD Break today. Got the same long list of keybinding errors. Turns out the config.h that is included in unzip folder is full of these problems. Deleted it and renamed config.default.h -> config.h.

good to go then.

Re: *Solved* 2wm Make Install

Posted: Sun Nov 06, 2016 11:41 pm
by catfood
Thought I'd just continue here vs a new post.

So my netbook has weird volume shortcuts:
-vol = FN + 3
+vol = FN + 4

These actually worked in Break with Openbox (the only distro to do so), so I assumed it was related to 4.2.0-trunk-586 kernel. Since installing and running 2wm, these shortcuts no longer function. If I change .xinitrc and reload openbox, they still work fine, so nothing is broken; Just don't seem to work in 2wm. I looked through the 3 main Openbox config files, but saw nothing related to a keybinding for FN+3/4.

So curious why this stopped working and where I might find those keybindings or what to change to enable them again in 2wm?

Re: *Solved* 2wm Make Install

Posted: Mon Nov 07, 2016 12:10 am
by dkeg
Generally for special keybinds, like volume, music, etc., I'll use xkeybindrc, or sxhkd so to have consistency across wm's. Its tough to ensure you're not trying to snag an already spoken for keybind. I have my volume set for alt+minus/equal

Code: Select all

## volume 
alt + {equal,minus,F8}
    ~/bin/volume {+,-,off}
keybinds are calling a volume script which has a case statement to increase, decrease, mute as specified.

Re: *Solved* 2wm Make Install

Posted: Mon Nov 07, 2016 7:16 am
by machinebacon
There are two things to consider:
1) The Fn keys are not registered
2) The Fn keys are registered but not bound to a command

I suppose it's the second one. You can test both situations:

Code: Select all

xev
Pressing the Fn plus 3 or 4 should give you an output like

Code: Select all

state 0x0, keycode AAA (keysym 0xXXXX, YYYY), same_screen YES, 
    XKeysymToKeycode returns keycode: ZZZ
the keycode ZZZ (I just called it this way) is what you need for your config.h to tell amixer to raise or lower the volume: http://xahlee.info/linux/linux_command_ ... ntrol.html and optimally the keycode AAA is the same as ZZZ.
If xev does not return a change at keypress in the "keycode" or "keysym" field, it means that the key is not registered by X.