Useful Gits - Off topic

Users browsing this thread: 2 Guest(s)
z3bra
Grey Hair Nixers
xbindkeys seems to have exactly the same syntax. Hence the question, how is sxhkd better ? does it re-read the file when you update it ? Or use less resources ? I can't see anything on the repo

For reference, my.xbindkeysrc looks like this:

Code:
"urxvt"
    Mod4 + Return

"dwb"
    Mod4 + w

Okay I finally tested it. Here is the comparition:

Code:
# config files complexity:
$ wc *rc
23  34 333 sxhkdrc
24  36 373 xbindkeysrc
47  70 706 total
# pretty much the same. sxhkd does not need quotations when
# passing arguments to the command. That's the only advantage

# resources used by each program
$ ./xbindkeys -f xbinkeysrc
$ ps -eo pcpu,pmem,size,vsize,args | grep xbindkeys
0.0  0.0   312  15868 ./xbindkeys -n -f xbindkeysrc

$ ./sxhkd -c sxhkdrc
$ ps -eo pcpu,pmem,size,vsize,args | grep sxhkd
0.0  0.0   308  15656 sxhkd -c sxhkdrc
# nothing interresting here. They use (almost :P) exactly the same resources

# last point: doing their job
# here are the config file used:
$ cat xbindkeysrc
"urxvt"
    Mod4 + Return
"dwb"
    Mod4 + w

"~/bin/menu.sh"
    Menu

"amixer set Master toggle"
    XF86AudioMute

"~/bin/popup volume"
    XF86AudioMute

$ cat sxhkdrc
mod4 + Return
    urxvt

mod4 + w
    dwb

Menu
    ~/bin/menu.sh

XF86AudioMute
    amixer set Master toggle

XF86AudioMute
    ~/bin/popup volume

# They both start the first four command without problem.
# BUT, only xbindkeys start the last command. It means that sxhkd can't bind
# multiple functions to the same hotkey.

Winner is: `xbindkeys` !

I use the "double function" a lot. Because I use multiple computers, some have media hotkeys, some don't.
So I need a fallback key on those systems.

Also, I use this feature to pop a notification while I'm performing an action. Some that I can level the volume up, and display a nice text in a corner to see the current value.

Sorry sxhkd ! Nice try though :)
BANGARANG, MOTHERFUCKER


Messages In This Thread
Useful Gits - by DotDev - 10-11-2013, 06:30 PM
RE: Useful Gits - by kirby - 10-11-2013, 07:01 PM
RE: Useful Gits - by DotDev - 15-02-2014, 10:49 AM
RE: Useful Gits - by z3bra - 17-02-2014, 08:24 PM
RE: Useful Gits - by Bones - 02-04-2014, 12:58 PM
RE: Useful Gits - by berk - 02-04-2014, 03:43 PM
RE: Useful Gits - by ajac - 02-04-2014, 11:31 PM
RE: Useful Gits - by z3bra - 03-04-2014, 03:58 AM
RE: Useful Gits - by ajac - 03-04-2014, 03:34 PM
RE: Useful Gits - by z3bra - 03-04-2014, 04:03 PM
RE: Useful Gits - by ajac - 04-04-2014, 11:27 PM
RE: Useful Gits - by dkeg - 05-04-2014, 09:27 AM