diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/books | 5 | ||||
-rwxr-xr-x | bin/clean | 2 | ||||
-rwxr-xr-x | bin/install | 2 | ||||
-rwxr-xr-x | bin/run | 5 | ||||
-rwxr-xr-x | bin/xopen | 9 |
5 files changed, 12 insertions, 11 deletions
diff --git a/bin/books b/bin/books new file mode 100755 index 0000000..8524277 --- /dev/null +++ b/bin/books @@ -0,0 +1,5 @@ +#!/bin/bash +BOOKS_DIR="$HOME/Dropbox/books" +PDF=$(locate "$BOOKS_DIR/*.pdf") +TARGET=$(echo "${PDF//"$BOOKS_DIR/"/}" | dmenu -i -p "Open File:") +[[ -n $TARGET ]] && zathura "$BOOKS_DIR/$TARGET" & @@ -1,5 +1,5 @@ #! /bin/bash -dotdir=/home/urbain/dotfiles +dotdir=/home/urbain/dotfiles && cd $dotdir for file in `ls -A --ignore="Makefile" --ignore="README.md" --ignore=".git*"`; do if [[ -f $file/Makefile ]]; then cd $file && make clean && cd $dotdir diff --git a/bin/install b/bin/install index 438c5b9..bc21136 100755 --- a/bin/install +++ b/bin/install @@ -1,5 +1,5 @@ #! /bin/bash -dotdir=/home/urbain/dotfiles +dotdir=/home/urbain/dotfiles && cd $dotdir for file in `ls -A --ignore="Makefile" --ignore="README.md" --ignore=".git*"`; do if [[ -f $file/Makefile ]]; then cd $file && make && cd $dotdir @@ -0,0 +1,5 @@ +#!/bin/bash +SCRIPTS_DIR="$HOME/dotfiles/bin" && cd $SCRIPTS_DIR +SCRIPTS=$(ls -A $SCRIPTS_DIR) +TARGET=$(echo "${SCRIPTS//"$SCRIPTS_DIR/"/}" | dmenu -i -p "Run script:") +[[ -n $TARGET ]] && "$SCRIPTS_DIR/$TARGET" diff --git a/bin/xopen b/bin/xopen deleted file mode 100755 index a133a47..0000000 --- a/bin/xopen +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/bash -cd ~ -PDF=$(locate "$HOME/*.pdf") -DJVU=$(locate "$HOME/*.djvu") -RESULTS="$PDF -$DJVU" -TARGET=$(echo "${RESULTS//"$HOME/"/}" | dmenu -i -p "Open File:" | tr -d '[[:space:]]') -[[ -n $TARGET ]] || exit -xdg-open "$TARGET" & |