From 28c181bc40fa7e6693ba1ebc99c982d4e77a3e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 10 Apr 2017 18:48:21 +0100 Subject: [PATCH] Support presentation from the terminal (#113) --- .config/terminator/config | 13 +++++++++++++ .zprofile | 2 ++ tools/bfg | 2 +- tools/download | 3 +++ tools/fix-a2dp-bluetooth | 24 ++++++++++++++++++++++++ 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 tools/download create mode 100755 tools/fix-a2dp-bluetooth diff --git a/.config/terminator/config b/.config/terminator/config index c9604cc1..7bc8fdf7 100644 --- a/.config/terminator/config +++ b/.config/terminator/config @@ -29,3 +29,16 @@ scrollback_lines = 8192 show_titlebar = False use_system_font = False + [[presentation]] + background_color = "#002b36" + background_darkness = 0.93 + background_type = transparent + cursor_color = "#eee8d5" + font = DejaVu Sans Mono for Powerline Bold 22 + foreground_color = "#eee8d5" + icon_bell = False + login_shell = True + palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3" + scrollback_infinite = True + scrollback_lines = 8192 + use_system_font = False diff --git a/.zprofile b/.zprofile index 883160fb..7fbb6c52 100644 --- a/.zprofile +++ b/.zprofile @@ -75,6 +75,8 @@ fi TMPPREFIX="${TMPDIR%/}/zsh" export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting +export PATH="$HOME/.cargo/bin:$PATH" # other common env vars source ~/.setenv + diff --git a/tools/bfg b/tools/bfg index 8551899c..f2fe8faa 100755 --- a/tools/bfg +++ b/tools/bfg @@ -1,2 +1,2 @@ #!/bin/sh -java -jar ~/tools/bfg-1.12.14.jar +java -jar ~/tools/bfg-1.12.14.jar "$@" diff --git a/tools/download b/tools/download new file mode 100755 index 00000000..e6627559 --- /dev/null +++ b/tools/download @@ -0,0 +1,3 @@ +#!/bin/sh +aria2c -x 16 -s 16 $@ + diff --git a/tools/fix-a2dp-bluetooth b/tools/fix-a2dp-bluetooth new file mode 100755 index 00000000..cdb8c9ac --- /dev/null +++ b/tools/fix-a2dp-bluetooth @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +card_index=`pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'` +card_address=`pacmd list-cards | grep bluez_card -A8 | grep 'device\.string' | awk '{print $3}'` +card_address=${card_address//\"/} + +if [[ -z $card_index ]]; then + echo "cannot determine card index, please make sure the headset is on and paired" + exit 1 +fi + +echo "switching card number $card_index off" +pacmd set-card-profile $index off; +sleep 2 +echo "reconnecting $card_address" +echo "disconnect $card_address" | bluetoothctl +sleep 3 +echo "connect $card_address" | bluetoothctl +sleep 5 +card_index=`pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'` +echo "new index is $card_index" +echo "changing the card profile" +pacmd set-card-profile $card_index a2dp_sink