From 276ac4d4b77829b5142c9b905588574430451bc1 Mon Sep 17 00:00:00 2001 From: Yigit Colakoglu Date: Fri, 16 Apr 2021 15:13:53 +0300 Subject: [PATCH] Dots backup before switching to gentoo --- .../2-yigit@yigitcolakoglu.com.muttrc | 2 +- .config/vim/plugin/plugins.vim | 1 + .local/bin/mpd-notif | 2 +- .local/bin/password_manager | 22 +- .local/src/dwm/Makefile | 2 +- .local/src/dwm/config.def.h | 70 +++++ .local/src/dwm/config.h | 4 + .local/src/dwm/dwm.c | 163 +++++++++++- .local/src/dwm/dwmc | 40 +++ .local/src/dwm/keybinds.h | 4 +- .local/src/dwm/patches/dwm-dwmc-6.2.diff | 240 ++++++++++++++++++ .../patches/dwm-pertag-20200914-61bb8b2.diff | 177 +++++++++++++ .local/src/dwm/rules.h | 3 +- .local/src/sent/config.def.h | 9 + .local/src/sent/config.h | 9 + .local/src/sent/example | 69 +++++ .local/src/sent/nyan.png | Bin 0 -> 901 bytes .../patches/sent-invertedcolors-72d33d4.diff | 73 ++++++ .../sent-options-20190213-72d33d4.diff | 72 ++++++ .../sent/patches/sent-progress-bar-1.0.diff | 31 +++ .../sent-toggle-scm-20210119-2be4210.diff | 79 ++++++ .local/src/sent/sent | Bin 86872 -> 87440 bytes .local/src/sent/sent.1 | 17 ++ .local/src/sent/sent.c | 45 +++- 24 files changed, 1099 insertions(+), 35 deletions(-) create mode 100755 .local/src/dwm/dwmc create mode 100644 .local/src/dwm/patches/dwm-dwmc-6.2.diff create mode 100644 .local/src/dwm/patches/dwm-pertag-20200914-61bb8b2.diff create mode 100644 .local/src/sent/example create mode 100644 .local/src/sent/nyan.png create mode 100644 .local/src/sent/patches/sent-invertedcolors-72d33d4.diff create mode 100644 .local/src/sent/patches/sent-options-20190213-72d33d4.diff create mode 100644 .local/src/sent/patches/sent-progress-bar-1.0.diff create mode 100644 .local/src/sent/patches/sent-toggle-scm-20210119-2be4210.diff diff --git a/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc b/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc index 03e697d1..b40113e4 100644 --- a/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc +++ b/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc @@ -1,6 +1,6 @@ # vim: filetype=neomuttrc # muttrc file for account yigit@yigitcolakoglu.com -set realname = "yigit" +set realname = "Yigit Colakoglu" set from = "yigit@yigitcolakoglu.com" set sendmail = "msmtp -a yigit@yigitcolakoglu.com" alias me yigit diff --git a/.config/vim/plugin/plugins.vim b/.config/vim/plugin/plugins.vim index b37db88a..dfc00eee 100644 --- a/.config/vim/plugin/plugins.vim +++ b/.config/vim/plugin/plugins.vim @@ -25,6 +25,7 @@ Plug 'jlanzarotta/bufexplorer' Plug 'jeffkreeftmeijer/vim-numbertoggle' Plug 'rhysd/vim-grammarous' Plug 'chrisbra/NrrwRgn' +Plug 'robertbasic/vim-hugo-helper' "Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'sheerun/vim-polyglot' Plug 'M4R7iNP/vim-inky' diff --git a/.local/bin/mpd-notif b/.local/bin/mpd-notif index a847d918..34a7d4c7 100755 --- a/.local/bin/mpd-notif +++ b/.local/bin/mpd-notif @@ -3,4 +3,4 @@ title=$(mpc -f "%title%" 2> /dev/null | head -n 1 | xargs) artist=$(mpc -f "%artist%" 2> /dev/null | head -n 1 | xargs) -notify-send -r 120 -a " $artist" -t 1500 "~ $title ~ " +notify-send -a " $artist" -t 1500 "~ $title ~ " diff --git a/.local/bin/password_manager b/.local/bin/password_manager index cd27e23e..5b9631d0 100755 --- a/.local/bin/password_manager +++ b/.local/bin/password_manager @@ -2,7 +2,7 @@ shopt -s nullglob globstar -typeit=0 +typeit=1 if [[ $1 == "--type" ]]; then typeit=1 shift @@ -24,20 +24,16 @@ case "$action" in echo "$username" | xclip -selection clipboard notify-send -a " Password Manager" "Username copied to clipboard";; Password) - if [[ $typeit -eq 0 ]]; then - pass show -c "$entry" 2>/dev/null - else - pass show "$entry" | { IFS= read -r pass; printf %s "$pass"; } | - xdotool type --clearmodifiers --file - - fi + password=$(pass show "$entry") + echo "$password" | xclip -selection clipboard + echo "$password" | { IFS= read -r pass; printf %s "$pass"; } | + xdotool type --clearmodifiers --file - notify-send -a " Password Manager" "Password copied to clipboard";; TOTP) - if [[ $typeit -eq 0 ]]; then - pass otp -c "$entry" 2>/dev/null - else - pass otp "$entry" | { IFS= read -r pass; printf %s "$pass"; } | - xdotool type --clearmodifiers --file - - fi + otp=$(pass otp "$entry") + echo "$otp" | xclip -selection clipboard + echo "$otp" | { IFS= read -r pass; printf %s "$pass"; } | + xdotool type --clearmodifiers --file - notify-send -a " Password Manager" "TOTP copied to clipboard";; esac diff --git a/.local/src/dwm/Makefile b/.local/src/dwm/Makefile index 77bcbc02..f837f5cf 100644 --- a/.local/src/dwm/Makefile +++ b/.local/src/dwm/Makefile @@ -38,7 +38,7 @@ dist: clean install: all mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f dwm ${DESTDIR}${PREFIX}/bin + cp -f dwm dwmc ${DESTDIR}${PREFIX}/bin chmod 755 ${DESTDIR}${PREFIX}/bin/dwm mkdir -p ${DESTDIR}${MANPREFIX}/man1 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 diff --git a/.local/src/dwm/config.def.h b/.local/src/dwm/config.def.h index 358c35e8..13a3bfb3 100644 --- a/.local/src/dwm/config.def.h +++ b/.local/src/dwm/config.def.h @@ -231,3 +231,73 @@ static Button buttons[] = { { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; +void +setlayoutex(const Arg *arg) +{ + setlayout(&((Arg) { .v = &layouts[arg->i] })); +} + +void +viewex(const Arg *arg) +{ + view(&((Arg) { .ui = 1 << arg->ui })); +} + +void +viewall(const Arg *arg) +{ + view(&((Arg){.ui = ~0})); +} + +void +toggleviewex(const Arg *arg) +{ + toggleview(&((Arg) { .ui = 1 << arg->ui })); +} + +void +tagex(const Arg *arg) +{ + tag(&((Arg) { .ui = 1 << arg->ui })); +} + +void +toggletagex(const Arg *arg) +{ + toggletag(&((Arg) { .ui = 1 << arg->ui })); +} + +void +tagall(const Arg *arg) +{ + tag(&((Arg){.ui = ~0})); +} + +/* signal definitions */ +/* signum must be greater than 0 */ +/* trigger signals using `xsetroot -name "fsignal: [ ]"` */ +static Signal signals[] = { + /* signum function */ + { "focusstack", focusstack }, + { "setmfact", setmfact }, + { "togglebar", togglebar }, + { "incnmaster", incnmaster }, + { "togglefloating", togglefloating }, + { "focusmon", focusmon }, + { "tagmon", tagmon }, + { "zoom", zoom }, + { "view", view }, + { "viewall", viewall }, + { "viewex", viewex }, + { "toggleview", view }, + { "toggleviewex", toggleviewex }, + { "tag", tag }, + { "tagall", tagall }, + { "tagex", tagex }, + { "toggletag", tag }, + { "toggletagex", toggletagex }, + { "killclient", killclient }, + { "quit", quit }, + { "setlayout", setlayout }, + { "setlayoutex", setlayoutex }, +}; diff --git a/.local/src/dwm/config.h b/.local/src/dwm/config.h index ba55c36e..c728f95b 100644 --- a/.local/src/dwm/config.h +++ b/.local/src/dwm/config.h @@ -76,3 +76,7 @@ static Button buttons[] = { { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; +static Signal signals[] = { + /* signum function */ + { "focusstack", focusstack }, +}; diff --git a/.local/src/dwm/dwm.c b/.local/src/dwm/dwm.c index 7669bfee..25bf3cd1 100644 --- a/.local/src/dwm/dwm.c +++ b/.local/src/dwm/dwm.c @@ -118,11 +118,17 @@ typedef struct { const Arg arg; } Key; +typedef struct { + const char * sig; + void (*func)(const Arg *); +} Signal; + typedef struct { const char *symbol; void (*arrange)(Monitor *); } Layout; +typedef struct Pertag Pertag; struct Monitor { char ltsymbol[16]; float mfact; @@ -147,6 +153,7 @@ struct Monitor { Monitor *next; Window barwin; const Layout *lt[2]; + Pertag *pertag; }; typedef struct { @@ -169,6 +176,7 @@ static void arrangemon(Monitor *m); static void attach(Client *c); static void attachaside(Client *c); static void attachstack(Client *c); +static int fake_signal(void); static void buttonpress(XEvent *e); static void checkotherwm(void); static void cleanup(void); @@ -326,6 +334,15 @@ static xcb_connection_t *xcon; #include "keybinds.h" #include "rules.h" +struct Pertag { + unsigned int curtag, prevtag; /* current and previous tag */ + int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */ + float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */ + unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */ + const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */ + int showbars[LENGTH(tags) + 1]; /* display bar for the current tag */ +}; + /* compile-time check if all tags fit into an unsigned int bit array. */ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; @@ -555,15 +572,16 @@ buttonpress(XEvent *e) unsigned int xc; int padding = - sp * 3; /* I don't know why 3 works better than two, but it does */ Arg arg = {0}; - Client *c; + Client *c, *sel; Monitor *m; XButtonPressedEvent *ev = &e->xbutton; click = ClkRootWin; /* focus monitor if necessary */ if ((m = wintomon(ev->window)) && m != selmon) { - unfocus(selmon->sel, 1); + sel = selmon->sel; selmon = m; + unfocus(sel, 1); focus(NULL); } if (ev->window == selmon->barwin) { @@ -842,6 +860,7 @@ Monitor * createmon(void) { Monitor *m; + unsigned int i; m = ecalloc(1, sizeof(Monitor)); m->tagset[0] = m->tagset[1] = 1; @@ -856,6 +875,20 @@ createmon(void) m->lt[0] = &layouts[0]; m->lt[1] = &layouts[1 % LENGTH(layouts)]; strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); + m->pertag = ecalloc(1, sizeof(Pertag)); + m->pertag->curtag = m->pertag->prevtag = 1; + + for (i = 0; i <= LENGTH(tags); i++) { + m->pertag->nmasters[i] = m->nmaster; + m->pertag->mfacts[i] = m->mfact; + + m->pertag->ltidxs[i][0] = m->lt[0]; + m->pertag->ltidxs[i][1] = m->lt[1]; + m->pertag->sellts[i] = m->sellt; + + m->pertag->showbars[i] = m->showbar; + } + return m; } @@ -1164,7 +1197,7 @@ floatpos(const Arg *arg) void enternotify(XEvent *e) { - Client *c; + Client *c, *sel; Monitor *m; XCrossingEvent *ev = &e->xcrossing; @@ -1173,8 +1206,9 @@ enternotify(XEvent *e) c = wintoclient(ev->window); m = c ? c->mon : wintomon(ev->window); if (m != selmon) { - unfocus(selmon->sel, 1); + sel = selmon->sel; selmon = m; + unfocus(sel, 1); } else if (!c || c == selmon->sel) return; focus(c); @@ -1229,13 +1263,15 @@ void focusmon(const Arg *arg) { Monitor *m; + Client *sel; if (!mons->next) return; if ((m = dirtomon(arg->i)) == selmon) return; - unfocus(selmon->sel, 0); + sel = selmon->sel; selmon = m; + unfocus(sel, 0); focus(NULL); } @@ -1504,7 +1540,7 @@ grabkeys(void) void incnmaster(const Arg *arg) { - selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); + selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0); arrange(selmon); } @@ -1536,6 +1572,49 @@ keypress(XEvent *e) keys[i].func(&(keys[i].arg)); } +int +fake_signal(void) +{ + char fsignal[256]; + char indicator[9] = "fsignal:"; + char str_sig[50]; + char param[16]; + int i, len_str_sig, n, paramn; + size_t len_fsignal, len_indicator = strlen(indicator); + Arg arg; + + // Get root name property + if (gettextprop(root, XA_WM_NAME, fsignal, sizeof(fsignal))) { + len_fsignal = strlen(fsignal); + + // Check if this is indeed a fake signal + if (len_indicator > len_fsignal ? 0 : strncmp(indicator, fsignal, len_indicator) == 0) { + paramn = sscanf(fsignal+len_indicator, "%s%n%s%n", str_sig, &len_str_sig, param, &n); + + if (paramn == 1) arg = (Arg) {0}; + else if (paramn > 2) return 1; + else if (strncmp(param, "i", n - len_str_sig) == 0) + sscanf(fsignal + len_indicator + n, "%i", &(arg.i)); + else if (strncmp(param, "ui", n - len_str_sig) == 0) + sscanf(fsignal + len_indicator + n, "%u", &(arg.ui)); + else if (strncmp(param, "f", n - len_str_sig) == 0) + sscanf(fsignal + len_indicator + n, "%f", &(arg.f)); + else return 1; + + // Check if a signal was found, and if so handle it + for (i = 0; i < LENGTH(signals); i++) + if (strncmp(str_sig, signals[i].sig, len_str_sig) == 0 && signals[i].func) + signals[i].func(&(arg)); + + // A fake signal was sent + return 1; + } + } + + // No fake signal was sent, so proceed with update + return 0; +} + void killclient(const Arg *arg) { @@ -1666,13 +1745,15 @@ motionnotify(XEvent *e) { static Monitor *mon = NULL; Monitor *m; + Client *sel; XMotionEvent *ev = &e->xmotion; if (ev->window != root) return; if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) { - unfocus(selmon->sel, 1); + sel = selmon->sel; selmon = m; + unfocus(sel, 1); focus(NULL); } mon = m; @@ -1771,8 +1852,10 @@ propertynotify(XEvent *e) Window trans; XPropertyEvent *ev = &e->xproperty; - if ((ev->window == root) && (ev->atom == XA_WM_NAME)) - updatestatus(); + if ((ev->window == root) && (ev->atom == XA_WM_NAME)) { + if (!fake_signal()) + updatestatus(); + } else if (ev->state == PropertyDelete) return; /* ignore */ else if ((c = wintoclient(ev->window))) { @@ -2101,9 +2184,9 @@ void setlayout(const Arg *arg) { if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) - selmon->sellt ^= 1; + selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag] ^= 1; if (arg && arg->v) - selmon->lt[selmon->sellt] = (Layout *)arg->v; + selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v; strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); if (selmon->sel) arrange(selmon); @@ -2122,7 +2205,7 @@ setmfact(const Arg *arg) f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; if (f < 0.05 || f > 0.95) return; - selmon->mfact = f; + selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f; arrange(selmon); } @@ -2319,7 +2402,7 @@ tagmon(const Arg *arg) void togglebar(const Arg *arg) { - selmon->showbar = !selmon->showbar; + selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar; updatebarpos(selmon); XMoveResizeWindow(dpy, selmon->barwin, selmon->wx + sp, selmon->by + vp, selmon->ww - 2 * sp, bh); arrange(selmon); @@ -2384,9 +2467,33 @@ void toggleview(const Arg *arg) { unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); + int i; if (newtagset) { selmon->tagset[selmon->seltags] = newtagset; + + if (newtagset == ~0) { + selmon->pertag->prevtag = selmon->pertag->curtag; + selmon->pertag->curtag = 0; + } + + /* test if the user did not select the same tag */ + if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) { + selmon->pertag->prevtag = selmon->pertag->curtag; + for (i = 0; !(newtagset & 1 << i); i++) ; + selmon->pertag->curtag = i + 1; + } + + /* apply settings for this view */ + selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; + selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; + selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; + selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; + selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; + + if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) + togglebar(NULL); + focus(NULL); arrange(selmon); } @@ -2397,6 +2504,8 @@ unfocus(Client *c, int setfocus) { if (!c) return; + if (c->isfullscreen && ISVISIBLE(c) && c->mon == selmon) + setfullscreen(c, 0); grabbuttons(c, 0); XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel); if (setfocus) { @@ -2700,11 +2809,37 @@ updatewmhints(Client *c) void view(const Arg *arg) { + int i; + unsigned int tmptag; + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) return; selmon->seltags ^= 1; /* toggle sel tagset */ - if (arg->ui & TAGMASK) + if (arg->ui & TAGMASK) { selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; + selmon->pertag->prevtag = selmon->pertag->curtag; + + if (arg->ui == ~0) + selmon->pertag->curtag = 0; + else { + for (i = 0; !(arg->ui & 1 << i); i++) ; + selmon->pertag->curtag = i + 1; + } + } else { + tmptag = selmon->pertag->prevtag; + selmon->pertag->prevtag = selmon->pertag->curtag; + selmon->pertag->curtag = tmptag; + } + + selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; + selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; + selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; + selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; + selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; + + if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) + togglebar(NULL); + focus(NULL); arrange(selmon); } diff --git a/.local/src/dwm/dwmc b/.local/src/dwm/dwmc new file mode 100755 index 00000000..5ff8dbc4 --- /dev/null +++ b/.local/src/dwm/dwmc @@ -0,0 +1,40 @@ +#!/usr/bin/env sh + +signal() { + xsetroot -name "fsignal:$*" +} + +case $# in +1) + case $1 in + setlayout | view | viewall | togglebar | togglefloating | zoom | killclient | quit) + signal $1 + ;; + *) + echo "Unknown command or missing one argument." + exit 1 + ;; + esac + ;; +2) + case $1 in + view) + signal $1 ui $2 + ;; + viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon) + signal $1 i $2 + ;; + setmfact) + signal $1 f $2 + ;; + *) + echo "Unknown command or one too many arguments." + exit 1 + ;; + esac + ;; +*) + echo "Too many arguments." + exit 1 + ;; +esac diff --git a/.local/src/dwm/keybinds.h b/.local/src/dwm/keybinds.h index 6c6da1ea..ba486988 100644 --- a/.local/src/dwm/keybinds.h +++ b/.local/src/dwm/keybinds.h @@ -37,8 +37,8 @@ static const char *outmenu[] = {"/home/yigit/.local/bin/dmenu-logout", NULL}; static const char *refresh[] = {"/home/yigit/.local/bin/dmenu-refresh", NULL}; static const char *keyboard[] = {"/home/yigit/.local/bin/kbmap_toggle", NULL}; -static const char *screenshot[] = { "scrot", "/tmp/%Y-%m-%d-%s_$wx$h.png", "-e","xclip -selection clipboard -target image/png -i $f; cp $f ~/Pictures/Screenshots;notify-send \"SNAP\" \"$f\"", NULL }; -static const char *windowshot[] = { "scrot", "-u", "/tmp/%Y-%m-%d-%s_$wx$h.png", "-e","xclip -selection clipboard -target image/png -i $f; cp $f ~/Pictures/Screenshots;notify-send \"SNAP\" \"$f\"", NULL }; +static const char *screenshot[] = { "scrot", "/tmp/%Y-%m-%d-%s_$wx$h.png", "-e","xclip -selection clipboard -target image/png -i $f; cp $f ~/Pictures/Screenshots;notify-send -a \"SNAP\" \"$f\"", NULL }; +static const char *windowshot[] = { "scrot", "-u", "/tmp/%Y-%m-%d-%s_$wx$h.png", "-e","xclip -selection clipboard -target image/png -i $f; cp $f ~/Pictures/Screenshots;notify-send -a \"SNAP\" \"$f\"", NULL }; static const char *simcrop[] = {"simcrop","-fc","-sc", "-g", "900x500",NULL}; static const char *notification[] = {"/home/yigit/.local/bin/dunst_toggle.sh", "-t",NULL}; diff --git a/.local/src/dwm/patches/dwm-dwmc-6.2.diff b/.local/src/dwm/patches/dwm-dwmc-6.2.diff new file mode 100644 index 00000000..bf606d59 --- /dev/null +++ b/.local/src/dwm/patches/dwm-dwmc-6.2.diff @@ -0,0 +1,240 @@ +From d94cb6f1a553d19127f44dbdc96e8bb5041956c2 Mon Sep 17 00:00:00 2001 +From: Nihal Jere +Date: Sat, 21 Mar 2020 15:16:49 -0500 +Subject: [PATCH] dwm-client + +--- + Makefile | 2 +- + config.def.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + dwm.c | 55 +++++++++++++++++++++++++++++++++++++++-- + dwmc | 40 ++++++++++++++++++++++++++++++ + 4 files changed, 164 insertions(+), 3 deletions(-) + create mode 100755 dwmc + +diff --git a/Makefile b/Makefile +index 77bcbc0..f837f5c 100644 +--- a/Makefile ++++ b/Makefile +@@ -38,7 +38,7 @@ dist: clean + + install: all + mkdir -p ${DESTDIR}${PREFIX}/bin +- cp -f dwm ${DESTDIR}${PREFIX}/bin ++ cp -f dwm dwmc ${DESTDIR}${PREFIX}/bin + chmod 755 ${DESTDIR}${PREFIX}/bin/dwm + mkdir -p ${DESTDIR}${MANPREFIX}/man1 + sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 +diff --git a/config.def.h b/config.def.h +index 1c0b587..efbae79 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -113,3 +113,73 @@ static Button buttons[] = { + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, + }; + ++void ++setlayoutex(const Arg *arg) ++{ ++ setlayout(&((Arg) { .v = &layouts[arg->i] })); ++} ++ ++void ++viewex(const Arg *arg) ++{ ++ view(&((Arg) { .ui = 1 << arg->ui })); ++} ++ ++void ++viewall(const Arg *arg) ++{ ++ view(&((Arg){.ui = ~0})); ++} ++ ++void ++toggleviewex(const Arg *arg) ++{ ++ toggleview(&((Arg) { .ui = 1 << arg->ui })); ++} ++ ++void ++tagex(const Arg *arg) ++{ ++ tag(&((Arg) { .ui = 1 << arg->ui })); ++} ++ ++void ++toggletagex(const Arg *arg) ++{ ++ toggletag(&((Arg) { .ui = 1 << arg->ui })); ++} ++ ++void ++tagall(const Arg *arg) ++{ ++ tag(&((Arg){.ui = ~0})); ++} ++ ++/* signal definitions */ ++/* signum must be greater than 0 */ ++/* trigger signals using `xsetroot -name "fsignal: [ ]"` */ ++static Signal signals[] = { ++ /* signum function */ ++ { "focusstack", focusstack }, ++ { "setmfact", setmfact }, ++ { "togglebar", togglebar }, ++ { "incnmaster", incnmaster }, ++ { "togglefloating", togglefloating }, ++ { "focusmon", focusmon }, ++ { "tagmon", tagmon }, ++ { "zoom", zoom }, ++ { "view", view }, ++ { "viewall", viewall }, ++ { "viewex", viewex }, ++ { "toggleview", view }, ++ { "toggleviewex", toggleviewex }, ++ { "tag", tag }, ++ { "tagall", tagall }, ++ { "tagex", tagex }, ++ { "toggletag", tag }, ++ { "toggletagex", toggletagex }, ++ { "killclient", killclient }, ++ { "quit", quit }, ++ { "setlayout", setlayout }, ++ { "setlayoutex", setlayoutex }, ++}; +diff --git a/dwm.c b/dwm.c +index 4465af1..aa53706 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -106,6 +106,11 @@ typedef struct { + const Arg arg; + } Key; + ++typedef struct { ++ const char * sig; ++ void (*func)(const Arg *); ++} Signal; ++ + typedef struct { + const char *symbol; + void (*arrange)(Monitor *); +@@ -148,6 +153,7 @@ static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); + static void attachstack(Client *c); ++static int fake_signal(void); + static void buttonpress(XEvent *e); + static void checkotherwm(void); + static void cleanup(void); +@@ -998,6 +1004,49 @@ keypress(XEvent *e) + keys[i].func(&(keys[i].arg)); + } + ++int ++fake_signal(void) ++{ ++ char fsignal[256]; ++ char indicator[9] = "fsignal:"; ++ char str_sig[50]; ++ char param[16]; ++ int i, len_str_sig, n, paramn; ++ size_t len_fsignal, len_indicator = strlen(indicator); ++ Arg arg; ++ ++ // Get root name property ++ if (gettextprop(root, XA_WM_NAME, fsignal, sizeof(fsignal))) { ++ len_fsignal = strlen(fsignal); ++ ++ // Check if this is indeed a fake signal ++ if (len_indicator > len_fsignal ? 0 : strncmp(indicator, fsignal, len_indicator) == 0) { ++ paramn = sscanf(fsignal+len_indicator, "%s%n%s%n", str_sig, &len_str_sig, param, &n); ++ ++ if (paramn == 1) arg = (Arg) {0}; ++ else if (paramn > 2) return 1; ++ else if (strncmp(param, "i", n - len_str_sig) == 0) ++ sscanf(fsignal + len_indicator + n, "%i", &(arg.i)); ++ else if (strncmp(param, "ui", n - len_str_sig) == 0) ++ sscanf(fsignal + len_indicator + n, "%u", &(arg.ui)); ++ else if (strncmp(param, "f", n - len_str_sig) == 0) ++ sscanf(fsignal + len_indicator + n, "%f", &(arg.f)); ++ else return 1; ++ ++ // Check if a signal was found, and if so handle it ++ for (i = 0; i < LENGTH(signals); i++) ++ if (strncmp(str_sig, signals[i].sig, len_str_sig) == 0 && signals[i].func) ++ signals[i].func(&(arg)); ++ ++ // A fake signal was sent ++ return 1; ++ } ++ } ++ ++ // No fake signal was sent, so proceed with update ++ return 0; ++} ++ + void + killclient(const Arg *arg) + { +@@ -1215,8 +1264,10 @@ propertynotify(XEvent *e) + Window trans; + XPropertyEvent *ev = &e->xproperty; + +- if ((ev->window == root) && (ev->atom == XA_WM_NAME)) +- updatestatus(); ++ if ((ev->window == root) && (ev->atom == XA_WM_NAME)) { ++ if (!fake_signal()) ++ updatestatus(); ++ } + else if (ev->state == PropertyDelete) + return; /* ignore */ + else if ((c = wintoclient(ev->window))) { +diff --git a/dwmc b/dwmc +new file mode 100755 +index 0000000..5ff8dbc +--- /dev/null ++++ b/dwmc +@@ -0,0 +1,40 @@ ++#!/usr/bin/env sh ++ ++signal() { ++ xsetroot -name "fsignal:$*" ++} ++ ++case $# in ++1) ++ case $1 in ++ setlayout | view | viewall | togglebar | togglefloating | zoom | killclient | quit) ++ signal $1 ++ ;; ++ *) ++ echo "Unknown command or missing one argument." ++ exit 1 ++ ;; ++ esac ++ ;; ++2) ++ case $1 in ++ view) ++ signal $1 ui $2 ++ ;; ++ viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon) ++ signal $1 i $2 ++ ;; ++ setmfact) ++ signal $1 f $2 ++ ;; ++ *) ++ echo "Unknown command or one too many arguments." ++ exit 1 ++ ;; ++ esac ++ ;; ++*) ++ echo "Too many arguments." ++ exit 1 ++ ;; ++esac +-- +2.25.1 + diff --git a/.local/src/dwm/patches/dwm-pertag-20200914-61bb8b2.diff b/.local/src/dwm/patches/dwm-pertag-20200914-61bb8b2.diff new file mode 100644 index 00000000..c8d7fbcb --- /dev/null +++ b/.local/src/dwm/patches/dwm-pertag-20200914-61bb8b2.diff @@ -0,0 +1,177 @@ +diff --git a/dwm.c b/dwm.c +index 664c527..ac8e4ec 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -111,6 +111,7 @@ typedef struct { + void (*arrange)(Monitor *); + } Layout; + ++typedef struct Pertag Pertag; + struct Monitor { + char ltsymbol[16]; + float mfact; +@@ -130,6 +131,7 @@ struct Monitor { + Monitor *next; + Window barwin; + const Layout *lt[2]; ++ Pertag *pertag; + }; + + typedef struct { +@@ -272,6 +274,15 @@ static Window root, wmcheckwin; + /* configuration, allows nested code to access above variables */ + #include "config.h" + ++struct Pertag { ++ unsigned int curtag, prevtag; /* current and previous tag */ ++ int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */ ++ float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */ ++ unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */ ++ const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */ ++ int showbars[LENGTH(tags) + 1]; /* display bar for the current tag */ ++}; ++ + /* compile-time check if all tags fit into an unsigned int bit array. */ + struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; + +@@ -632,6 +643,7 @@ Monitor * + createmon(void) + { + Monitor *m; ++ unsigned int i; + + m = ecalloc(1, sizeof(Monitor)); + m->tagset[0] = m->tagset[1] = 1; +@@ -642,6 +654,20 @@ createmon(void) + m->lt[0] = &layouts[0]; + m->lt[1] = &layouts[1 % LENGTH(layouts)]; + strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); ++ m->pertag = ecalloc(1, sizeof(Pertag)); ++ m->pertag->curtag = m->pertag->prevtag = 1; ++ ++ for (i = 0; i <= LENGTH(tags); i++) { ++ m->pertag->nmasters[i] = m->nmaster; ++ m->pertag->mfacts[i] = m->mfact; ++ ++ m->pertag->ltidxs[i][0] = m->lt[0]; ++ m->pertag->ltidxs[i][1] = m->lt[1]; ++ m->pertag->sellts[i] = m->sellt; ++ ++ m->pertag->showbars[i] = m->showbar; ++ } ++ + return m; + } + +@@ -967,7 +993,7 @@ grabkeys(void) + void + incnmaster(const Arg *arg) + { +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0); + arrange(selmon); + } + +@@ -1502,9 +1528,9 @@ void + setlayout(const Arg *arg) + { + if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) +- selmon->sellt ^= 1; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag] ^= 1; + if (arg && arg->v) +- selmon->lt[selmon->sellt] = (Layout *)arg->v; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v; + strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); + if (selmon->sel) + arrange(selmon); +@@ -1523,7 +1549,7 @@ setmfact(const Arg *arg) + f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; + if (f < 0.05 || f > 0.95) + return; +- selmon->mfact = f; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f; + arrange(selmon); + } + +@@ -1702,7 +1728,7 @@ tile(Monitor *m) + void + togglebar(const Arg *arg) + { +- selmon->showbar = !selmon->showbar; ++ selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar; + updatebarpos(selmon); + XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); + arrange(selmon); +@@ -1741,9 +1767,33 @@ void + toggleview(const Arg *arg) + { + unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); ++ int i; + + if (newtagset) { + selmon->tagset[selmon->seltags] = newtagset; ++ ++ if (newtagset == ~0) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ selmon->pertag->curtag = 0; ++ } ++ ++ /* test if the user did not select the same tag */ ++ if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ for (i = 0; !(newtagset & 1 << i); i++) ; ++ selmon->pertag->curtag = i + 1; ++ } ++ ++ /* apply settings for this view */ ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; ++ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; ++ ++ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) ++ togglebar(NULL); ++ + focus(NULL); + arrange(selmon); + } +@@ -2038,11 +2088,37 @@ updatewmhints(Client *c) + void + view(const Arg *arg) + { ++ int i; ++ unsigned int tmptag; ++ + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + return; + selmon->seltags ^= 1; /* toggle sel tagset */ +- if (arg->ui & TAGMASK) ++ if (arg->ui & TAGMASK) { + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ ++ if (arg->ui == ~0) ++ selmon->pertag->curtag = 0; ++ else { ++ for (i = 0; !(arg->ui & 1 << i); i++) ; ++ selmon->pertag->curtag = i + 1; ++ } ++ } else { ++ tmptag = selmon->pertag->prevtag; ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ selmon->pertag->curtag = tmptag; ++ } ++ ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; ++ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; ++ ++ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) ++ togglebar(NULL); ++ + focus(NULL); + arrange(selmon); + } diff --git a/.local/src/dwm/rules.h b/.local/src/dwm/rules.h index 971e2ccd..e7a11d8a 100644 --- a/.local/src/dwm/rules.h +++ b/.local/src/dwm/rules.h @@ -17,7 +17,7 @@ */ static const Rule rules[] = { - /* class instance title tags mask isfloating floatpos isterminal noswallow monitor */ + /* class instance title tags mask isfloating floatpos isterminal noswallow monitor */ { "discord" , NULL , NULL , 1 << 8 , NULL , NULL , 0 , 0 , -1 }, { "Brave-browser" , NULL , NULL , 1 << 1 , NULL , NULL , 0 , 0 , -1 }, { "firefox" , NULL , NULL , 1 << 1 , NULL , NULL , 0 , 0 , -1 }, @@ -37,6 +37,7 @@ static const Rule rules[] = { { "weather" , NULL , NULL , 0 , 1 , "50% 50% 1200W 800H" , 0 , 0 , -1 }, { "center" , NULL , NULL , 0 , 1 , "50% 50% 1000W 600H" , 0 , 0 , -1 }, { "htop" , NULL , NULL , 0 , 1 , "50% 50% 1200W 600H" , 0 , 0 , -1 }, +{ "Zathura" , NULL , NULL , 0 , 0 , NULL , 0 , 1 , -1 }, { "spfeh" , NULL , NULL , SPTAG(1) , 1 , NULL , 0 , 0 , -1 }, { NULL , "spterm" , NULL , SPTAG(0) , 1 , NULL , 0 , 0 , -1 }, { NULL , "spmutt" , NULL , SPTAG(2) , 1 , NULL , 0 , 0 , -1 }, diff --git a/.local/src/sent/config.def.h b/.local/src/sent/config.def.h index 60eb376d..c8a66ddf 100644 --- a/.local/src/sent/config.def.h +++ b/.local/src/sent/config.def.h @@ -13,12 +13,20 @@ static const char *colors[] = { "#FFFFFF", /* background color */ }; +static const char *inverted_colors[] = { + "#FFFFFF", /* foreground color */ + "#000000", /* background color */ +}; + static const float linespacing = 1.4; /* how much screen estate is to be used at max for the content */ static const float usablewidth = 0.75; static const float usableheight = 0.75; +/* height of the presentation progress bar */ +static const int progressheight = 5; + static Mousekey mshortcuts[] = { /* button function argument */ { Button1, advance, {.i = +1} }, @@ -47,6 +55,7 @@ static Shortcut shortcuts[] = { { XK_n, advance, {.i = +1} }, { XK_p, advance, {.i = -1} }, { XK_r, reload, {0} }, + { XK_i, togglescm, {0} }, }; static Filter filters[] = { diff --git a/.local/src/sent/config.h b/.local/src/sent/config.h index 39bd98ee..c8a66ddf 100644 --- a/.local/src/sent/config.h +++ b/.local/src/sent/config.h @@ -9,6 +9,11 @@ static char *fontfallbacks[] = { #define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */ static const char *colors[] = { + "#000000", /* foreground color */ + "#FFFFFF", /* background color */ +}; + +static const char *inverted_colors[] = { "#FFFFFF", /* foreground color */ "#000000", /* background color */ }; @@ -19,6 +24,9 @@ static const float linespacing = 1.4; static const float usablewidth = 0.75; static const float usableheight = 0.75; +/* height of the presentation progress bar */ +static const int progressheight = 5; + static Mousekey mshortcuts[] = { /* button function argument */ { Button1, advance, {.i = +1} }, @@ -47,6 +55,7 @@ static Shortcut shortcuts[] = { { XK_n, advance, {.i = +1} }, { XK_p, advance, {.i = -1} }, { XK_r, reload, {0} }, + { XK_i, togglescm, {0} }, }; static Filter filters[] = { diff --git a/.local/src/sent/example b/.local/src/sent/example new file mode 100644 index 00000000..300577a4 --- /dev/null +++ b/.local/src/sent/example @@ -0,0 +1,69 @@ +sent + +Origin: + Takahashi + +Why? +• PPTX sucks +• LATEX sucks +• PDF sucks + +also: +terminal presentations +don't support images… + +@nyan.png +this text will not be displayed, since the @ at the start of the first line +makes this paragraph an image slide. + +easy to use + +depends on +♽ Xlib +☢ Xft +☃ farbfeld + +~1000 lines of code + +usage: +$ sent FILE1 [FILE2 …] + +▸ one slide per paragraph +▸ lines starting with # are ignored +▸ image slide: paragraph containing @FILENAME +▸ empty slide: just use a \ as a paragraph + +# This is a comment and will not be part of the presentation + +# multiple empty lines between paragraphs are also ignored + + +# The following lines should produce +# one empty slide + + + +\ +\ + +\@this_line_actually_started_with_a_\.png +\#This line as well +⇒ Prepend a backslash to kill behaviour of special characters + +Images are handled in the +http://tools.suckless.org/farbfeld/ +format internally. + +sent also supports transparent images. +Try changing the background in config.h +and rebuild. + +@transparent_test.ff + +😀😁😂😃😄😅😆😇😈😉😊😋😌😍😎😏 +😐😑😒😓😔😕😖😗😘😙😚😛😜😝😞😟 +😠😡😢😣😥😦😧😨😩😪😫😭😮😯😰😱 +😲😳😴😵😶😷😸😹😺😻😼😽😾😿🙀☠ + +thanks. +questions? diff --git a/.local/src/sent/nyan.png b/.local/src/sent/nyan.png new file mode 100644 index 0000000000000000000000000000000000000000..377b9d0843dac6e6ef1318612973a780a79f01a8 GIT binary patch literal 901 zcmeAS@N?(olHy`uVBq!ia0y~yV7vyzvMkI%5ohUWIUvQ7?&#~tz_78O`%fY(kgt&J z5#-CjP^HGe(9pub@Czu^@PdJ%)PRBERRRNp)eHs(@q#(K0&Rd2q5(c3uK)l42QvSk znfZU_|Nq7_f#Cnlnaj4cJ^+d`CV9KNFm$lWdH^|``EG8-K$;(jB^fr=2e~tO*8aRmFqGvw) z!{6oc+F=6y)nQ2BT3YtszWREf)c(WmiT07m;C-@fsAE{?R2cYrbxm^A=2DMonRXo4 zc%$-lxBPp~fY1b=3O*Q~g@ES|YnwH~RRBYrnIm=@*W%M3M1aT zF*3F?G_f)=&^9o#GB7x|&hZtBhTQy=%(O~04F;B0h87SFW{;mN0%~CJboFyt=akR{ E0CNm&1ONa4 literal 0 HcmV?d00001 diff --git a/.local/src/sent/patches/sent-invertedcolors-72d33d4.diff b/.local/src/sent/patches/sent-invertedcolors-72d33d4.diff new file mode 100644 index 00000000..2da5fc5f --- /dev/null +++ b/.local/src/sent/patches/sent-invertedcolors-72d33d4.diff @@ -0,0 +1,73 @@ +diff --git a/config.def.h b/config.def.h +index 60eb376..ccea9a6 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -13,6 +13,11 @@ static const char *colors[] = { + "#FFFFFF", /* background color */ + }; + ++static const char *inverted_colors[] = { ++ "#FFFFFF", /* foreground color */ ++ "#000000", /* background color */ ++}; ++ + static const float linespacing = 1.4; + + /* how much screen estate is to be used at max for the content */ +diff --git a/sent.1 b/sent.1 +index fabc614..f74d583 100644 +--- a/sent.1 ++++ b/sent.1 +@@ -6,6 +6,7 @@ + .Sh SYNOPSIS + .Nm + .Op Fl v ++.Op Fl i + .Op Ar file + .Sh DESCRIPTION + .Nm +@@ -21,6 +22,8 @@ few minutes. + .Bl -tag -width Ds + .It Fl v + Print version information to stdout and exit. ++.It Fl i ++Use the colors from the inverted color array. + .El + .Sh USAGE + .Bl -tag -width Ds +diff --git a/sent.c b/sent.c +index c50a572..c31f772 100644 +--- a/sent.c ++++ b/sent.c +@@ -25,6 +25,8 @@ + + char *argv0; + ++int use_inverted_colors = 0; ++ + /* macros */ + #define LEN(a) (sizeof(a) / sizeof(a)[0]) + #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) +@@ -586,7 +588,11 @@ xinit() + + if (!(d = drw_create(xw.dpy, xw.scr, xw.win, xw.w, xw.h))) + die("sent: Unable to create drawing context"); +- sc = drw_scm_create(d, colors, 2); ++ if (use_inverted_colors) { ++ sc = drw_scm_create(d, inverted_colors, 2); ++ } else { ++ sc = drw_scm_create(d, colors, 2); ++ } + drw_setscheme(d, sc); + XSetWindowBackground(xw.dpy, xw.win, sc[ColBg].pixel); + +@@ -687,6 +693,9 @@ main(int argc, char *argv[]) + case 'v': + fprintf(stderr, "sent-"VERSION"\n"); + return 0; ++ case 'i': ++ use_inverted_colors = 1; ++ break; + default: + usage(); + } ARGEND diff --git a/.local/src/sent/patches/sent-options-20190213-72d33d4.diff b/.local/src/sent/patches/sent-options-20190213-72d33d4.diff new file mode 100644 index 00000000..d13df48e --- /dev/null +++ b/.local/src/sent/patches/sent-options-20190213-72d33d4.diff @@ -0,0 +1,72 @@ +From 3a348cc15a97df8e8784b129800293dcfba28f3f Mon Sep 17 00:00:00 2001 +From: Sunur Efe Vural +Date: Wed, 13 Feb 2019 14:28:17 -0500 +Subject: [PATCH] Commandline Options + +A simple patch that adds extra commandline options to sent. +--- + sent.1 | 11 +++++++++++ + sent.c | 11 ++++++++++- + 2 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/sent.1 b/sent.1 +index fabc614..5d55bf4 100644 +--- a/sent.1 ++++ b/sent.1 +@@ -5,6 +5,9 @@ + .Nd simple plaintext presentation tool + .Sh SYNOPSIS + .Nm ++.Op Fl f Ar font ++.Op Fl c Ar fgcolor ++.Op Fl b Ar bgcolor + .Op Fl v + .Op Ar file + .Sh DESCRIPTION +@@ -21,6 +24,14 @@ few minutes. + .Bl -tag -width Ds + .It Fl v + Print version information to stdout and exit. ++.It Fl f Ar font ++Defines the ++.Ar font ++when sent is run. ++.It Fl c Ar fgcolor ++Defines the foreground color when sent is run. ++.It Fl b Ar bgcolor ++Defines the background color when sent is run. + .El + .Sh USAGE + .Bl -tag -width Ds +diff --git a/sent.c b/sent.c +index c50a572..0b36e32 100644 +--- a/sent.c ++++ b/sent.c +@@ -675,7 +675,7 @@ configure(XEvent *e) + void + usage() + { +- die("usage: %s [file]", argv0); ++ die("usage: %s [-c fgcolor] [-b bgcolor] [-f font] [file]", argv0); + } + + int +@@ -687,6 +687,15 @@ main(int argc, char *argv[]) + case 'v': + fprintf(stderr, "sent-"VERSION"\n"); + return 0; ++ case 'f': ++ fontfallbacks[0] = EARGF(usage()); ++ break; ++ case 'c': ++ colors[0] = EARGF(usage()); ++ break; ++ case 'b': ++ colors[1] = EARGF(usage()); ++ break; + default: + usage(); + } ARGEND +-- +2.20.1 + diff --git a/.local/src/sent/patches/sent-progress-bar-1.0.diff b/.local/src/sent/patches/sent-progress-bar-1.0.diff new file mode 100644 index 00000000..9d0e7d2d --- /dev/null +++ b/.local/src/sent/patches/sent-progress-bar-1.0.diff @@ -0,0 +1,31 @@ +diff --git a/config.def.h b/config.def.h +index 60eb376..25d89e0 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -19,6 +19,9 @@ static const float linespacing = 1.4; + static const float usablewidth = 0.75; + static const float usableheight = 0.75; + ++/* height of the presentation progress bar */ ++static const int progressheight = 5; ++ + static Mousekey mshortcuts[] = { + /* button function argument */ + { Button1, advance, {.i = +1} }, +diff --git a/sent.c b/sent.c +index c50a572..046466e 100644 +--- a/sent.c ++++ b/sent.c +@@ -533,6 +533,12 @@ xdraw() + 0, + slides[idx].lines[i], + 0); ++ if (idx != 0 && progressheight != 0) { ++ drw_rect(d, ++ 0, xw.h - progressheight, ++ (xw.w * idx)/(slidecount - 1), progressheight, ++ 1, 0); ++ } + drw_map(d, xw.win, 0, 0, xw.w, xw.h); + } else { + if (!(im->state & SCALED)) diff --git a/.local/src/sent/patches/sent-toggle-scm-20210119-2be4210.diff b/.local/src/sent/patches/sent-toggle-scm-20210119-2be4210.diff new file mode 100644 index 00000000..12ba579c --- /dev/null +++ b/.local/src/sent/patches/sent-toggle-scm-20210119-2be4210.diff @@ -0,0 +1,79 @@ +From 2be4210944d97ddb158feee601ec85c016de0872 Mon Sep 17 00:00:00 2001 +From: Randoragon +Date: Tue, 19 Jan 2021 10:17:47 +0100 +Subject: [PATCH] Add toggle colorscheme functionality + +This patch is meant to be applied on top of the "inverted colors" patch +(https://tools.suckless.org/sent/patches/inverted-colors/). It creates a +new binding, "i", that lets you toggle between two colorschemes during +presentation. +--- + config.def.h | 1 + + sent.1 | 2 ++ + sent.c | 18 ++++++++++++++++++ + 3 files changed, 21 insertions(+) + +diff --git a/config.def.h b/config.def.h +index ccea9a6..c72afc5 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -52,6 +52,7 @@ static Shortcut shortcuts[] = { + { XK_n, advance, {.i = +1} }, + { XK_p, advance, {.i = -1} }, + { XK_r, reload, {0} }, ++ { XK_i, togglescm, {0} }, + }; + + static Filter filters[] = { +diff --git a/sent.1 b/sent.1 +index f74d583..a7564a8 100644 +--- a/sent.1 ++++ b/sent.1 +@@ -44,6 +44,8 @@ Reload the slides. Only works on file input. + Go to next slide, if existent. + .It Sy Left | Backspace | h | k | Up | Prior | p + Go to previous slide, if existent. ++.It Sy i ++Toggle colorschemes. + .El + .El + .Sh FORMAT +diff --git a/sent.c b/sent.c +index 7053ab3..d29fc35 100644 +--- a/sent.c ++++ b/sent.c +@@ -107,6 +107,7 @@ static void xdraw(); + static void xhints(); + static void xinit(); + static void xloadfonts(); ++static void togglescm(); + + static void bpress(XEvent *); + static void cmessage(XEvent *); +@@ -613,6 +614,23 @@ xinit() + XSync(xw.dpy, False); + } + ++void ++togglescm() ++{ ++ if (use_inverted_colors) { ++ free(sc); ++ sc = drw_scm_create(d, colors, 2); ++ use_inverted_colors = 0; ++ } else { ++ sc = drw_scm_create(d, inverted_colors, 2); ++ use_inverted_colors = 1; ++ } ++ drw_setscheme(d, sc); ++ XSetWindowBackground(xw.dpy, xw.win, sc[ColBg].pixel); ++ xdraw(); ++} ++ ++ + void + xloadfonts() + { +-- +2.30.0 + diff --git a/.local/src/sent/sent b/.local/src/sent/sent index 1cd1f598b53d8e2ca4cd49e00c002436d6f5570f..43c6a65fe9eb01ce9182ca29c95b12c5122a8e71 100755 GIT binary patch delta 28574 zcmbV#2Xquw-}l^^ZIjt-CdsCez$TP52njtjNdke;15yG6=@5`kDEep?rN%W%9CblK zv17w%REkOy1QmUN$49XTYYb0dn21yEdU#IW`eiBSSfj4}oRT%ih3cN@2}-_t7A3h>(U zWhU@18=K^xy%!c9{pdSo>8NwxmZfihV>e&)X}n@#U;r8jjx2GtHua;-!=GtD+T_@ zHTXd${@6A6VJ80MHTW_U-yraQ$?|8iNoc%AV4jKBUzPY}@#l;eaOySq>~R7=`5L@x z^4EpoQzXeT!BlMK*fP*C&S;ic6-vDwTr&kH|1GG0G0~auQeL{FjiZkwmDEJueH|6O zZ)qb*O>vLjBuN)G0Q`6*VeKc3!Cf<5PjjHlqsG6w_GC52j;@((y3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{_NX zl?P3HzKL(Rdn*i&?7-Tl_6376wt4<(nzwMILWUVY|fr193kduIb3y zvdaX7YdbPOOW;RrDXGn|e@Q^}3g^qFRxjiel@*KojpBYs_|ANm!lnq|+c4_^{Y%W& zwb>mKfDIrPNeo@+nW60(Q-j7*me2O=vkp_wc+)PiD+WtJ=kQ6{{+K4{$NcdnPGfmN(t9>fg|0h-jiiGP?PgAEefiAj!He>GmVe!hHmI2iq!t#qBs;bh(np=nk0+GvZ$7A9x^3gd$Axz zKPkEP$l`!x{sPPf6f}&`carP8Ebv(ugNiw2(L@%lWzk&}{e~b~xB^I-I$F_n}_PK4FF^El2S!MXiP22>&&lwQ`@JKd*&r SY`EPBoM7qEFFbPu%l>>>>>> .El .Sh USAGE .Bl -tag -width Ds @@ -41,6 +56,8 @@ Reload the slides. Only works on file input. Go to next slide, if existent. .It Sy Left | Backspace | h | k | Up | Prior | p Go to previous slide, if existent. +.It Sy i +Toggle colorschemes. .El .El .Sh FORMAT diff --git a/.local/src/sent/sent.c b/.local/src/sent/sent.c index 9534fcaf..c439dd3a 100644 --- a/.local/src/sent/sent.c +++ b/.local/src/sent/sent.c @@ -25,6 +25,8 @@ char *argv0; +int use_inverted_colors = 0; + /* macros */ #define LEN(a) (sizeof(a) / sizeof(a)[0]) #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) @@ -105,6 +107,7 @@ static void xdraw(); static void xhints(); static void xinit(); static void xloadfonts(); +static void togglescm(); static void bpress(XEvent *); static void cmessage(XEvent *); @@ -537,6 +540,12 @@ xdraw() 0, slides[idx].lines[i], 0); + if (idx != 0 && progressheight != 0) { + drw_rect(d, + 0, xw.h - progressheight, + (xw.w * idx)/(slidecount - 1), progressheight, + 1, 0); + } drw_map(d, xw.win, 0, 0, xw.w, xw.h); } else { if (!(im->state & SCALED)) @@ -590,7 +599,11 @@ xinit() if (!(d = drw_create(xw.dpy, xw.scr, xw.win, xw.w, xw.h))) die("sent: Unable to create drawing context"); - sc = drw_scm_create(d, colors, 2); + if (use_inverted_colors) { + sc = drw_scm_create(d, inverted_colors, 2); + } else { + sc = drw_scm_create(d, colors, 2); + } drw_setscheme(d, sc); XSetWindowBackground(xw.dpy, xw.win, sc[ColBg].pixel); @@ -607,6 +620,23 @@ xinit() XSync(xw.dpy, False); } +void +togglescm() +{ + if (use_inverted_colors) { + free(sc); + sc = drw_scm_create(d, colors, 2); + use_inverted_colors = 0; + } else { + sc = drw_scm_create(d, inverted_colors, 2); + use_inverted_colors = 1; + } + drw_setscheme(d, sc); + XSetWindowBackground(xw.dpy, xw.win, sc[ColBg].pixel); + xdraw(); +} + + void xloadfonts() { @@ -679,7 +709,7 @@ configure(XEvent *e) void usage() { - die("usage: %s [file]", argv0); + die("usage: %s [-c fgcolor] [-b bgcolor] [-f font] [file]", argv0); } int @@ -691,6 +721,17 @@ main(int argc, char *argv[]) case 'v': fprintf(stderr, "sent-"VERSION"\n"); return 0; + case 'i': + use_inverted_colors = 1; + case 'f': + fontfallbacks[0] = EARGF(usage()); + break; + case 'c': + colors[0] = EARGF(usage()); + break; + case 'b': + colors[1] = EARGF(usage()); + break; default: usage(); } ARGEND