Add bookmark this script
All checks were successful
/ check (push) Successful in 1m12s

Based on Luke Smith's script created during his "Bookmarking for Unix
Chads (For Browsers, Terminals, IDEs and everything else)" video.

https://videos.lukesmith.xyz/w/o5fiME4oJMdVzwSu7mA9mc
This commit is contained in:
Oliver Davies 2025-05-06 23:18:14 +01:00
parent 9215133b9f
commit b2ff96aa9e
5 changed files with 77 additions and 2 deletions

View file

@ -5,6 +5,9 @@ let
in
prev.dwm.override {
conf = ''
#define BROWSER "${lib.getExe prev.librewolf}"
#define TERMINAL "${lib.getExe prev.st}"
static const unsigned int borderpx = 1;
static const unsigned int snap = 32;
static const int showbar = 1;
@ -51,7 +54,7 @@ prev.dwm.override {
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static const char *termcmd[] = { TERMINAL, NULL };
static const Key keys[] = {
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
@ -86,13 +89,14 @@ prev.dwm.override {
TAGKEYS(XK_7, 6)
TAGKEYS(XK_8, 7)
TAGKEYS(XK_9, 8)
{ MODKEY|ShiftMask, XK_b, spawn, SHCMD("${lib.getExe prev.librewolf}") },
{ MODKEY|ShiftMask, XK_b, spawn, {.v = (const char*[]){ "/etc/profiles/per-user/opdavies/bin/bookmarkthis", NULL }}},
{ MODKEY|ShiftMask, XK_f, spawn, SHCMD("${prev.xfce.thunar}/bin/thunar") },
{ MODKEY|ShiftMask, XK_i, spawn, SHCMD("${prev.xdotool}/bin/xdotool type $(cat ~/.local/share/snippets.txt | grep -v '^#' | grep -v '^$' | sort | dmenu -i -l 50 | cut -d' ' -f1)") },
{ MODKEY|ShiftMask, XK_p, spawn, {.v = (const char*[]){ "${lib.getExe prev.passmenu-otp}", "-i", NULL} } },
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ShiftMask, XK_r, quit, {1} },
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("${prev.flameshot}/bin/flameshot gui") },
{ MODKEY, XK_w, spawn, SHCMD(BROWSER) },
{ MODKEY, XK_F3, spawn, {.v = (const char*[]){ "${lib.getExe prev.displayselect}", NULL} } },
{ MODKEY, XK_F9, spawn, {.v = (const char*[]){ "/home/opdavies/.local/bin/mounter", NULL } } },
{ MODKEY, XK_F10, spawn, {.v = (const char*[]){ "/home/opdavies/.local/bin/unmounter", NULL } } },