diff options
author | Urbain Vaes <urbain@vaes.uk> | 2015-10-09 17:26:07 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2015-10-09 17:26:07 +0100 |
commit | 777498e2ed6db0426b1366fe218bea905c881439 (patch) | |
tree | 122d7ea93e65a1be00421e86195096cdcb5713bd | |
parent | f2c1c49654862c14b214e91d9b40eabed255f3af (diff) |
Add shortcut to run any script from bin
-rw-r--r-- | .i3/config | 1 | ||||
-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 |
6 files changed, 13 insertions, 11 deletions
@@ -192,3 +192,4 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # font pango:DejaVu Sans Mono 10 bindsym F1 exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds +bindsym $mod+semicolon exec --no-startup-id /home/urbain/dotfiles/bin/run 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" & |