diff options
-rw-r--r-- | FUNDING.yml | 3 | ||||
-rw-r--r-- | README.md | 14 | ||||
-rw-r--r-- | config.h | 6 | ||||
-rw-r--r-- | dwm.c | 11 | ||||
-rw-r--r-- | larbs.mom | 60 |
5 files changed, 51 insertions, 43 deletions
diff --git a/FUNDING.yml b/FUNDING.yml index f8e6076..c7c9a22 100644 --- a/FUNDING.yml +++ b/FUNDING.yml @@ -1,3 +1,2 @@ +custom: ["https://lukesmith.xyz/donate.html"] github: lukesmithxyz -custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith", "https://lukesmith.xyz/crypto"] -patreon: lukesmith @@ -12,16 +12,16 @@ I haven't kept `man dwm`/`dwm.1` updated though. PRs welcome on that, lol. ## Patches and features -- Clickable statusbar with my build of [dwmblocks](https://github.com/lukesmithxyz/dwmblocks). -- Reads xresources colors/variables (i.e. works with `pywal`, etc.). +- [Clickable statusbar](https://dwm.suckless.org/patches/statuscmd/) with my build of [dwmblocks](https://github.com/lukesmithxyz/dwmblocks). +- Reads [xresources](https://dwm.suckless.org/patches/xresources/) colors/variables (i.e. works with `pywal`, etc.). - scratchpad: Accessible with mod+shift+enter. - New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys `super+(shift+)t/y/u/i`. - True fullscreen (`super+f`) and prevents focus shifting. - Windows can be made sticky (`super+s`). -- stacker: Move windows up the stack manually (`super-K/J`). -- shiftview: Cycle through tags (`super+g/;`). -- vanitygaps: Gaps allowed across all layouts. -- swallow patch: if a program run from a terminal would make it inoperable, it temporarily takes its place to save space. +- [stacker](https://dwm.suckless.org/patches/stacker/): Move windows up the stack manually (`super-K/J`). +- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (`super+g/;`). +- [vanitygaps](https://dwm.suckless.org/patches/vanitygaps/): Gaps allowed across all layouts. +- [swallow patch](https://dwm.suckless.org/patches/swallow/): if a program run from a terminal would make it inoperable, it temporarily takes its place to save space. ## Installation for newbs @@ -31,8 +31,6 @@ cd dwm sudo make install ``` -Users of Arch-based distros can also install it from the AUR as [dwm-luke-git](https://aur.archlinux.org/packages/dwm-luke-git). - ## Please install `libxft-bgra`! This build of dwm does not block color emoji in the status/info bar, so you must install [libxft-bgra](https://aur.archlinux.org/packages/libxft-bgra/) from the AUR, which fixes a libxft color emoji rendering problem, otherwise dwm will crash upon trying to render one. Hopefully this fix will be in all libxft soon enough. @@ -50,7 +50,7 @@ static const Rule rules[] = { */ /* class instance title tags mask isfloating isterminal noswallow monitor */ { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 }, - { TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 }, + { TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 }, { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, { NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 }, { NULL, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 }, @@ -64,14 +64,14 @@ static int resizehints = 0; /* 1 means respect size hints in tiled resizals * #include "vanitygaps.c" static const Layout layouts[] = { /* symbol arrange function */ - { "[]=", tile }, /* Default: Master on left, slaves on right */ + { "[]=", tile }, /* Default: Master on left, slaves on right */ { "TTT", bstack }, /* Master on top, slaves on bottom */ { "[@]", spiral }, /* Fibonacci spiral */ { "[\\]", dwindle }, /* Decreasing in size right and leftward */ { "[D]", deck }, /* Master on left, slaves in monocle-like mode on right */ - { "[M]", monocle }, /* All windows on top of eachother */ + { "[M]", monocle }, /* All windows on top of eachother */ { "|M|", centeredmaster }, /* Master in middle, slaves on sides */ { ">M>", centeredfloatingmaster }, /* Same but master floats */ @@ -951,8 +951,13 @@ expose(XEvent *e) void focus(Client *c) { - if (!c || !ISVISIBLE(c)) - for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext); + if (!c || !ISVISIBLE(c)) { + for (c = selmon->stack; c && (!ISVISIBLE(c) || (c->issticky && !selmon->sel->issticky)); c = c->snext); + + if (!c) /* No windows found; check for available stickies */ + for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext); + } + if (selmon->sel && selmon->sel != c) unfocus(selmon->sel, 0); if (c) { @@ -1229,6 +1234,8 @@ manage(Window w, XWindowAttributes *wa) updatewindowtype(c); updatesizehints(c); updatewmhints(c); + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); grabbuttons(c, 0); if (!c->isfloating) @@ -64,7 +64,7 @@ Below in this document, there is information about where to change programs/comp .PP Additionally, while this isn't a part of the desktop environment, the default editing mode in the shell is using vi bindings. If you want to learn more of this, run \f(CWMod+F2\fP and type and select the option for "vi mode in shell". -This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.config/inputrc\fP. +This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.config/shell/inputrc\fP. .HEADING 2 "The Status Bar" .PP To the left, you'll see the numbers of your current workspace/tag(s). @@ -173,6 +173,25 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik .ITEM \f(CWMod+D\fP \(en passmenu (password manager) .LIST OFF +.HEADING 2 "Tags/Workspaces" +.PP +There are nine tags, active tags are highlighted in the top left. +.LI +.ITEM +\f(CWMod+(Number)\fP \(en Go to that number tag +.ITEM +\f(CWMod+Shift+(Number)\fP \(en Send window to that tag +.ITEM +\f(CWMod+Tab\fP \(en Go to previous tag (may also use \f(CW\\\fP for Tab) +.ITEM +\f(CWMod+g\fP \(en Go to left tag (hold shift to send window there) +.ITEM +\f(CWMod+;\fP \(en Go to right tag (hold shift to send window there) +.ITEM +\f(CWMod+Left/Right\fP \(en Go to another display +.ITEM +\f(CWMod+Shift+Left/+Right\fP \(en Move window to another display +.LIST OFF .HEADING 2 "System" .LI .ITEM @@ -235,25 +254,6 @@ I use ncmpcpp as a music player, which is a front end for mpd. .ITEM \f(CWMod+F4\fP \(en pulsemixer (general audio/volume sink/source control) .LIST OFF -.HEADING 2 "Tags/Workspaces" -.PP -There are nine tags, active tags are highlighted in the top left. -.LI -.ITEM -\f(CWMod+(Number)\fP \(en Go to that number tag -.ITEM -\f(CWMod+Shift+(Number)\fP \(en Send window to that tag -.ITEM -\f(CWMod+Tab\fP \(en Go to previous tag (may also use \f(CW\\\fP for Tab) -.ITEM -\f(CWMod+g\fP \(en Go to left tag (hold shift to send window there) -.ITEM -\f(CWMod+;\fP \(en Go to right tag (hold shift to send window there) -.ITEM -\f(CWMod+Left\fP \(en Move to workspace to the left -.ITEM -\f(CWMod+Right\fP \(en Move to workspace to the right -.LIST OFF .HEADING 2 "Recording" .PP I use maim and ffmpeg to make different recordings of the desktop and audio. @@ -280,11 +280,14 @@ buttons, screen brightness, email, web browsing buttons, etc.) to what you would expect. .HEADING 1 "Configuration" .PP -Dotfiles/settings files are located in \f(CW~/.config/\fP, note that dotfiles to programs not included in LARBS are there as well by requests of users. I do not necessarily maintain all these dotfiles, but they remain as legacy. +Dotfiles/settings files are located in \f(CW~/.config/\fP. +.PP +Suckless programs, dwm (the window manager), st (the terminal) and dmenu among others do not have traditional config files, but have their source code location in \f(CW~/.local/src/\fP (press \f(CWrr\fP to jump to that directory). +There you can modify their \f(CWconfig.h\fP files or other source code, then \f(CWsudo make install\fP to reinstall. .PP -Suckless programs, dwm (the window manager), st (the terminal) and dmenu among others do not have traditional config files, but have their source code location in \f(CW~/.local/src/\fP. -There you can modify their \f(CWconfig.h\fP files, then \f(CWsudo make install\fP to reinstall. -(You'll have to restart the program to see its effects obviously.) +vim is set to automatically recompile and install these programs whenever you save changes to any \f(CWconfig.h\fP file +(compilation will be nearly instantaneous). +You'll have to restart the program to see its effects obviously. .HEADING 1 "Frequently Asked Questions (FAQs)" .HEADING 2 "My keyboard isn't working as expected!" .PP @@ -305,19 +308,20 @@ Additionally, I've set vim to use the clipboard as the default buffer, which mea .PP The system will always read the file \f(CW~/.config/wall.png\fP as the wallpaper. The script \f(CWsetbg\fP, if run on an image will set it as the persistent background. -When using the file manager, you can simply hover over an image name and type \f(CWbg\fP and this will run \f(CWsetbg\fP. +When using the file manager, you can simply hover over an image name and type \f(CWb\fP and this will run \f(CWsetbg\fP. .HEADING 2 "How I change the colorscheme?" .PP -LARBS no longer deploys Xresource by default, but check \f(CW~/.config/Xresources\fP for a list of color schemes you can activate or add your own. When you save the file, vim will automatically update the colorscheme. If you'd like these colors activated by default on login, there is a line in \f(CW~/.config/xprofile\fP you can uncomment to allow that. +LARBS no longer deploys Xresources by default, but check \f(CW~/.config/x11/xresources\fP for a list of color schemes you can activate or add your own. When you save the file, vim will automatically update the colorscheme. If you'd like these colors activated by default on login, there is a line in \f(CW~/.config/x11/xprofile\fP you can uncomment to allow that. .PP Or, if you want to use \f(CWwal\fP to automatically generate colorschemes from your wallpapers, just install it and \f(CWsetbg\fP will automatically detect and run it on startup and wallpaper change. .HEADING 2 "How do I set up my email?" .PP LARBS comes with mutt-wizard, which gives the ability to receive and send all your email and keep an offline store of it all in your terminal, without the need for browser. -You can add email accounts by running \f(CWmw add\fP. +You can add email accounts by running \f(CWmw -a your@email.com\fP. +See \f(CWman mw\fP for all the information you need about mutt-wizard. .PP Once you have successfully added your email address(es), you can open your mail with \f(CWneomutt\fP which is also bound to \f(CWMod+e\fP. -You can sync your mail by pressing \f(CWMod+F8\fP and you can set a cronjob to sync mail every several minutes by running \f(CWmw cron\fP. +You can sync your mail by pressing \f(CWMod+F8\fP and you can set a cronjob to sync mail every 10 minutes by running \f(CWmw -t 10\fP. .PP You may also want to install \f(CWpam-gnupg-git\fP, which can be set up to automatically unlock your GPG key on login, which will allow you avoid having put in a password to sync and send, all while keeping your password safe and encypted on your machine. .HEADING 2 "How do I set up my music?" |