From eb52ab2616e8e004499333656307d01c45c369ef Mon Sep 17 00:00:00 2001 From: shmibs Date: Mon, 6 Jan 2014 10:16:16 -0700 Subject: initial commit --- .ftjerm/3/commands/aur | 0 .ftjerm/3/commands/clear | 0 .ftjerm/3/commands/define | 0 .ftjerm/3/commands/install | 0 .ftjerm/3/commands/logout | 0 .ftjerm/3/commands/poweroff | 0 .ftjerm/3/commands/reboot | 0 .ftjerm/3/commands/record | 0 .ftjerm/3/commands/remove | 0 .ftjerm/3/commands/scrobble | 0 .ftjerm/3/commands/search | 0 .ftjerm/3/commands/spell | 0 .ftjerm/3/commands/suspend | 0 .ftjerm/3/commands/thesaurus | 0 .ftjerm/3/commands/update | 0 .ftjerm/3/commands/update-keys | 0 .ftjerm/3/commands/upgrade | 0 .ftjerm/3/system.sh | 97 ++++++++++++++++++++++++++++++++++++++++++ 18 files changed, 97 insertions(+) create mode 100644 .ftjerm/3/commands/aur create mode 100644 .ftjerm/3/commands/clear create mode 100644 .ftjerm/3/commands/define create mode 100644 .ftjerm/3/commands/install create mode 100644 .ftjerm/3/commands/logout create mode 100644 .ftjerm/3/commands/poweroff create mode 100644 .ftjerm/3/commands/reboot create mode 100644 .ftjerm/3/commands/record create mode 100644 .ftjerm/3/commands/remove create mode 100644 .ftjerm/3/commands/scrobble create mode 100644 .ftjerm/3/commands/search create mode 100644 .ftjerm/3/commands/spell create mode 100644 .ftjerm/3/commands/suspend create mode 100644 .ftjerm/3/commands/thesaurus create mode 100644 .ftjerm/3/commands/update create mode 100644 .ftjerm/3/commands/update-keys create mode 100644 .ftjerm/3/commands/upgrade create mode 100755 .ftjerm/3/system.sh (limited to '.ftjerm/3') diff --git a/.ftjerm/3/commands/aur b/.ftjerm/3/commands/aur new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/clear b/.ftjerm/3/commands/clear new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/define b/.ftjerm/3/commands/define new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/install b/.ftjerm/3/commands/install new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/logout b/.ftjerm/3/commands/logout new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/poweroff b/.ftjerm/3/commands/poweroff new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/reboot b/.ftjerm/3/commands/reboot new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/record b/.ftjerm/3/commands/record new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/remove b/.ftjerm/3/commands/remove new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/scrobble b/.ftjerm/3/commands/scrobble new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/search b/.ftjerm/3/commands/search new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/spell b/.ftjerm/3/commands/spell new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/suspend b/.ftjerm/3/commands/suspend new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/thesaurus b/.ftjerm/3/commands/thesaurus new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/update b/.ftjerm/3/commands/update new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/update-keys b/.ftjerm/3/commands/update-keys new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/commands/upgrade b/.ftjerm/3/commands/upgrade new file mode 100644 index 0000000..e69de29 diff --git a/.ftjerm/3/system.sh b/.ftjerm/3/system.sh new file mode 100755 index 0000000..d665d84 --- /dev/null +++ b/.ftjerm/3/system.sh @@ -0,0 +1,97 @@ +#!/bin/bash +sleep .125s +input="" +first="" + +cd /home/shmibs/.ftjerm/3/commands + +while IFS="" read -r -e -d $'\n' -p "sys: " -a input; do + history -s "$input" + + IFS=" " + input=($input) + + if [ -n "$input" ]; then + + first=${input[0]} + unset input[0] + + if [ "$first" == "upgrade" ]; then + if [ "${input[1]}" == "-a" ]; then + yaourt -Syua + else + sudo pacman -Syu + fi + fi + + if [ "$first" == "update" ]; then + sudo pacman -Syy + fi + + if [ "$first" == "update-keys" ]; then + sudo pacman-key --populate archlinux + fi + + if [ "$first" == "clear" ]; then + clear + fi + + if [ "$first" == "install" ]; then + sudo pacman -S ${input[*]} + fi + + if [ "$first" == "remove" ]; then + sudo pacman -R ${input[*]} + fi + + if [ "$first" == "search" ]; then + if [ "${input[1]}" == "-a" ]; then + unset input[1] + yaourt -Ss ${input[*]} + else + pacman -Ss ${input[*]} + fi + fi + + if [ "$first" == "aur" ]; then + yaourt -S ${input[*]} + fi + + if [ "$first" == "reboot" ]; then + systemctl reboot + fi + + if [ "$first" == "poweroff" ]; then + poweroff + fi + + if [ "$first" == "logout" ]; then + mate-session-save --logout + fi + + if [ "$first" == "spell" ]; then + echo "${input[*]}" | aspell -a + fi + + if [ $first == "thesaurus" ]; then + aiksaurus "${input[1]}" + fi + + if [ "$first" == "define" ]; then + sdcv "${input[1]}" + fi + + if [ "$first" == "record" ]; then + if [ -f ~/Desktop/temp.mkv ]; then + rm ~/Desktop/temp.mkv + fi + ffmpeg -f alsa -i pulse -f x11grab -s 1920x1080 -i :0.0 -preset ultrafast -vcodec libx264 -threads 0 -qp 0 ~/Desktop/temp.mkv + fi + + if [ "$first" == "suspend" ]; then + systemctl suspend + fi + + fi + +done -- cgit v1.2.3