dot

packages and services management
Log | Files | Refs | README

commit 9152f24bb447a239f23090d17586138a72cff34d
parent 7058730530e94164f954439f40ba0aca9ae9e4d6
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 26 Mar 2018 21:39:36 +0200

fixing xdg-open

Diffstat:
Mbin/xdg-open | 6+-----
Mbin/xdg-ssh | 17+++++++++--------
Mbin/xdg-store | 14++++++++++++++
Mpack/dwm/config.h | 3++-
4 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/bin/xdg-open b/bin/xdg-open @@ -17,11 +17,7 @@ IFS=' ' read scheme user pass host port path << EOF $(xdg-uri "$1") EOF -case "$host" in -(*.onion) - [ "$TOR" ] || TOR="$1" exec torsocks xdg-open "$1" - ;; -esac +case "$host" in (*.onion) [ "$TOR" ] || TOR="$1" exec torsocks "$0" "$1" ;; esac case "$1" in (git://*) diff --git a/bin/xdg-ssh b/bin/xdg-ssh @@ -1,4 +1,4 @@ -#!/bin/sh -ex +#!/bin/sh -e # get content from remote or locally the same way @@ -12,7 +12,8 @@ EOF [ -d "$1" ] && path="$path/" [ "$port" = . ] && ssh="ssh -P $port $host" || ssh="ssh $host" -ssh="$ssh -t . ./.profile;" +ssht="$ssh -t . ./.profile;" +ssh="$ssh . ./.profile;" case "$path" in (*.pdf) @@ -48,8 +49,8 @@ case "$path" in done exit ;; (*.o|*.a) - exec $ssh "exec radare2 '$path'" - ;; + $ssh "exec objdump -D '$path'" | less + exit ;; (*.tgz) $ssh "exec mv '$path' '${path%.tgz}.tar.gz'" exec xdg-ssh "${path%.tgz}.tar.gz" @@ -92,13 +93,13 @@ case "$path" in (*.deb) exec $ssh "exec ar vx '$path'" ;; -(*) - exec $ssh "exec $EDITOR '$path'" - ;; ('') exec $ssh ;; (*/) - exec $ssh "cd '$path' && exec '$SHELL'" + exec $ssht "cd '$path' && exec '$SHELL'" + ;; +(*) + exec $ssht "exec $EDITOR '$path'" ;; esac diff --git a/bin/xdg-store b/bin/xdg-store @@ -6,6 +6,20 @@ path="" +[ "$ABDUCO" ] || exec xdg-abduco xdg-open "$1" + +# [scheme://][user[:pass]@]host[:port][/path] +IFS=' ' read scheme user pass host port path << EOF +$(xdg-uri "$1") +EOF + +# [scheme://][user[:pass]@]host[:port][/path] +IFS=' ' read scheme user pass host port path << EOF +$(xdg-uri "$1") +EOF + +case "$1" in (*.onion/*) [ "$TOR" ] || TOR="$1" exec torsocks "$0" "$1" ;; esac + case "$1" in (*vimeo.com*|*youtube.com*|*youtu.be*|*openload.co*) mkdir -p "$HOME/lib/video/$host" diff --git a/pack/dwm/config.h b/pack/dwm/config.h @@ -12,10 +12,11 @@ static const char dmenufont[] = "terminus:pixelsize=16"; static const char termfont[] = "terminus:pixelsize=16"; static const char col_light[] = "#dddddd"; static const char col_shade[] = "#333333"; +static const char col_black[] = "#000000"; static const char col_tint[] = "#00ff99"; static const char *colors[][3] = { /* fg bg border */ - [SchemeNorm] = { col_light, col_shade, col_shade }, + [SchemeNorm] = { col_light, col_black, col_shade }, [SchemeSel] = { col_shade, col_light, col_tint }, };