[wiki] [sites] Add dbdb.sh dmenu script || kaiksto

From: <git_AT_suckless.org>
Date: Tue, 23 Aug 2016 16:42:16 +0200

commit 7b1933a8bfd7821d31fb1612808336d820c6731e
Author: kaiksto <kaiksto_AT_protonmail.com>
Date: Tue Aug 23 16:46:04 2016 +0200

    Add dbdb.sh dmenu script

diff --git a/surf.suckless.org/stylesheets/inverted_low_contrast.md.bak b/surf.suckless.org/stylesheets/inverted_low_contrast.md.bak
new file mode 100644
index 0000000..425682d
--- /dev/null
+++ b/surf.suckless.org/stylesheets/inverted_low_contrast.md.bak
_AT_@ -0,0 +1,16 @@
+inverted low contrast style
+===========================
+
+Filter based solutions for those who like it dark (mostly, on dark sites
+efect is oposite), but don't like acid-trippy images and colors. Works
+reasonably smooth, unless there are lots of images.
+
+dark css
+--------
+
+ html, img { -webkit-filter: invert(95%) hue-rotate(180deg); }
+
+Author
+------
+
+* kaiksto
diff --git a/tools.suckless.org/dmenu/scripts/dbdb.sh b/tools.suckless.org/dmenu/scripts/dbdb.sh
new file mode 100755
index 0000000..238c057
--- /dev/null
+++ b/tools.suckless.org/dmenu/scripts/dbdb.sh
_AT_@ -0,0 +1,18 @@
+#!/bin/sh
+# dmenu-based directory browser
+# to run from terminal:
+# source /path/to/dbdb.sh
+# or bind it to shortcut:
+# echo bind \'\"\C-o\":\"source /path/to/dbdb.sh\n\"\' >> ~/.bashrc
+
+chosen="placeholder"
+
+while [ ! -z "$chosen" ]; do
+ DIRs=$( ls -a1p | grep -P '^\w[^\$/]+/$' | awk -vRS="
" -vORS=" " '1')
+ DOTDs=$( ls -a1p | grep -P '^\.[^\$/]+/$' | awk -vRS="
" -vORS=" " '1')
+ FILEs=$( ls -a1p | grep -P '^\w[^\$/]+$' | awk -vRS="
" -vORS=" " '1')
+ DOTFs=$( ls -a1p | grep -P '^\.[^\$/]+$' | awk -vRS="
" -vORS=" " '1')
+ clear && printf "\e[1;7;33m $(pwd) \e[0m
$FILEs
\e[0;38;5;238m$DOTFs\e[0m
"
+ chosen=`( ( echo -e "$DIRs$DOTDs" | awk -vRS=" " -vORS="
" '1' ) | dmenu -i )`
+ cd "$chosen"
+done
diff --git a/tools.suckless.org/dmenu/scripts/index.md b/tools.suckless.org/dmenu/scripts/index.md
index b199ba4..ba258e4 100644
--- a/tools.suckless.org/dmenu/scripts/index.md
+++ b/tools.suckless.org/dmenu/scripts/index.md
_AT_@ -24,3 +24,4 @@ Download
   little files navigator
 * [dmenu_run_history](http://tools.suckless.org/dmenu/scripts/dmenu_run_with_command_history) :
   dmenu_run alternative with command history
+* [dbdb.sh](dbdb.sh): dmenu-based directory browser
Received on Tue Aug 23 2016 - 16:42:16 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 23 2016 - 16:48:26 CEST