summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.i3/config1
-rwxr-xr-xbin/books5
-rwxr-xr-xbin/clean2
-rwxr-xr-xbin/install2
-rwxr-xr-xbin/run5
-rwxr-xr-xbin/xopen9
6 files changed, 13 insertions, 11 deletions
diff --git a/.i3/config b/.i3/config
index 82eb35c..0963373 100644
--- a/.i3/config
+++ b/.i3/config
@@ -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" &
diff --git a/bin/clean b/bin/clean
index f2bb7e4..19a0455 100755
--- a/bin/clean
+++ b/bin/clean
@@ -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
diff --git a/bin/run b/bin/run
new file mode 100755
index 0000000..4b57856
--- /dev/null
+++ b/bin/run
@@ -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" &