From b9ea238dd7e8a56b1d171cdc76e405bb2a8584dd Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 21 Feb 2018 12:18:32 +0000 Subject: Improve i3 status --- bin/bin/keyboard | 6 ++++++ bin/bin/tmux_attach | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/bin/keyboard b/bin/bin/keyboard index ed46c16..e0cf952 100755 --- a/bin/bin/keyboard +++ b/bin/bin/keyboard @@ -37,6 +37,12 @@ xmodmap -e "add mod4 = Super_L" xmodmap -e "keycode any = space" xcape -e 'Super_L=space' +# Make return (Control_R, Return) +xmodmap -e "keysym Return = Control_R" +xmodmap -e "add Control = Control_R" +xmodmap -e "keycode any = Return" +xcape -e 'Control_R=Return' + # Make eject an Insert xmodmap -e "keysym XF86Eject = Insert" diff --git a/bin/bin/tmux_attach b/bin/bin/tmux_attach index b4b35ee..b5a613c 100755 --- a/bin/bin/tmux_attach +++ b/bin/bin/tmux_attach @@ -5,13 +5,14 @@ ATTACHED_SESSIONS=$(tmux list-sessions | grep attached | cut -d':' -f1) TMUXINATOR=$(tmuxinator list | sed '1d' | sed 's/\s\+/\n/g') UNION=$(cat <(echo "$SESSIONS") <(echo "$TMUXINATOR") | sort | uniq | sed "/^$/d") -SESSION=$(echo "$UNION" | dmenu -i -p "Session:" | tr -d '[[:space:]]') +SESSION=$(echo "$UNION" | dmenu -i -p "Session:" | tr -d '[:space:]') [[ -n $SESSION ]] || exit # Rename i3 workspace +# `command -v` to check that i3-msg is a command ! grep -Fxq "$SESSION" <(echo "$ATTACHED_SESSIONS") \ && command -v i3-msg \ - && $HOME/bin/workspace gw $SESSION + && "$HOME"/bin/workspace gw "$SESSION" grep -Fxq "$SESSION" <(echo "$TMUXINATOR") \ && COMMAND="tmuxinator start $SESSION" \ -- cgit v1.2.3