diff --git a/README.md b/README.md index c1accaa..3cc0e16 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Just like dwm, speedwm also tries to be minimal but also has functionality and a In order to install this build of speedwm, all dependencies must be installed. You can see 'Dependencies' for a list of all dependencies required and optionally recommended to use speedwm. - - git clone https://codeberg.org/speedie/speedwm + - git clone https://git.speedie.gq/speedwm - cd speedwm - make clean install - If any warnings/errors show up, fix it by installing the missing dependency. - - If a .xinitrc is used, add `speedwm` to the end. If you're using .xinit you can also just `startx /usr/bin/speedwm`. + - If a .xinitrc is used, add `speedwm` to the end of the file. If you're using .xinit you can also just `startx /usr/bin/speedwm`. - If you do not have a .xinitrc, you can add autostart commands to the file ~/.config/speedwm/autostart.sh. - If a display manager is used, make sure it supports .desktop entries. - NOTE: `ly` is known to have issues with dwm and speedwm. @@ -44,7 +44,9 @@ If you get sent back to the TTY, your X server is most likely not configured pro Note that speedwm is not and will **never** be compatible with Wayland. I have no interest in ever supporting or developing for it. Please don't create any issues regarding Wayland support. -If you're having any issues on operating systems with the BSD kernel, or something like NixOS, please file a bug report here. +If you're having any issues on operating systems with the BSD kernel, or something like NixOS, please file a bug report here on Codeberg, or by emailing me. + +If you have any questions, see the official [speedwm wiki](https://speedwm.speedie.gq). ## 3. Layouts @@ -271,12 +273,15 @@ You can add, change and remove keybinds by editing `keybinds.h` and `mouse.h` an - Chromium - Default web browser And everything under `Features`. + ## 6. Important If you're used to dwm, speedwm might be a little unfamiliar to you at first. This is because speedwm doesn't use config.h (or config.def.h). + Instead, config.h is split into different parts to make it easier to edit. Instead of editing config.h you'll want to edit: - autostart.h for starting stuff right before speedwm (For example xclip, pywal, etc.) +- bar.h for configuring bar rules. - options.h for changing colors and applications to use with keybinds. - signal.h for adding fake signals - colors.h for changing alpha options and color options, most users won't need to edit it. @@ -286,19 +291,14 @@ Instead, config.h is split into different parts to make it easier to edit. Inste - mouse.h for adding/removing mouse binds. - status.h for adding/removing status modules and aadding/removing statuscmd clicks. - ipc.h for adding/removing IPC commands. (If support is compiled in) +- query.h for adding/removing queries. - toggle.h for adding/removing features from getting compiled in. After you've edited one of the files, you need to run 'make clean install' to reinstall speedwm. Remember that you can change colors through your .Xresources file (see .Xresources and Pywal) meaning you do not need to recompile speedwm. -Another important detail you must keep in mind is that this build comes with a status bar simply named 'speedwm_status'. -It can be found in the speedwm source code directory. It is just a shell script which adds stuff to your status bar. It will automatically be started when speedwm starts. - -You can edit the status bar simply by editing 'speedwm_stellar' or its modules (modules_*) and running 'make clean install'. -You can also configure it by editing '~/.config/speedwm/statusrc'. - -If you want to change status bar, edit options.h and set 'static char status' to your status bar binary (must be in $PATH). -Alternatively, you can also set it in .Xresources (See .Xresources and Pywal). +You can edit the status bar simply by editing its modules (modules_...) and running 'make clean install'. +You can also configure the modules by editing '~/.config/speedwm/statusrc' which is configured entirely in shell script syntax. ## 7. Configuration and .Xresources @@ -655,7 +655,7 @@ Below is a list of all signums and what they do. ## 9. Status bar -speedwm has a status bar. It's the (by default) right part of the bar. It supports: +speedwm has a status bar module which is enabled by default. It's the (by default) right part of the bar. It supports: - Pango markup - Colored glyphs @@ -674,7 +674,6 @@ Bundled with speedwm is a fork of dwmblocks. dwmblocks is a dwm status bar that By default the status bar runs modules that are also bundled with speedwm (see modules/ directory). To configure these modules, you can edit ~/.config/speedwm/statusrc which should be created when a module runs. The bundled status bar is autostarted by speedwm if it is installed. If you want to use your own status bar, comment out 'USESTATUS' in toggle.mk and remove /usr/bin/status if speedwm has been installed previously. Then simply start the status bar through autostart.h, ~/.config/speedwm/autostart.sh, .xinitrc or some other means of running a program. - ## 10. Additional note on autostart If you wish to add autostart entries without recompiling, consider using $HOME/.config/speedwm/autostart.sh. This is a path added to autostart.h and you can fill it with anything you want. @@ -686,43 +685,13 @@ Note that this script or any other commands in autostart.h will **not** run when As of 1.8, speedwm has a module system. It is based on the `barmodules` patch for dwm and allows extensive control over the way the speedwm bar functions. This control has its own header, `bar.h`. -`bar.h` contains a somewhat detailed list of all possible options here, but more importantly it contains a `barrules` array. This array similar to the `rules` array allows extensive control over where each bar module is placed and how it functions. In theory, this means you could put 22 instances of the same, boring tags on one bar, although why would one do that? +`bar.h` contains a somewhat detailed list of all possible options here, but more importantly it contains a `barrules` array which allows extensive control over where each bar module is placed and how it functions. In theory, this means you could put 22 instances of the same, boring tags on one bar, although why would one do that? Each module can be aligned to any part of the bar (See 'Alignment' for possible values). If, let's say multiple modules both align to the right next to the center split (middle), the first module takes priority. -### BarRule structure - -1. Monitor - -Internally: `int monitor` - -2. Bar - -Internally: `int bar` - -3. Alignment - -Internally: `int alignment` - -4. Width function - -Internally: `int (*widthfunc)(Bar *bar, BarWidthArg *a)` - -5. Draw function - -Internally: `int (*drawfunc)(Bar *bar, BarDrawArg *a)` - -6. Click function - -Internally: `int (*clickfunc)(Bar *bar, BarClickArg *a)` - -7. Name - -Internally: `char *name` - ### Module list -Below is a list of all modules bundled with speedwm. The source code for these modules are all in `bar/` and declared in `bar/items.c` and `bar/items.h`. If you want to add more, you can just declare them in the same way and add them to the `barrules` array if you want to use them. +Below is a list of all modules bundled with speedwm. The source code for these modules are all in `bar/` and declared in `bar/items.c` and `bar/items.h`. - ltsymbol: Standard, basic layout icon. - tags: Basic tags, without powerlines. @@ -791,7 +760,7 @@ Example: click_tags_pwl ### Module name -The module name really doesn't mean anything at all, it is just useful for debugging. +The module name really doesn't mean anything at all. ### Example module @@ -807,71 +776,22 @@ With all that said, you should now be able to add a module. In case you weren't Combined into one line: `{ 'A', 0, bar_align_left, width-tags_pwl, draw_tags_pwl, click_tags_pwl, "my cool powerline tags" },` -Let's break down the above. - -1. 'A' here refers to the focused monitor, indicating that we want to place it on the focused monitor. -2. 0 here means we want to place it on the primary bar. -3. bar_align_left indicates we want to align it to the left part of the bar, you know, where tags usually are. -4. width_tags_pwl is the function we call to get the width. -5. draw_tags_pwl is the function we call to draw the bar. -6. click_tags_pwl is the function we call to check if we clicked on that module. -7. A label for our module, it's only useful for debugging. - -Feel free to copy the above to `bar.h` if you want to experiment with it. Remember that you can have put any module wherever you want. Nothing is stopping you from having your tags on the right. This is what makes bar rules so powerful. ## 12. Keybinds Like the bar array mentioned previously, there is a `Key keys` array in `keybinds.h` which contains all keybinds speedwm will recognize. While this isn't the only way to add keybinds in speedwm, it does not require any additional software to be installed. -### Key structure - -1. Event - -Internally: `int type` - -2. Modifier - -Internally: `unsigned int mod` - -3. Chain key - -Internally: `KeySym chain` - -4. Key - -Internally: `KeySym keysym` - -5. Function - -Internally: `void (*func)(const Arg *)` - -6. Function arguments - -Internally: `const Arg arg` - ### Event -The event value allow you to specify when a keybind is executed. Internally this is known as `int type` and it specifies when the function is executed. +The event value allow you to specify when a keybind is executed. - KeyPress: Activate immediately on key press. - KeyRelease: Activate immediately on key release. ### Modifier -There are a lot of different modifiers, this list is only going to list the ones declared in speedwm. You can, of course declare more if necessary although it should be noted that doing so is out of the scope of this documentation. We will be focusing on the defined modifiers which are defined in `speedwm.c` like this: - -` -/* Modifiers */ -#define CONTROL ControlMask -#define SHIFT ShiftMask -#define ALT Mod1Mask -#define ALTR Mod3Mask -#define SUPER Mod4Mask -#define SUPERR Mod5Mask -` - -Below is a list of defined modifiers: +There are a lot of different modifiers, this list is only going to list the ones declared in speedwm. - CONTROL Left Control (Ctrl) key. - SHIFT Left Shift key. @@ -889,9 +809,7 @@ This value *is* mandatory, but it does not have to be used. speedwm has supporte The first key that needs to be pressed to activate a chain needs to be the key specified here. In order to see a list of possible keys, see `/usr/include/X11/keysymdef.h`. If, let's say we want to use simply the letter `a` as the key to start a chain, the value here would be `XK_a`. -If we want a normal key, one that is **not** chained, we can accomplish that by simply setting the Chain key to `-1`. You can see this in the `keypress()` function in `speedwm.c`. This line of code is responsible for this behavior. - -`if (keysym == keys[i].keysym && keys[i].chain == -1` +If we want a normal key, one that is **not** chained, we can accomplish that by simply setting the Chain key to `-1`. ### Key @@ -903,24 +821,14 @@ There are a lot more keys technically defined, see `/usr/include/X11/XF86keysym. ### Function -Many functions expect `const Arg *arg` to be passed to them. However this value does require any function argument to be specified because it simply passes the next value to the function and calls it. +Many functions expect an argument to be passed to them. However this value does require any function argument to be specified because it simply passes the next value to the function and calls it. There is no list of functions, but `speedwm.c` has a lot of declared functions which you may use in keybinds provided the function expects `const Arg *arg`. ### Function arguments -This is the actual argument passed to the function we're calling when the keybind is activated. Explaining this well would be fairly simple, but instead of doing so I recommend you read the `typedef union Arg` in `speedwm.c`. It looks like this: +This is the actual argument passed to the function we're calling when the keybind is activated. -` -typedef union { - long i; - unsigned long ui; - float f; - const void *v; -} Arg; -` - -In short, Arg is a list of different types, which may be used to set different things in the argument. Passing a float (such as mfact) through would mean I should override `.f`, passing an integer (such as barposition) through would mean I should override `.i`. There's also `.v` for `void` and `.ui` for tags. This is not used unless you want to mess with tag keybinds. When you don't care about the value given to the function, you may simply enter a `0`. @@ -938,17 +846,6 @@ With all that said, you probably get the idea of how it works. But you still don Combined into one line: `{ KeyPress, MODIFIER1|SHIFT, -1, XK_w, spawn, cmd( "firefox" ) },` -Let's break down the above. - -1. This is our type. If it's `KeyPress`, it will be activated when the keybind is pressed. If it is `KeyRelease` it will be activated when the keybind is released. -2. This is our modifier. `MODIFIER1` is defined in `keybinds.h`. We're adding SHIFT to it, (defined in `speedwm.c`) which means we have to press BOTH `MODIFIER1` and `SHIFT` at the same time to activate this keybind. -3. This is our **chain** key. `-1` here indicates that we do not want it to be chained. We want a regular keybind. See the example below for an example *with* a chained keybind instead. -4. This is our regular key. `XK_w` is defined in `/usr/include/X11/keysymdef.h` on most operating systems and it means we have to press `w` on our keyboard along with the modifier to activate this keybind. -5. This is our function. We call this, passing the next value (`const Arg *arg`) to it. -6. This is our function argument. Do note that in this case `cmd()` is a macro and it is defined in `speedwm.c`. This macro will pass the contents of the macro to a shell it will spawn. - -Feel free to copy the above to `keybinds.h` if you want to experiment with it. - ### Example chained keybind 1. `{ KeyPress,` @@ -960,18 +857,7 @@ Feel free to copy the above to `keybinds.h` if you want to experiment with it. Combined into one line: `{ KeyPress, MODIFIER1|SHIFT, XK_a, XK_w, togglebar, {0} },` -Let's break down the above. - -1. This is our type. If it's `KeyPress`, it will be activated when the keybind is pressed. If it is `KeyRelease` it will be activated when the keybind is released. -2. This is our modifier. `MODIFIER1` is defined in `keybinds.h`. We're adding SHIFT to it, (defined in `speedwm.c`) which means we have to press BOTH `MODIFIER1` and `SHIFT` at the same time to activate this keybind. -3. This is our **chain** key. `XK_a` here is the key we have to press along with our modifier to activate this keybind. `XK_a` is defined in `/usr/include/X11/keysymdef.h` on most operating systems. -4. This is our regular key. `XK_w` is defined in `/usr/include/X11/keysymdef.h` on most operating systems and it means we have to press `w` on our keyboard to activate this keybind. Note that we do **not** need to press the modifier here, because it is a chained keybind. -5. This is our function. We call this, passing the next value (`const Arg *arg`) to it. -6. This is our function argument. We simply pass `0` here because we don't need to pass anything to the function, because the function does not care. - -Feel free to copy the above to `keybinds.h` if you want to experiment with it. - -This should give you a brief idea of how keybinds work in speedwm. Most of this carries over to `dwm` as well, although it does not have some of this stuff. It should be noted that as I mentioned previously, you don't HAVE to use this system. You can use external programs to handle keybinds, and `libspeedwm` to perform actions in speedwm. sxkbd is one popular program for this purpose and window managers like `bspwm` use it. However such a solution is out of the scope of this documentation! +This should give you a brief idea of how keybinds work in speedwm. Most of this carries over to `dwm` as well, although it does not have some of this stuff. ## Credits diff --git a/bar.h b/bar.h index 565e02b..85e11e8 100755 --- a/bar.h +++ b/bar.h @@ -26,21 +26,27 @@ * Width: * Function to run when getting the width of the module. * - * Syntax: width_ + * Syntax: width_ * Example: width_tags_pwl * * Draw * Function to run when drawing the module. * - * Syntax: draw_ + * Syntax: draw_ * Example: draw_tags_pwl * * Click * Function to run when getting a click. * - * Syntax: click_ + * Syntax: click_ * Example: click_tags_pwl * + * Value + * Value passed to the functions. For most functions it doesn't do anything and isn't used, In this case simply pass '0'. + * + * Syntax: + * Example: 1 + * * Module name * Does nothing special, just helpful for debugging among other things. * @@ -63,10 +69,10 @@ * */ static const BarRule barrules[] = { - /* Monitor Bar Alignment Width Draw Click Module name */ - { -1, 0, bar_align_left, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" }, - { -1, 0, bar_align_left, width_tags_pwl, draw_tags_pwl, click_tags_pwl, "powerline tags" }, - { 'A', 0, bar_align_right, width_systray, draw_systray, click_systray, "systray" }, - { -1, 0, bar_align_right, width_status_pwl, draw_status_pwl, click_status_pwl, "powerline status" }, - { -1, 0, bar_align_none, width_title, draw_title, click_title, "title" }, + /* Monitor Bar Alignment Width Draw Click Value Module name */ + { -1, 0, bar_align_left, width_ltsymbol, draw_ltsymbol, click_ltsymbol, 0, "layout" }, + { -1, 0, bar_align_left, width_tags_pwl, draw_tags_pwl, click_tags_pwl, 0, "powerline tags" }, + { 'A', 0, bar_align_right, width_systray, draw_systray, click_systray, 0, "systray" }, + { -1, 0, bar_align_right, width_status_pwl, draw_status_pwl, click_status_pwl, 0, "powerline status" }, + { -1, 0, bar_align_none, width_title, draw_title, click_title, 0, "title" }, }; diff --git a/docs/dependencies.md b/docs/dependencies.md index c558d71..3b95c5e 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -42,3 +42,4 @@ You can add, change and remove keybinds by editing `keybinds.h` and `mouse.h` an - Chromium - Default web browser And everything under `Features`. + diff --git a/docs/doc-02.md b/docs/doc-02.md index 0c52e80..3537218 100644 --- a/docs/doc-02.md +++ b/docs/doc-02.md @@ -3,11 +3,11 @@ In order to install this build of speedwm, all dependencies must be installed. You can see 'Dependencies' for a list of all dependencies required and optionally recommended to use speedwm. - - git clone https://codeberg.org/speedie/speedwm + - git clone https://git.speedie.gq/speedwm - cd speedwm - make clean install - If any warnings/errors show up, fix it by installing the missing dependency. - - If a .xinitrc is used, add `speedwm` to the end. If you're using .xinit you can also just `startx /usr/bin/speedwm`. + - If a .xinitrc is used, add `speedwm` to the end of the file. If you're using .xinit you can also just `startx /usr/bin/speedwm`. - If you do not have a .xinitrc, you can add autostart commands to the file ~/.config/speedwm/autostart.sh. - If a display manager is used, make sure it supports .desktop entries. - NOTE: `ly` is known to have issues with dwm and speedwm. @@ -18,5 +18,7 @@ If you get sent back to the TTY, your X server is most likely not configured pro Note that speedwm is not and will **never** be compatible with Wayland. I have no interest in ever supporting or developing for it. Please don't create any issues regarding Wayland support. -If you're having any issues on operating systems with the BSD kernel, or something like NixOS, please file a bug report here. +If you're having any issues on operating systems with the BSD kernel, or something like NixOS, please file a bug report here on Codeberg, or by emailing me. + +If you have any questions, see the official [speedwm wiki](https://speedwm.speedie.gq). diff --git a/docs/doc-05.md b/docs/doc-05.md index 278856e..78ca3ce 100644 --- a/docs/doc-05.md +++ b/docs/doc-05.md @@ -1,9 +1,11 @@ ## 6. Important If you're used to dwm, speedwm might be a little unfamiliar to you at first. This is because speedwm doesn't use config.h (or config.def.h). + Instead, config.h is split into different parts to make it easier to edit. Instead of editing config.h you'll want to edit: - autostart.h for starting stuff right before speedwm (For example xclip, pywal, etc.) +- bar.h for configuring bar rules. - options.h for changing colors and applications to use with keybinds. - signal.h for adding fake signals - colors.h for changing alpha options and color options, most users won't need to edit it. @@ -13,17 +15,12 @@ Instead, config.h is split into different parts to make it easier to edit. Inste - mouse.h for adding/removing mouse binds. - status.h for adding/removing status modules and aadding/removing statuscmd clicks. - ipc.h for adding/removing IPC commands. (If support is compiled in) +- query.h for adding/removing queries. - toggle.h for adding/removing features from getting compiled in. After you've edited one of the files, you need to run 'make clean install' to reinstall speedwm. Remember that you can change colors through your .Xresources file (see .Xresources and Pywal) meaning you do not need to recompile speedwm. -Another important detail you must keep in mind is that this build comes with a status bar simply named 'speedwm_status'. -It can be found in the speedwm source code directory. It is just a shell script which adds stuff to your status bar. It will automatically be started when speedwm starts. - -You can edit the status bar simply by editing 'speedwm_stellar' or its modules (modules_*) and running 'make clean install'. -You can also configure it by editing '~/.config/speedwm/statusrc'. - -If you want to change status bar, edit options.h and set 'static char status' to your status bar binary (must be in $PATH). -Alternatively, you can also set it in .Xresources (See .Xresources and Pywal). +You can edit the status bar simply by editing its modules (modules_...) and running 'make clean install'. +You can also configure the modules by editing '~/.config/speedwm/statusrc' which is configured entirely in shell script syntax. diff --git a/docs/doc-08.md b/docs/doc-08.md index de8af6a..3a42328 100644 --- a/docs/doc-08.md +++ b/docs/doc-08.md @@ -1,6 +1,6 @@ ## 9. Status bar -speedwm has a status bar. It's the (by default) right part of the bar. It supports: +speedwm has a status bar module which is enabled by default. It's the (by default) right part of the bar. It supports: - Pango markup - Colored glyphs @@ -19,4 +19,3 @@ Bundled with speedwm is a fork of dwmblocks. dwmblocks is a dwm status bar that By default the status bar runs modules that are also bundled with speedwm (see modules/ directory). To configure these modules, you can edit ~/.config/speedwm/statusrc which should be created when a module runs. The bundled status bar is autostarted by speedwm if it is installed. If you want to use your own status bar, comment out 'USESTATUS' in toggle.mk and remove /usr/bin/status if speedwm has been installed previously. Then simply start the status bar through autostart.h, ~/.config/speedwm/autostart.sh, .xinitrc or some other means of running a program. - diff --git a/docs/doc-10.md b/docs/doc-10.md index 901fd18..459bf92 100644 --- a/docs/doc-10.md +++ b/docs/doc-10.md @@ -2,43 +2,13 @@ As of 1.8, speedwm has a module system. It is based on the `barmodules` patch for dwm and allows extensive control over the way the speedwm bar functions. This control has its own header, `bar.h`. -`bar.h` contains a somewhat detailed list of all possible options here, but more importantly it contains a `barrules` array. This array similar to the `rules` array allows extensive control over where each bar module is placed and how it functions. In theory, this means you could put 22 instances of the same, boring tags on one bar, although why would one do that? +`bar.h` contains a somewhat detailed list of all possible options here, but more importantly it contains a `barrules` array which allows extensive control over where each bar module is placed and how it functions. In theory, this means you could put 22 instances of the same, boring tags on one bar, although why would one do that? Each module can be aligned to any part of the bar (See 'Alignment' for possible values). If, let's say multiple modules both align to the right next to the center split (middle), the first module takes priority. -### BarRule structure - -1. Monitor - -Internally: `int monitor` - -2. Bar - -Internally: `int bar` - -3. Alignment - -Internally: `int alignment` - -4. Width function - -Internally: `int (*widthfunc)(Bar *bar, BarWidthArg *a)` - -5. Draw function - -Internally: `int (*drawfunc)(Bar *bar, BarDrawArg *a)` - -6. Click function - -Internally: `int (*clickfunc)(Bar *bar, BarClickArg *a)` - -7. Name - -Internally: `char *name` - ### Module list -Below is a list of all modules bundled with speedwm. The source code for these modules are all in `bar/` and declared in `bar/items.c` and `bar/items.h`. If you want to add more, you can just declare them in the same way and add them to the `barrules` array if you want to use them. +Below is a list of all modules bundled with speedwm. The source code for these modules are all in `bar/` and declared in `bar/items.c` and `bar/items.h`. - ltsymbol: Standard, basic layout icon. - tags: Basic tags, without powerlines. @@ -107,7 +77,7 @@ Example: click_tags_pwl ### Module name -The module name really doesn't mean anything at all, it is just useful for debugging. +The module name really doesn't mean anything at all. ### Example module @@ -123,16 +93,5 @@ With all that said, you should now be able to add a module. In case you weren't Combined into one line: `{ 'A', 0, bar_align_left, width-tags_pwl, draw_tags_pwl, click_tags_pwl, "my cool powerline tags" },` -Let's break down the above. - -1. 'A' here refers to the focused monitor, indicating that we want to place it on the focused monitor. -2. 0 here means we want to place it on the primary bar. -3. bar_align_left indicates we want to align it to the left part of the bar, you know, where tags usually are. -4. width_tags_pwl is the function we call to get the width. -5. draw_tags_pwl is the function we call to draw the bar. -6. click_tags_pwl is the function we call to check if we clicked on that module. -7. A label for our module, it's only useful for debugging. - -Feel free to copy the above to `bar.h` if you want to experiment with it. Remember that you can have put any module wherever you want. Nothing is stopping you from having your tags on the right. This is what makes bar rules so powerful. diff --git a/docs/doc-11.md b/docs/doc-11.md index 0adb8b9..29043bf 100644 --- a/docs/doc-11.md +++ b/docs/doc-11.md @@ -2,54 +2,16 @@ Like the bar array mentioned previously, there is a `Key keys` array in `keybinds.h` which contains all keybinds speedwm will recognize. While this isn't the only way to add keybinds in speedwm, it does not require any additional software to be installed. -### Key structure - -1. Event - -Internally: `int type` - -2. Modifier - -Internally: `unsigned int mod` - -3. Chain key - -Internally: `KeySym chain` - -4. Key - -Internally: `KeySym keysym` - -5. Function - -Internally: `void (*func)(const Arg *)` - -6. Function arguments - -Internally: `const Arg arg` - ### Event -The event value allow you to specify when a keybind is executed. Internally this is known as `int type` and it specifies when the function is executed. +The event value allow you to specify when a keybind is executed. - KeyPress: Activate immediately on key press. - KeyRelease: Activate immediately on key release. ### Modifier -There are a lot of different modifiers, this list is only going to list the ones declared in speedwm. You can, of course declare more if necessary although it should be noted that doing so is out of the scope of this documentation. We will be focusing on the defined modifiers which are defined in `speedwm.c` like this: - -` -/* Modifiers */ -#define CONTROL ControlMask -#define SHIFT ShiftMask -#define ALT Mod1Mask -#define ALTR Mod3Mask -#define SUPER Mod4Mask -#define SUPERR Mod5Mask -` - -Below is a list of defined modifiers: +There are a lot of different modifiers, this list is only going to list the ones declared in speedwm. - CONTROL Left Control (Ctrl) key. - SHIFT Left Shift key. @@ -67,9 +29,7 @@ This value *is* mandatory, but it does not have to be used. speedwm has supporte The first key that needs to be pressed to activate a chain needs to be the key specified here. In order to see a list of possible keys, see `/usr/include/X11/keysymdef.h`. If, let's say we want to use simply the letter `a` as the key to start a chain, the value here would be `XK_a`. -If we want a normal key, one that is **not** chained, we can accomplish that by simply setting the Chain key to `-1`. You can see this in the `keypress()` function in `speedwm.c`. This line of code is responsible for this behavior. - -`if (keysym == keys[i].keysym && keys[i].chain == -1` +If we want a normal key, one that is **not** chained, we can accomplish that by simply setting the Chain key to `-1`. ### Key @@ -81,24 +41,14 @@ There are a lot more keys technically defined, see `/usr/include/X11/XF86keysym. ### Function -Many functions expect `const Arg *arg` to be passed to them. However this value does require any function argument to be specified because it simply passes the next value to the function and calls it. +Many functions expect an argument to be passed to them. However this value does require any function argument to be specified because it simply passes the next value to the function and calls it. There is no list of functions, but `speedwm.c` has a lot of declared functions which you may use in keybinds provided the function expects `const Arg *arg`. ### Function arguments -This is the actual argument passed to the function we're calling when the keybind is activated. Explaining this well would be fairly simple, but instead of doing so I recommend you read the `typedef union Arg` in `speedwm.c`. It looks like this: +This is the actual argument passed to the function we're calling when the keybind is activated. -` -typedef union { - long i; - unsigned long ui; - float f; - const void *v; -} Arg; -` - -In short, Arg is a list of different types, which may be used to set different things in the argument. Passing a float (such as mfact) through would mean I should override `.f`, passing an integer (such as barposition) through would mean I should override `.i`. There's also `.v` for `void` and `.ui` for tags. This is not used unless you want to mess with tag keybinds. When you don't care about the value given to the function, you may simply enter a `0`. @@ -116,17 +66,6 @@ With all that said, you probably get the idea of how it works. But you still don Combined into one line: `{ KeyPress, MODIFIER1|SHIFT, -1, XK_w, spawn, cmd( "firefox" ) },` -Let's break down the above. - -1. This is our type. If it's `KeyPress`, it will be activated when the keybind is pressed. If it is `KeyRelease` it will be activated when the keybind is released. -2. This is our modifier. `MODIFIER1` is defined in `keybinds.h`. We're adding SHIFT to it, (defined in `speedwm.c`) which means we have to press BOTH `MODIFIER1` and `SHIFT` at the same time to activate this keybind. -3. This is our **chain** key. `-1` here indicates that we do not want it to be chained. We want a regular keybind. See the example below for an example *with* a chained keybind instead. -4. This is our regular key. `XK_w` is defined in `/usr/include/X11/keysymdef.h` on most operating systems and it means we have to press `w` on our keyboard along with the modifier to activate this keybind. -5. This is our function. We call this, passing the next value (`const Arg *arg`) to it. -6. This is our function argument. Do note that in this case `cmd()` is a macro and it is defined in `speedwm.c`. This macro will pass the contents of the macro to a shell it will spawn. - -Feel free to copy the above to `keybinds.h` if you want to experiment with it. - ### Example chained keybind 1. `{ KeyPress,` @@ -138,16 +77,5 @@ Feel free to copy the above to `keybinds.h` if you want to experiment with it. Combined into one line: `{ KeyPress, MODIFIER1|SHIFT, XK_a, XK_w, togglebar, {0} },` -Let's break down the above. - -1. This is our type. If it's `KeyPress`, it will be activated when the keybind is pressed. If it is `KeyRelease` it will be activated when the keybind is released. -2. This is our modifier. `MODIFIER1` is defined in `keybinds.h`. We're adding SHIFT to it, (defined in `speedwm.c`) which means we have to press BOTH `MODIFIER1` and `SHIFT` at the same time to activate this keybind. -3. This is our **chain** key. `XK_a` here is the key we have to press along with our modifier to activate this keybind. `XK_a` is defined in `/usr/include/X11/keysymdef.h` on most operating systems. -4. This is our regular key. `XK_w` is defined in `/usr/include/X11/keysymdef.h` on most operating systems and it means we have to press `w` on our keyboard to activate this keybind. Note that we do **not** need to press the modifier here, because it is a chained keybind. -5. This is our function. We call this, passing the next value (`const Arg *arg`) to it. -6. This is our function argument. We simply pass `0` here because we don't need to pass anything to the function, because the function does not care. - -Feel free to copy the above to `keybinds.h` if you want to experiment with it. - -This should give you a brief idea of how keybinds work in speedwm. Most of this carries over to `dwm` as well, although it does not have some of this stuff. It should be noted that as I mentioned previously, you don't HAVE to use this system. You can use external programs to handle keybinds, and `libspeedwm` to perform actions in speedwm. sxkbd is one popular program for this purpose and window managers like `bspwm` use it. However such a solution is out of the scope of this documentation! +This should give you a brief idea of how keybinds work in speedwm. Most of this carries over to `dwm` as well, although it does not have some of this stuff. diff --git a/speedwm.1 b/speedwm.1 index c981abf..c1262ee 100644 --- a/speedwm.1 +++ b/speedwm.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 3.0.1 +.\" Automatically generated by Pandoc 2.19.2 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. @@ -67,7 +67,7 @@ installed. You can see `Dependencies' for a list of all dependencies required and optionally recommended to use speedwm. .IP \[bu] 2 -git clone https://codeberg.org/speedie/speedwm +git clone https://git.speedie.gq/speedwm .IP \[bu] 2 cd speedwm .IP \[bu] 2 @@ -78,7 +78,7 @@ If any warnings/errors show up, fix it by installing the missing dependency. .RE .IP \[bu] 2 -If a .xinitrc is used, add \f[V]speedwm\f[R] to the end. +If a .xinitrc is used, add \f[V]speedwm\f[R] to the end of the file. If you\[cq]re using .xinit you can also just \f[V]startx /usr/bin/speedwm\f[R]. .RS 2 @@ -104,7 +104,11 @@ I have no interest in ever supporting or developing for it. Please don\[cq]t create any issues regarding Wayland support. .PP If you\[cq]re having any issues on operating systems with the BSD -kernel, or something like NixOS, please file a bug report here. +kernel, or something like NixOS, please file a bug report here on +Codeberg, or by emailing me. +.PP +If you have any questions, see the official speedwm +wiki (https://speedwm.speedie.gq). .SS 3. Layouts .PP speedwm comes with the following layouts: @@ -506,12 +510,12 @@ st - Default terminal Chromium - Default web browser .PP And everything under \f[V]Features\f[R]. -## 6. -Important +.SS 6. Important .PP If you\[cq]re used to dwm, speedwm might be a little unfamiliar to you at first. This is because speedwm doesn\[cq]t use config.h (or config.def.h). +.PP Instead, config.h is split into different parts to make it easier to edit. Instead of editing config.h you\[cq]ll want to edit: @@ -519,6 +523,8 @@ Instead of editing config.h you\[cq]ll want to edit: autostart.h for starting stuff right before speedwm (For example xclip, pywal, etc.) .IP \[bu] 2 +bar.h for configuring bar rules. +.IP \[bu] 2 options.h for changing colors and applications to use with keybinds. .IP \[bu] 2 signal.h for adding fake signals @@ -540,6 +546,8 @@ statuscmd clicks. ipc.h for adding/removing IPC commands. (If support is compiled in) .IP \[bu] 2 +query.h for adding/removing queries. +.IP \[bu] 2 toggle.h for adding/removing features from getting compiled in. .PP After you\[cq]ve edited one of the files, you need to run `make clean @@ -547,20 +555,12 @@ install' to reinstall speedwm. Remember that you can change colors through your .Xresources file (see \&.Xresources and Pywal) meaning you do not need to recompile speedwm. .PP -Another important detail you must keep in mind is that this build comes -with a status bar simply named `speedwm_status'. -It can be found in the speedwm source code directory. -It is just a shell script which adds stuff to your status bar. -It will automatically be started when speedwm starts. -.PP -You can edit the status bar simply by editing `speedwm_stellar' or its -modules (modules_*) and running `make clean install'. -You can also configure it by editing `\[ti]/.config/speedwm/statusrc'. -.PP -If you want to change status bar, edit options.h and set `static char -status' to your status bar binary (must be in $PATH). -Alternatively, you can also set it in .Xresources (See .Xresources and -Pywal). +You can edit the status bar simply by editing its modules +(modules_\&...) +and running `make clean install'. +You can also configure the modules by editing +`\[ti]/.config/speedwm/statusrc' which is configured entirely in shell +script syntax. .SS 7. Configuration and .Xresources .PP speedwm has .Xresources support thanks to the .Xresources patch. @@ -811,71 +811,71 @@ speedwm.col.windowbordersel: #eeeeee .IP \[bu] 2 speedwm.col.windowborderurg: #f0e68c .IP \[bu] 2 -speedwm.text.tag1.empty:  +speedwm.text.tag1.empty: \[uF8A5] .IP \[bu] 2 -speedwm.text.tag2.empty:  +speedwm.text.tag2.empty: \[uF8A8] .IP \[bu] 2 -speedwm.text.tag3.empty:  +speedwm.text.tag3.empty: \[uF8AB] .IP \[bu] 2 -speedwm.text.tag4.empty:  +speedwm.text.tag4.empty: \[uF8AE] .IP \[bu] 2 -speedwm.text.tag5.empty:  +speedwm.text.tag5.empty: \[uF8B1] .IP \[bu] 2 -speedwm.text.tag6.empty:  +speedwm.text.tag6.empty: \[uF8B4] .IP \[bu] 2 -speedwm.text.tag7.empty:  +speedwm.text.tag7.empty: \[uF8B7] .IP \[bu] 2 -speedwm.text.tag8.empty:  +speedwm.text.tag8.empty: \[uF8BA] .IP \[bu] 2 -speedwm.text.tag9.empty:  +speedwm.text.tag9.empty: \[uF8BD] .IP \[bu] 2 -speedwm.text.tag1.used:  +speedwm.text.tag1.used: \[uF8A3] .IP \[bu] 2 -speedwm.text.tag2.used:  +speedwm.text.tag2.used: \[uF8A6] .IP \[bu] 2 -speedwm.text.tag3.used:  +speedwm.text.tag3.used: \[uF8A9] .IP \[bu] 2 -speedwm.text.tag4.used:  +speedwm.text.tag4.used: \[uF8AC] .IP \[bu] 2 -speedwm.text.tag5.used:  +speedwm.text.tag5.used: \[uF8AF] .IP \[bu] 2 -speedwm.text.tag6.used:  +speedwm.text.tag6.used: \[uF8B2] .IP \[bu] 2 -speedwm.text.tag7.used:  +speedwm.text.tag7.used: \[uF8B5] .IP \[bu] 2 -speedwm.text.tag8.used:  +speedwm.text.tag8.used: \[uF8B8] .IP \[bu] 2 -speedwm.text.tag9.used:  +speedwm.text.tag9.used: \[uF8BB] .IP \[bu] 2 -speedwm.text.layout1:  +speedwm.text.layout1: \[uF330] .IP \[bu] 2 -speedwm.text.layout2:  +speedwm.text.layout2: \[uF331] .IP \[bu] 2 -speedwm.text.layout3:  +speedwm.text.layout3: \[uF332] .IP \[bu] 2 -speedwm.text.layout4:  +speedwm.text.layout4: \[uF333] .IP \[bu] 2 -speedwm.text.layout5:  +speedwm.text.layout5: \[uF334] .IP \[bu] 2 -speedwm.text.layout6:  +speedwm.text.layout6: \[uF335] .IP \[bu] 2 -speedwm.text.layout7:  +speedwm.text.layout7: \[uF336] .IP \[bu] 2 -speedwm.text.layout8:  +speedwm.text.layout8: \[uF337] .IP \[bu] 2 -speedwm.text.layout9:  +speedwm.text.layout9: \[uF338] .IP \[bu] 2 -speedwm.text.layout10:  +speedwm.text.layout10: \[uF339] .IP \[bu] 2 -speedwm.text.layout11:  +speedwm.text.layout11: \[uF33A] .IP \[bu] 2 -speedwm.text.layout12:  +speedwm.text.layout12: \[uF33B] .IP \[bu] 2 -speedwm.text.layout13:  +speedwm.text.layout13: \[uF33C] .IP \[bu] 2 -speedwm.text.layout14:  +speedwm.text.layout14: \[uF33D] .IP \[bu] 2 -speedwm.text.layout15:  +speedwm.text.layout15: \[uF33E] .IP \[bu] 2 speedwm.color.hiddentitle: 1 .IP \[bu] 2 @@ -1267,7 +1267,7 @@ Below is a list of all signums and what they do. 121 - Reset bar padding and gaps .SS 9. Status bar .PP -speedwm has a status bar. +speedwm has a status bar module which is enabled by default. It\[cq]s the (by default) right part of the bar. It supports: .IP \[bu] 2 @@ -1314,7 +1314,8 @@ previously. Then simply start the status bar through autostart.h, \[ti]/.config/speedwm/autostart.sh, .xinitrc or some other means of running a program. -.SS 10. Additional note on autostart +## 10. +Additional note on autostart .PP If you wish to add autostart entries without recompiling, consider using $HOME/.config/speedwm/autostart.sh. @@ -1334,9 +1335,8 @@ This control has its own header, \f[V]bar.h\f[R]. .PP \f[V]bar.h\f[R] contains a somewhat detailed list of all possible options here, but more importantly it contains a \f[V]barrules\f[R] -array. -This array similar to the \f[V]rules\f[R] array allows extensive control -over where each bar module is placed and how it functions. +array which allows extensive control over where each bar module is +placed and how it functions. In theory, this means you could put 22 instances of the same, boring tags on one bar, although why would one do that? .PP @@ -1344,42 +1344,11 @@ Each module can be aligned to any part of the bar (See `Alignment' for possible values). If, let\[cq]s say multiple modules both align to the right next to the center split (middle), the first module takes priority. -.SS BarRule structure -.IP "1." 3 -Monitor -.PP -Internally: \f[V]int monitor\f[R] -.IP "2." 3 -Bar -.PP -Internally: \f[V]int bar\f[R] -.IP "3." 3 -Alignment -.PP -Internally: \f[V]int alignment\f[R] -.IP "4." 3 -Width function -.PP -Internally: \f[V]int (*widthfunc)(Bar *bar, BarWidthArg *a)\f[R] -.IP "5." 3 -Draw function -.PP -Internally: \f[V]int (*drawfunc)(Bar *bar, BarDrawArg *a)\f[R] -.IP "6." 3 -Click function -.PP -Internally: \f[V]int (*clickfunc)(Bar *bar, BarClickArg *a)\f[R] -.IP "7." 3 -Name -.PP -Internally: \f[V]char *name\f[R] .SS Module list .PP Below is a list of all modules bundled with speedwm. The source code for these modules are all in \f[V]bar/\f[R] and declared in \f[V]bar/items.c\f[R] and \f[V]bar/items.h\f[R]. -If you want to add more, you can just declare them in the same way and -add them to the \f[V]barrules\f[R] array if you want to use them. .IP \[bu] 2 ltsymbol: Standard, basic layout icon. .IP \[bu] 2 @@ -1488,8 +1457,7 @@ The syntax below applies to all default modules. Syntax: click_ Example: click_tags_pwl .SS Module name .PP -The module name really doesn\[cq]t mean anything at all, it is just -useful for debugging. +The module name really doesn\[cq]t mean anything at all. .SS Example module .PP With all that said, you should now be able to add a module. @@ -1513,27 +1481,6 @@ you can add powerline tags on the focused monitor. Combined into one line: \f[V]{ \[aq]A\[aq], 0, bar_align_left, width-tags_pwl, draw_tags_pwl, click_tags_pwl, \[dq]my cool powerline tags\[dq] },\f[R] .PP -Let\[cq]s break down the above. -.IP "1." 3 -`A' here refers to the focused monitor, indicating that we want to place -it on the focused monitor. -.IP "2." 3 -0 here means we want to place it on the primary bar. -.IP "3." 3 -bar_align_left indicates we want to align it to the left part of the -bar, you know, where tags usually are. -.IP "4." 3 -width_tags_pwl is the function we call to get the width. -.IP "5." 3 -draw_tags_pwl is the function we call to draw the bar. -.IP "6." 3 -click_tags_pwl is the function we call to check if we clicked on that -module. -.IP "7." 3 -A label for our module, it\[cq]s only useful for debugging. -.PP -Feel free to copy the above to \f[V]bar.h\f[R] if you want to experiment -with it. Remember that you can have put any module wherever you want. Nothing is stopping you from having your tags on the right. This is what makes bar rules so powerful. @@ -1544,36 +1491,9 @@ array in \f[V]keybinds.h\f[R] which contains all keybinds speedwm will recognize. While this isn\[cq]t the only way to add keybinds in speedwm, it does not require any additional software to be installed. -.SS Key structure -.IP "1." 3 -Event -.PP -Internally: \f[V]int type\f[R] -.IP "2." 3 -Modifier -.PP -Internally: \f[V]unsigned int mod\f[R] -.IP "3." 3 -Chain key -.PP -Internally: \f[V]KeySym chain\f[R] -.IP "4." 3 -Key -.PP -Internally: \f[V]KeySym keysym\f[R] -.IP "5." 3 -Function -.PP -Internally: \f[V]void (*func)(const Arg *)\f[R] -.IP "6." 3 -Function arguments -.PP -Internally: \f[V]const Arg arg\f[R] .SS Event .PP The event value allow you to specify when a keybind is executed. -Internally this is known as \f[V]int type\f[R] and it specifies when the -function is executed. .IP \[bu] 2 KeyPress: Activate immediately on key press. .IP \[bu] 2 @@ -1582,14 +1502,6 @@ KeyRelease: Activate immediately on key release. .PP There are a lot of different modifiers, this list is only going to list the ones declared in speedwm. -You can, of course declare more if necessary although it should be noted -that doing so is out of the scope of this documentation. -We will be focusing on the defined modifiers which are defined in -\f[V]speedwm.c\f[R] like this: -.PP -\f[V]/* Modifiers */ #define CONTROL ControlMask #define SHIFT ShiftMask #define ALT Mod1Mask #define ALTR Mod3Mask #define SUPER Mod4Mask #define SUPERR Mod5Mask\f[R] -.PP -Below is a list of defined modifiers: .IP \[bu] 2 CONTROL Left Control (Ctrl) key. .IP \[bu] 2 @@ -1627,11 +1539,6 @@ key to start a chain, the value here would be \f[V]XK_a\f[R]. .PP If we want a normal key, one that is \f[B]not\f[R] chained, we can accomplish that by simply setting the Chain key to \f[V]-1\f[R]. -You can see this in the \f[V]keypress()\f[R] function in -\f[V]speedwm.c\f[R]. -This line of code is responsible for this behavior. -.PP -\f[V]if (keysym == keys[i].keysym && keys[i].chain == -1\f[R] .SS Key .PP The next value, similar to the Chain key also needs to be a keysym. @@ -1648,7 +1555,7 @@ There are a lot more keys technically defined, see \f[V]/usr/include/X11/XF86keysym.h\f[R] for a list of media keys. .SS Function .PP -Many functions expect \f[V]const Arg *arg\f[R] to be passed to them. +Many functions expect an argument to be passed to them. However this value does require any function argument to be specified because it simply passes the next value to the function and calls it. .PP @@ -1659,15 +1566,7 @@ expects \f[V]const Arg *arg\f[R]. .PP This is the actual argument passed to the function we\[cq]re calling when the keybind is activated. -Explaining this well would be fairly simple, but instead of doing so I -recommend you read the \f[V]typedef union Arg\f[R] in -\f[V]speedwm.c\f[R]. -It looks like this: .PP -\f[V]typedef union { long i; unsigned long ui; float f; const void *v; } Arg;\f[R] -.PP -In short, Arg is a list of different types, which may be used to set -different things in the argument. Passing a float (such as mfact) through would mean I should override \f[V].f\f[R], passing an integer (such as barposition) through would mean I should override \f[V].i\f[R]. @@ -1696,42 +1595,6 @@ But you still don\[cq]t know how to put all this knowledge together. .PP Combined into one line: \f[V]{ KeyPress, MODIFIER1|SHIFT, -1, XK_w, spawn, cmd( \[dq]firefox\[dq] ) },\f[R] -.PP -Let\[cq]s break down the above. -.IP "1." 3 -This is our type. -If it\[cq]s \f[V]KeyPress\f[R], it will be activated when the keybind is -pressed. -If it is \f[V]KeyRelease\f[R] it will be activated when the keybind is -released. -.IP "2." 3 -This is our modifier. -\f[V]MODIFIER1\f[R] is defined in \f[V]keybinds.h\f[R]. -We\[cq]re adding SHIFT to it, (defined in \f[V]speedwm.c\f[R]) which -means we have to press BOTH \f[V]MODIFIER1\f[R] and \f[V]SHIFT\f[R] at -the same time to activate this keybind. -.IP "3." 3 -This is our \f[B]chain\f[R] key. -\f[V]-1\f[R] here indicates that we do not want it to be chained. -We want a regular keybind. -See the example below for an example \f[I]with\f[R] a chained keybind -instead. -.IP "4." 3 -This is our regular key. -\f[V]XK_w\f[R] is defined in \f[V]/usr/include/X11/keysymdef.h\f[R] on -most operating systems and it means we have to press \f[V]w\f[R] on our -keyboard along with the modifier to activate this keybind. -.IP "5." 3 -This is our function. -We call this, passing the next value (\f[V]const Arg *arg\f[R]) to it. -.IP "6." 3 -This is our function argument. -Do note that in this case \f[V]cmd()\f[R] is a macro and it is defined -in \f[V]speedwm.c\f[R]. -This macro will pass the contents of the macro to a shell it will spawn. -.PP -Feel free to copy the above to \f[V]keybinds.h\f[R] if you want to -experiment with it. .SS Example chained keybind .IP "1." 3 \f[V]{ KeyPress,\f[R] @@ -1749,53 +1612,9 @@ experiment with it. Combined into one line: \f[V]{ KeyPress, MODIFIER1|SHIFT, XK_a, XK_w, togglebar, {0} },\f[R] .PP -Let\[cq]s break down the above. -.IP "1." 3 -This is our type. -If it\[cq]s \f[V]KeyPress\f[R], it will be activated when the keybind is -pressed. -If it is \f[V]KeyRelease\f[R] it will be activated when the keybind is -released. -.IP "2." 3 -This is our modifier. -\f[V]MODIFIER1\f[R] is defined in \f[V]keybinds.h\f[R]. -We\[cq]re adding SHIFT to it, (defined in \f[V]speedwm.c\f[R]) which -means we have to press BOTH \f[V]MODIFIER1\f[R] and \f[V]SHIFT\f[R] at -the same time to activate this keybind. -.IP "3." 3 -This is our \f[B]chain\f[R] key. -\f[V]XK_a\f[R] here is the key we have to press along with our modifier -to activate this keybind. -\f[V]XK_a\f[R] is defined in \f[V]/usr/include/X11/keysymdef.h\f[R] on -most operating systems. -.IP "4." 3 -This is our regular key. -\f[V]XK_w\f[R] is defined in \f[V]/usr/include/X11/keysymdef.h\f[R] on -most operating systems and it means we have to press \f[V]w\f[R] on our -keyboard to activate this keybind. -Note that we do \f[B]not\f[R] need to press the modifier here, because -it is a chained keybind. -.IP "5." 3 -This is our function. -We call this, passing the next value (\f[V]const Arg *arg\f[R]) to it. -.IP "6." 3 -This is our function argument. -We simply pass \f[V]0\f[R] here because we don\[cq]t need to pass -anything to the function, because the function does not care. -.PP -Feel free to copy the above to \f[V]keybinds.h\f[R] if you want to -experiment with it. -.PP This should give you a brief idea of how keybinds work in speedwm. Most of this carries over to \f[V]dwm\f[R] as well, although it does not have some of this stuff. -It should be noted that as I mentioned previously, you don\[cq]t HAVE to -use this system. -You can use external programs to handle keybinds, and -\f[V]libspeedwm\f[R] to perform actions in speedwm. -sxkbd is one popular program for this purpose and window managers like -\f[V]bspwm\f[R] use it. -However such a solution is out of the scope of this documentation! .SS Credits .PP I far from wrote this entire project myself. @@ -1856,7 +1675,7 @@ Mihir Lad .IP \[bu] 2 MLquest8 .IP \[bu] 2 -Ondřej Grover +Ond\[u0159]ej Grover .IP \[bu] 2 ornx .IP \[bu] 2 @@ -1872,7 +1691,7 @@ Ryan Roden-Corrent .IP \[bu] 2 sipi .IP \[bu] 2 -Sönke Lambert +S\[:o]nke Lambert .IP \[bu] 2 speedie .IP \[bu] 2 @@ -1884,6 +1703,6 @@ suckless.org .IP \[bu] 2 Timmy Keller .IP \[bu] 2 -Viliam Kováč +Viliam Kov\['a]\[u010D] .PP See Codeberg contributions for more information. diff --git a/speedwm.c b/speedwm.c index ebf265c..4f61e05 100644 --- a/speedwm.c +++ b/speedwm.c @@ -274,12 +274,13 @@ struct Client { typedef struct { int monitor; int bar; - int alignment; // see bar alignment enum + int alignment; int (*widthfunc)(Bar *bar, BarWidthArg *a); int (*drawfunc)(Bar *bar, BarDrawArg *a); int (*clickfunc)(Bar *bar, Arg *arg, BarClickArg *a); - char *name; // for debugging - int x, w; // position, width for internal use + int val; + char *name; + int x, w; } BarRule; typedef struct {