mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 10:11:43 -05:00
1.4 KiB
1.4 KiB
Requirements
You must be comfortable with C, XCB and Git.
Coding Style
I follow the Linux Coding Style with the following variations:
- Ident with tabs, align with spaces.
- Always use braces with if/else.
Browsing the Code
If you use vim
:
- Hitting K will lead you to the manual page of the function under the cursor (works with most
xcb_*
functions), sometimes you'll have to explicitly specify the section of the manual you're interested in with 3K (e.g.:open
). - Install
ctags
and runctags *.{c,h}
in the directory holding the source. Then, hitting Ctrl-] will lead you to the definition of the function/variable/structure under the cursor (to go back: Ctrl-T). - You can run
make
fromvim
with:make
and then navigate to the next and the previous error with:cn
and:cp
.
Debugging
To install debug executables:
make clean debug && make install
You can attach to a running bspwm process with:
gdb bspwm $(pgrep -x bspwm)
c
Or if you just want to generate a backtrace (saved in gdb.txt
):
ulimit -c unlimited
startx
sudo systemd-coredumpctl gdb bspwm
set logging on
bt full
q