diff --git a/_suckless/dwm/config.h b/_suckless/dwm/config.h index 11146be..c5cccb0 100644 --- a/_suckless/dwm/config.h +++ b/_suckless/dwm/config.h @@ -47,7 +47,7 @@ static const Rule rules[] = { */ /* class instance title tags mask isfloating isterminal noswallow monitor */ { NULL, NULL, "st", 0, 0, 1, 0, -1 }, - { "Firefox", NULL, NULL, 2, 0, 0, 0, -1 }, + { "Firefox", NULL, NULL, 2, 0, 0, 1, -1 }, { "Ferdi", NULL, NULL, 1 << 2, 0, 0, 0, -1 }, { "Slack", NULL, NULL, 1 << 7, 0, 0, 0, -1 }, { NULL, "mutt", NULL, 1 << 3, 0, 1, 1, -1 }, @@ -101,8 +101,9 @@ static Key keys[] = { TAGKEYS( XK_9, 8) TAGKEYS( XK_0, 9) /* apps n'shit */ - { MODKEY, XK_Return, spawn, {.v = termcmd } }, - { SHTKEY, XK_Return, spawn, SHCMD("st -n f_work") }, + //{ MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_Return, spawn, SHCMD("BROWSER=firefox st") }, + { SHTKEY, XK_Return, spawn, SHCMD("BROWSER=workfx st -n f_work") }, { MODKEY, XK_space, spawn, SHCMD("dmenu_run -c -i -l 20") }, { MODKEY, XK_i, spawn, SHCMD("scrot -f -s 'scrot_%Y-%m-%d_%H-%M-%S_%s.png'") }, { SHTKEY, XK_i, spawn, SHCMD("scrot 'scrot_%Y-%m-%d_%H-%M-%S_%s.png'") }, diff --git a/_suckless/st/Makefile b/_suckless/st/Makefile index d286a95..38240da 100644 --- a/_suckless/st/Makefile +++ b/_suckless/st/Makefile @@ -44,9 +44,7 @@ dist: clean install: st mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f st $(DESTDIR)$(PREFIX)/bin - cp -f st-url $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/st - chmod 755 $(DESTDIR)$(PREFIX)/bin/st-url mkdir -p $(DESTDIR)$(MANPREFIX)/man1 sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 diff --git a/_suckless/st/config.h b/_suckless/st/config.h index a4077f1..e3dfa6e 100644 --- a/_suckless/st/config.h +++ b/_suckless/st/config.h @@ -191,8 +191,9 @@ static MouseShortcut mshortcuts[] = { #define MODKEY ControlMask #define SHTKEY (ControlMask|ShiftMask) -static char *openurlcmd[] = { "/bin/sh", "-c", "st-url -o", "externalpipe", NULL }; -static char *copyurlcmd[] = { "/bin/sh", "-c", "st-url -c", "externalpipe", NULL }; +//static char *openurlcmd[] = { "/bin/sh", "-c", "st-url -o", "externalpipe", NULL }; +static char *openurlcmd[] = {"/bin/sh", "-c", "xurls | dmenu -c -l 20 -i | xargs -r $BROWSER", + "externalpipe", NULL}; static Shortcut shortcuts[] = { /* mask keysym function argument */ @@ -203,7 +204,6 @@ static Shortcut shortcuts[] = { { SHTKEY, XK_V, clippaste, {.i = 0} }, { ShiftMask, XK_Insert, selpaste, {.i = 0} }, { MODKEY, XK_o, externalpipe, {.v = openurlcmd } }, - { SHTKEY, XK_O, externalpipe, {.v = copyurlcmd } }, { MODKEY, XK_k, kscrollup, {.i = 1} }, { MODKEY, XK_j, kscrolldown, {.i = 1} }, }; diff --git a/_suckless/st/st-url b/_suckless/st/st-url deleted file mode 100644 index 0464142..0000000 --- a/_suckless/st/st-url +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -urlregex="(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9.,/:@$&%?$\#=_~-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)" - -urls="$(sed 's/.*│//g' | tr -d '\n' | # First remove linebreaks and mutt sidebars: - grep -aEo "$urlregex" | # grep only urls as defined above. - uniq | # Ignore neighboring duplicates. - sed "s/\(\.\|,\|;\|\!\\|\?\)$//; - s/^www./http:\/\/www\./")" # xdg-open will not detect url without http - -[ -z "$urls" ] && exit 1 - -while getopts "hoc" o; do case "${o}" in - h) printf "Optional arguments for custom use:\\n -c: copy\\n -o: xdg-open\\n -h: Show this message\\n" && exit 1 ;; - o) chosen="$(echo "$urls" | dmenu -c -l 20 -i)" - setsid xdg-open "$chosen" >/dev/null 2>&1 & ;; - c) echo "$urls" | dmenu -c -l 20 -i| tr -d '\n' | xsel -l /dev/null ;; - *) printf "Invalid option: -%s\\n" "$OPTARG" && exit 1 ;; -esac done