From 3dee1f08f1a0b7be5e7f6fcbbc20861de5fea2a1 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 8 Sep 2016 11:38:50 +0100 Subject: [keyboard] Add mapping for Insert --- bin/bin/keyboard | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin') diff --git a/bin/bin/keyboard b/bin/bin/keyboard index d00035b..45d9972 100755 --- a/bin/bin/keyboard +++ b/bin/bin/keyboard @@ -30,6 +30,9 @@ xmodmap -e "keysym g = g G 7" xmodmap -e "keysym c = c C 8" xmodmap -e "keysym r = r R 9" +# Special characters +xmodmap -e "keysym XF86Eject = Insert" + # Xcape settings killall -9 xcape -- cgit v1.2.3 From 8cd9e65747d0d7b956d0fe46708cdb64a8c265de Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 10 Sep 2016 22:51:03 +0100 Subject: Delete unused scripts --- bin/bin/dot | 48 ------------------------------------------------ bin/bin/dyndns | 5 ----- bin/bin/swap | 16 ---------------- 3 files changed, 69 deletions(-) delete mode 100755 bin/bin/dot delete mode 100755 bin/bin/dyndns delete mode 100755 bin/bin/swap (limited to 'bin') diff --git a/bin/bin/dot b/bin/bin/dot deleted file mode 100755 index acb0e64..0000000 --- a/bin/bin/dot +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -get_links() -{ - find $HOME -not -path "$HOME/dotfiles/*" -type l | while read line; do - if [[ "$(realpath -q $line)" == "${HOME}/dotfiles/"* ]]; then - echo $line - fi - done -} - -clean() -{ - get_links | while read link; do - rm -v ${link} - done -} - -down() -{ - source $HOME/dotfiles/.dotmap - for link in "${!dotmap[@]}"; do - echo "Removing ${link}." - rm -rf $link - done -} - -up() -{ - source $HOME/dotfiles/.dotmap - for link in "${!dotmap[@]}"; do - target=${dotmap[$link]} - mkdir -p $(dirname ${link}) - echo "Linking $target." - rm -rf $link && ln -s $target $link - done -} - -save() -{ - echo "declare -A dotmap" > .dotmap - get_links | while read link; do - echo "dotmap[$link]=$(readlink -f -q $link)" | sed "s#$HOME#"'$HOME#g' >> .dotmap - done - sort .dotmap -o .dotmap -} - -$1 diff --git a/bin/bin/dyndns b/bin/bin/dyndns deleted file mode 100755 index 8d1f553..0000000 --- a/bin/bin/dyndns +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -PASSWORD=$(pass show email/urbain@vaes.uk) - -curl -4 -X PUT --user "urbain@vaes.uk:$PASSWORD" https://box.bknguyen.org/admin/dns/custom/urbainvaes.com diff --git a/bin/bin/swap b/bin/bin/swap deleted file mode 100755 index 4c17dc7..0000000 --- a/bin/bin/swap +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python - -import i3 -outputs = i3.get_outputs() -print(outputs[0]) - -# set current workspace to output 0 -i3.workspace(outputs[0]['current_workspace']) - -# ..and move it to the other output. -# outputs wrap, so the right of the right is left ;) -i3.command('move', 'workspace to output right') - -# rinse and repeat -i3.workspace(outputs[1]['current_workspace']) -i3.command('move', 'workspace to output right') -- cgit v1.2.3 From 8b2d5dc3fb67dd5ecd2b0165b131167ce3a82b1d Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 27 Sep 2016 15:32:08 +0100 Subject: [i3] Update dmenu options in workspace script --- bin/bin/workspace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/bin/workspace b/bin/bin/workspace index a9e4aa0..e380f98 100755 --- a/bin/bin/workspace +++ b/bin/bin/workspace @@ -11,7 +11,7 @@ workspaces=$(i3-msg -t get_workspaces | grep -Po '"name":.*?[^\\]"' | sed 's/"na workspaces=$(echo $workspaces | sed '/:/!d') # Get desired workspace -target=$(echo $workspaces | dmenu -b -i -sf green -p "Go to workspace:") +target=$(echo $workspaces | dmenu "Go to workspace:") # Exit if empty [[ -z $target ]] && exit -- cgit v1.2.3 From 32e61b026cfb1f2d22da6e2b2cb41768d56f8fb9 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 28 Sep 2016 21:12:41 +0100 Subject: Clean unused scripts --- bin/bin/i3-shell | 27 --------------------------- bin/bin/rename_workspace | 12 ------------ bin/bin/vimin | 2 +- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100755 bin/bin/i3-shell delete mode 100755 bin/bin/rename_workspace (limited to 'bin') diff --git a/bin/bin/i3-shell b/bin/bin/i3-shell deleted file mode 100755 index 120e4b4..0000000 --- a/bin/bin/i3-shell +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152 - -CMD=urxvt -CWD='' - -# Get window ID -ID=$(xdpyinfo | grep focus | cut -f4 -d " ") - -# Get PID of process whose window this is -PID=$(xprop -id $ID | grep -m 1 PID | cut -d " " -f 3) - -# Get last child process (shell, vim, etc) -if [ -n "$PID" ]; then - TREE=$(pstree -lpA $PID | tail -n 1) - PID=$(echo $TREE | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g') - - # If we find the working directory, run the command in that directory - if [ -e "/proc/$PID/cwd" ]; then - CWD=$(readlink /proc/$PID/cwd) - fi -fi -if [ -n "$CWD" ]; then - cd $CWD && $CMD -else - $CMD -fi diff --git a/bin/bin/rename_workspace b/bin/bin/rename_workspace deleted file mode 100755 index 61fffd3..0000000 --- a/bin/bin/rename_workspace +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -workspace=$(i3-msg -t get_workspaces | grep -Po '{[^}]*"focused":true[^}]*}' | sed 's/.*"name":"\([^"]*\)".*$/\1/g') -number=$(i3-msg -t get_workspaces | grep -Po '{[^}]*"focused":true[^}]*}' | sed 's/{"num":\([^,]*\),.*$/\1/g') - -new_name=$(zenity --entry --title="Rename workspace" --entry-text "$workspace") -if [[ "$new_name" != *:* ]]; then - new_name="$number:$new_name" -fi - -echo $new_name -exec i3-msg rename workspace to "$new_name" diff --git a/bin/bin/vimin b/bin/bin/vimin index 905b30f..b00d8fa 100755 --- a/bin/bin/vimin +++ b/bin/bin/vimin @@ -1,4 +1,4 @@ #!/usr/bin/env bash tempfile=$(mktemp) -urxvt -e vim ${tempfile} +urxvt -e nvim ${tempfile} +star cat ${tempfile} | xclip -i -- cgit v1.2.3 From 99587dca308e085b2accb72a89896b5a63cb20e1 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Mon, 10 Oct 2016 17:37:40 +0100 Subject: Add script for PhD references --- bin/bin/references | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 bin/bin/references (limited to 'bin') diff --git a/bin/bin/references b/bin/bin/references new file mode 100755 index 0000000..a578728 --- /dev/null +++ b/bin/bin/references @@ -0,0 +1,5 @@ +#!/bin/bash +REF_DIR="$HOME/phd/references" +PDF=$(locate "$REF_DIR/**/*.pdf") +TARGET=$(echo "${PDF//"$REF_DIR/"/}" | dmenu -i -p "Open File:") +[[ -n $TARGET ]] && zathura "$REF_DIR/$TARGET" & -- cgit v1.2.3