Merge branch 'stuff'

This commit is contained in:
Luke Smith 2020-04-26 11:26:32 -04:00
commit 18c6a63f86
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
4 changed files with 61 additions and 39 deletions

5
.gitignore vendored
View file

@ -1,4 +1,9 @@
.gitignore
*.orig *.orig
*.rej *.rej
larbs.pdf larbs.pdf
patches patches
util.o
dwm
dwm.o
drw.o

View file

@ -121,9 +121,9 @@ static Key keys[] = {
{ MODKEY, XK_w, spawn, SHCMD("$BROWSER") }, { MODKEY, XK_w, spawn, SHCMD("$BROWSER") },
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD("st -e sudo nmtui") }, { MODKEY|ShiftMask, XK_w, spawn, SHCMD("st -e sudo nmtui") },
{ MODKEY, XK_e, spawn, SHCMD("st -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") }, { MODKEY, XK_e, spawn, SHCMD("st -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") },
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("tutorialvids") }, { MODKEY|ShiftMask, XK_e, spawn, SHCMD("st -e abook -C ~/.config/abook/abookrc --datafile ~/.config/abook/addressbook") },
{ MODKEY, XK_r, spawn, SHCMD("st -e lf") }, { MODKEY, XK_r, spawn, SHCMD("st -e lf") },
/* { MODKEY|ShiftMask, XK_r, quit, {1} }, */ { MODKEY|ShiftMask, XK_r, spawn, SHCMD("st -e htop") },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} }, { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_y, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_y, setlayout, {.v = &layouts[2]} },
@ -143,12 +143,12 @@ static Key keys[] = {
{ MODKEY, XK_backslash, view, {0} }, { MODKEY, XK_backslash, view, {0} },
/* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("") }, */ /* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("") }, */
{ MODKEY, XK_a, spawn, SHCMD("st -e pulsemixer; kill -44 $(pidof dwmblocks)") }, { MODKEY, XK_a, togglegaps, {0} },
/* { MODKEY|ShiftMask, XK_a, spawn, SHCMD("") }, */ { MODKEY|ShiftMask, XK_a, defaultgaps, {0} },
{ MODKEY, XK_s, togglesticky, {0} }, { MODKEY, XK_s, togglesticky, {0} },
/* { MODKEY|ShiftMask, XK_s, spawn, SHCMD("") }, */ { MODKEY|ShiftMask, XK_s, togglebar, {0} },
{ MODKEY, XK_d, spawn, {.v = dmenucmd } }, { MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_d, togglegaps, {0} }, { MODKEY|ShiftMask, XK_d, spawn, SHCMD("st -e sudo su") },
{ MODKEY, XK_f, togglefullscr, {0} }, { MODKEY, XK_f, togglefullscr, {0} },
{ MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[8]} }, { MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[8]} },
{ MODKEY, XK_g, shiftview, { .i = -1 } }, { MODKEY, XK_g, shiftview, { .i = -1 } },
@ -167,14 +167,14 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_z, incrgaps, {.i = -1 } }, { MODKEY|ShiftMask, XK_z, incrgaps, {.i = -1 } },
/* { MODKEY, XK_x, spawn, SHCMD("") }, */ /* { MODKEY, XK_x, spawn, SHCMD("") }, */
/* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("") }, */ /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("") }, */
{ MODKEY, XK_c, spawn, SHCMD("st -e bc -l") }, /* { MODKEY, XK_c, spawn, SHCMD("") }, */
{ MODKEY|ShiftMask, XK_c, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") }, /* { MODKEY|ShiftMask, XK_c, spawn, SHCMD("") }, */
{ MODKEY, XK_v, spawn, SHCMD("st -e $EDITOR -c \"VimwikiIndex\"") }, /* { MODKEY, XK_v, spawn, SHCMD("") }, */
{ MODKEY|ShiftMask, XK_v, spawn, SHCMD("{ killall xcompmgr || setsid xcompmgr & } ; xwallpaper --zoom ~/.config/wall.png") }, /* { MODKEY|ShiftMask, XK_v, spawn, SHCMD("") }, */
{ MODKEY, XK_b, togglebar, {0} }, /* { MODKEY, XK_b, spawn, SHCMD("") }, */
/* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("") }, */ /* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("") }, */
{ MODKEY, XK_n, spawn, SHCMD("st -e newsboat; pkill -RTMIN+6 dwmblocks") }, { MODKEY, XK_n, spawn, SHCMD("st -e nvim -c VimwikiIndex") },
/* { MODKEY|ShiftMask, XK_n, spawn, SHCMD("") }, */ { MODKEY|ShiftMask, XK_n, spawn, SHCMD("st -e newsboat; pkill -RTMIN+6 dwmblocks") },
{ MODKEY, XK_m, spawn, SHCMD("st -e ncmpcpp") }, { MODKEY, XK_m, spawn, SHCMD("st -e ncmpcpp") },
{ MODKEY|ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, { MODKEY|ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_comma, spawn, SHCMD("mpc prev") }, { MODKEY, XK_comma, spawn, SHCMD("mpc prev") },
@ -192,17 +192,17 @@ static Key keys[] = {
{ MODKEY, XK_Insert, spawn, SHCMD("notify-send \"📋 Clipboard contents:\" \"$(xclip -o -selection clipboard)\"") }, { MODKEY, XK_Insert, spawn, SHCMD("notify-send \"📋 Clipboard contents:\" \"$(xclip -o -selection clipboard)\"") },
{ MODKEY, XK_F1, spawn, SHCMD("groff -mom /usr/local/share/dwm/larbs.mom -Tpdf | zathura -") }, { MODKEY, XK_F1, spawn, SHCMD("groff -mom /usr/local/share/dwm/larbs.mom -Tpdf | zathura -") },
{ MODKEY, XK_F2, quit, {1} }, { MODKEY, XK_F2, spawn, SHCMD("tutorialvids") },
{ MODKEY, XK_F3, spawn, SHCMD("displayselect") }, { MODKEY, XK_F3, spawn, SHCMD("displayselect") },
/* { MODKEY, XK_F4, spawn, SHCMD("") }, */ { MODKEY, XK_F4, spawn, SHCMD("st -e pulsemixer; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_F5, xrdb, {.v = NULL } }, { MODKEY, XK_F5, xrdb, {.v = NULL } },
{ MODKEY, XK_F6, spawn, SHCMD("torwrap") }, { MODKEY, XK_F6, spawn, SHCMD("torwrap") },
{ MODKEY, XK_F7, spawn, SHCMD("td-toggle") }, { MODKEY, XK_F7, spawn, SHCMD("td-toggle") },
{ MODKEY, XK_F8, spawn, SHCMD("mailsync") }, { MODKEY, XK_F8, spawn, SHCMD("mailsync") },
{ MODKEY, XK_F9, spawn, SHCMD("dmenumount") }, { MODKEY, XK_F9, spawn, SHCMD("dmenumount") },
{ MODKEY, XK_F10, spawn, SHCMD("dmenuumount") }, { MODKEY, XK_F10, spawn, SHCMD("dmenuumount") },
/* { MODKEY, XK_F11, spawn, SHCMD("") }, */ { MODKEY, XK_F11, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") },
/* { MODKEY, XK_F12, spawn, SHCMD("") }, */ { MODKEY, XK_F12, xrdb, {.v = NULL } },
{ MODKEY, XK_space, zoom, {0} }, { MODKEY, XK_space, zoom, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
@ -224,7 +224,7 @@ static Key keys[] = {
{ 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") }, { 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") },
{ 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") }, { 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") },
{ 0, XF86XK_AudioMedia, spawn, SHCMD("st -e ncmpcpp") }, { 0, XF86XK_AudioMedia, spawn, SHCMD("st -e ncmpcpp") },
{ 0, XF86XK_PowerOff, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") }, { 0, XF86XK_PowerOff, spawn, SHCMD("sysact") },
{ 0, XF86XK_Calculator, spawn, SHCMD("st -e bc -l") }, { 0, XF86XK_Calculator, spawn, SHCMD("st -e bc -l") },
{ 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") }, { 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") },
{ 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") }, { 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") },
@ -264,8 +264,6 @@ static Key keys[] = {
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = { static Button buttons[] = {
/* click event mask button function argument */ /* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} }, { ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} }, { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
{ ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} }, { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
@ -273,12 +271,15 @@ static Button buttons[] = {
{ ClkStatusText, 0, Button4, sigdwmblocks, {.i = 4} }, { ClkStatusText, 0, Button4, sigdwmblocks, {.i = 4} },
{ ClkStatusText, 0, Button5, sigdwmblocks, {.i = 5} }, { ClkStatusText, 0, Button5, sigdwmblocks, {.i = 5} },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button2, defaultgaps, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkClientWin, MODKEY, Button4, incrgaps, {.i = +1} },
{ ClkClientWin, MODKEY, Button5, incrgaps, {.i = -1} },
{ ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} },
{ ClkTagBar, 0, Button4, shiftview, {.i = -1} }, { ClkTagBar, 0, Button4, shiftview, {.i = -1} },
{ ClkTagBar, 0, Button5, shiftview, {.i = 1} }, { ClkTagBar, 0, Button5, shiftview, {.i = 1} },
{ ClkRootWin, 0, Button2, togglebar, {0} },
}; };

2
dwm.c
View file

@ -1593,7 +1593,7 @@ run(void)
void void
runAutostart(void) { runAutostart(void) {
system("killall dwmblocks 2>/dev/null ; dwmblocks &"); system("pidof -s dwmblocks >/dev/null || dwmblocks &");
} }
void void

View file

@ -63,7 +63,7 @@ Actually, this should go without saying, but \fIeverything\fP here can easily be
Below in this document, there is information about where to change programs/components. Below in this document, there is information about where to change programs/components.
.PP .PP
Additionally, while this isn't a part of the desktop environment, the default editing mode in the shell is using vi bindings. 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+Shift+E\fP and type and select the option for "vi mode in shell". 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/inputrc\fP.
.HEADING 2 "The Status Bar" .HEADING 2 "The Status Bar"
.PP .PP
@ -78,13 +78,13 @@ The program dwmblocks is what is run to generate the statusbar from those script
You can edit its config/source code in \f(CW~/.local/src/dwmblocks/\fP to tell it what scripts/commands you want it to display. You can edit its config/source code in \f(CW~/.local/src/dwmblocks/\fP to tell it what scripts/commands you want it to display.
.HEADING 2 "Deeper Tutorials" .HEADING 2 "Deeper Tutorials"
.PP .PP
Press \f(CWmod+shift+e\fP at any time to get a menu of programs to watch videos about streaming directly from YouTube. Press \f(CWmod+F2\fP at any time to get a menu of programs to watch videos about streaming directly from YouTube.
You can also check the config files for programs which detail a lot of the specific bindings. You can also check the config files for programs which detail a lot of the specific bindings.
.HEADING 1 "Key Bindings" .HEADING 1 "Key Bindings"
.PP .PP
The window manager dwm abstractly orders all of your windows into a stack from most important to least based on when you last manipulated it. The window manager dwm abstractly orders all of your windows into a stack from most important to least based on when you last manipulated it.
dwm is an easy to use window manager, but you should understand that it makes use of that stack layout. dwm is an easy to use window manager, but you should understand that it makes use of that stack layout.
If you're not familiar, I recommend you press \f(CWMod+Shift+E\fP and select the "dwm" option to watch my brief tutorial (note that the bindings I discuss in the video are the default dwm binds, which are different (inferior) to those here). If you're not familiar, I recommend you press \f(CWMod+F2\fP and select the "dwm" option to watch my brief tutorial (note that the bindings I discuss in the video are the default dwm binds, which are different (inferior) to those here).
.PP .PP
Notice also the case sensitivity of the shortcuts\c Notice also the case sensitivity of the shortcuts\c
.FOOTNOTE .FOOTNOTE
@ -105,13 +105,17 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
.ITEM .ITEM
\f(CWMod+h/l\fP \(en Change width of master window \f(CWMod+h/l\fP \(en Change width of master window
.ITEM .ITEM
\f(CWMod+z/Z\fP \(en Increase/decrease gaps \f(CWMod+z/Z\fP \(en Increase/decrease gaps (may also hold \f(CWMod\fP and scroll mouse)
.ITEM .ITEM
\f(CWMod+D\fP \(en Toggle gaps \f(CWMod+a\fP \(en Toggle gaps
.ITEM
\f(CWMod+A\fP \(en Gaps return to default values (may also hold \f(CWMod\fP and middle click)
.ITEM .ITEM
\f(CWMod+Shift+Space\fP \(en Make a window float (move and resize with \f(CWMod+\fPleft/right click). \f(CWMod+Shift+Space\fP \(en Make a window float (move and resize with \f(CWMod+\fPleft/right click).
.ITEM .ITEM
\f(CWMod+b\fP \(en Toggle status bar \f(CWMod+s\fP \(en Make/unmake a window "sticky" (follows you from tag to tag)
.ITEM
\f(CWMod+S\fP \(en Toggle status bar (may also middle click on desktop)
.LIST OFF .LIST OFF
.HEADING 2 "Window layouts" .HEADING 2 "Window layouts"
.LI .LI
@ -143,19 +147,23 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
.ITEM .ITEM
\f(CWMod+r\fP \(en lf (file browser/manager) \f(CWMod+r\fP \(en lf (file browser/manager)
.ITEM .ITEM
\f(CWMod+R\fP \(en htop (task manager, system monitor that R*dditors use to look cool)
.ITEM
\f(CWMod+e\fP \(en neomutt (email) \(en Must be first configured by running \f(CWmw add\fP. \f(CWMod+e\fP \(en neomutt (email) \(en Must be first configured by running \f(CWmw add\fP.
.ITEM .ITEM
\f(CWMod+E\fP \(en abook (contacts) \(en Must be first configured by running \f(CWmw add\fP.
.ITEM
\f(CWMod+m\fP \(en ncmpcpp (music player) \f(CWMod+m\fP \(en ncmpcpp (music player)
.ITEM .ITEM
\f(CWMod+w\fP \(en Web browser (Brave) \f(CWMod+w\fP \(en Web browser (Brave by default)
.ITEM
\f(CWMod+n\fP \(en newsboat (RSS feed reader)
.ITEM
\f(CWMod+a\fP \(en pulsemixer (audio system control)
.ITEM .ITEM
\f(CWMod+W\fP \(en nmtui (for connecting to wireless internet) \f(CWMod+W\fP \(en nmtui (for connecting to wireless internet)
.ITEM .ITEM
\f(CWMod+v\fP \(en vimwiki (for notes) \f(CWMod+n\fP \(en vimwiki (for notes)
.ITEM
\f(CWMod+N\fP \(en newsboat (RSS feed reader)
.ITEM
\f(CWMod+F4\fP \(en pulsemixer (audio system control)
.ITEM .ITEM
\f(CWMod+Shift+Enter\fP \(en Show/hide dropdown terminal \f(CWMod+Shift+Enter\fP \(en Show/hide dropdown terminal
.LIST OFF .LIST OFF
@ -164,13 +172,15 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
.ITEM .ITEM
\f(CWMod+BackSpace\fP \(enChoose to lock screen, logout, shutdown, reboot, etc. \f(CWMod+BackSpace\fP \(enChoose to lock screen, logout, shutdown, reboot, etc.
.ITEM .ITEM
\f(CWMod+V\fP \(en Toggle xcompmgr (to remove transparency and window effects) \f(CWMod+D\fP \(en Bring up root terminal
.ITEM .ITEM
\f(CWMod+F1\fP \(en Show this document \f(CWMod+F1\fP \(en Show this document
.ITEM .ITEM
\f(CWMod+F2\fP \(en Watch tutorial videos on a subject
.ITEM
\f(CWMod+F3\fP \(en Select screen/display to use \f(CWMod+F3\fP \(en Select screen/display to use
.ITEM .ITEM
\f(CWMod+F5\fP \(en Update dwm's colorscheme if you have changed Xresources \f(CWMod+F4\fP \(en pulsemixer (audio control)
.ITEM .ITEM
\f(CWMod+F6\fP \(en Transmission torrent client (not installed by default) \f(CWMod+F6\fP \(en Transmission torrent client (not installed by default)
.ITEM .ITEM
@ -182,6 +192,10 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
.ITEM .ITEM
\f(CWMod+F10\fP \(en Unmount a non-essential drive or Android \f(CWMod+F10\fP \(en Unmount a non-essential drive or Android
.ITEM .ITEM
\f(CWMod+F11\fP \(en View webcam
.ITEM
\f(CWMod+F12\fP \(en Update dwm's colorscheme if you have changed Xresources
.ITEM
\f(CWMod+`\fP \(en Select an emoji to copy to clipboard \f(CWMod+`\fP \(en Select an emoji to copy to clipboard
.ITEM .ITEM
\f(CWMod+Insert\fP \(en Show contents of clipboard/primary selection \f(CWMod+Insert\fP \(en Show contents of clipboard/primary selection
@ -201,7 +215,9 @@ I use ncmpcpp as a music player, which is a front end for mpd.
.ITEM .ITEM
\f(CWMod+>\fP \(en Toggle playlist looping \f(CWMod+>\fP \(en Toggle playlist looping
.ITEM .ITEM
\f(CWMod+p\fP \(en Pause \f(CWMod+p\fP \(en Toggle pause
.ITEM
\f(CWMod+p\fP \(en Force pause music player daemon and all mpv videos
.ITEM .ITEM
\f(CWMod+M\fP \(en Mute all audio \f(CWMod+M\fP \(en Mute all audio
.ITEM .ITEM
@ -213,7 +229,7 @@ I use ncmpcpp as a music player, which is a front end for mpd.
.ITEM .ITEM
\f(CWMod+]\fP \(en Forward 10 seconds (holding shift increases amount) \f(CWMod+]\fP \(en Forward 10 seconds (holding shift increases amount)
.ITEM .ITEM
\f(CWMod+a\fP \(en pulsemixer (general volume sink/source control) \f(CWMod+F4\fP \(en pulsemixer (general audio/volume sink/source control)
.LIST OFF .LIST OFF
.HEADING 2 "Tags/Workspaces" .HEADING 2 "Tags/Workspaces"
.PP .PP
@ -273,7 +289,7 @@ These settings may override your preferred settings, so you should open this fil
.HEADING 2 "My audio isn't working!" .HEADING 2 "My audio isn't working!"
.PP .PP
On fresh install, the Linux audio system often mutes outputs. On fresh install, the Linux audio system often mutes outputs.
You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWmod+a\fP). You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWMod+F4\fP).
.HEADING 2 "How do I copy and paste?" .HEADING 2 "How do I copy and paste?"
.PP .PP
Copying and pasting is always program-specific on any system. Copying and pasting is always program-specific on any system.