about summary refs log tree commit diff stats
path: root/home-manger/lf/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'home-manger/lf/cmds')
-rw-r--r--home-manger/lf/cmds/archive.sh40
-rw-r--r--home-manger/lf/cmds/broot_jump.sh19
-rw-r--r--home-manger/lf/cmds/chmod.sh17
-rw-r--r--home-manger/lf/cmds/clear_trash.sh10
-rw-r--r--home-manger/lf/cmds/dl_file.sh36
-rw-r--r--home-manger/lf/cmds/dragon.sh11
-rw-r--r--home-manger/lf/cmds/dragon_individual.sh10
-rw-r--r--home-manger/lf/cmds/dragon_stay.sh11
-rw-r--r--home-manger/lf/cmds/fzf_jump.sh17
-rw-r--r--home-manger/lf/cmds/help.sh10
-rw-r--r--home-manger/lf/cmds/mk_dir.sh12
-rw-r--r--home-manger/lf/cmds/mk_file.sh11
-rw-r--r--home-manger/lf/cmds/mk_ln.sh43
-rw-r--r--home-manger/lf/cmds/mk_scr.sh29
-rw-r--r--home-manger/lf/cmds/open.sh16
-rw-r--r--home-manger/lf/cmds/open_config.sh10
-rw-r--r--home-manger/lf/cmds/restore_trash.sh10
-rw-r--r--home-manger/lf/cmds/set_wall_paper.sh15
-rw-r--r--home-manger/lf/cmds/stripspace.sh10
-rw-r--r--home-manger/lf/cmds/sudo_mk_file.sh13
-rw-r--r--home-manger/lf/cmds/trash.sh27
-rw-r--r--home-manger/lf/cmds/unarchive.sh22
22 files changed, 0 insertions, 399 deletions
diff --git a/home-manger/lf/cmds/archive.sh b/home-manger/lf/cmds/archive.sh
deleted file mode 100644
index 48544365..00000000
--- a/home-manger/lf/cmds/archive.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/home/dt/.local/lib/shell/lib
-. ~/.local/lib/shell/lib
-
-
-# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
-# $fx variables contain names with '*' or '?' characters. However, this option
-# is used selectively within individual commands as it can be limiting at
-# times.
-set -f
-
-fx="$*"
-
-archivers=$(mktmp)
-echo "tar+zip tar+xz 7z zip" > $archivers;
-
-readp "File Name: " name
-
-
-case $(awk '{for (i=1; i<=NF; i++) print $i}' $archivers | fzf) in
-    "tar+zip")
-        tar -czf "$name".tar.gz "$name"
-        ;;
-    "tar+xz")
-        tar -cf "$name".tar $fx
-        xz -z -9 -e -T0 "$name".tar
-        ;;
-    "7z")
-        7z a "$name".7z $fx
-        ;;
-    "zip")
-        zip -r "$name".zip $fx
-        ;;
-esac
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/broot_jump.sh b/home-manger/lf/cmds/broot_jump.sh
deleted file mode 100644
index 188c9508..00000000
--- a/home-manger/lf/cmds/broot_jump.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-f=$(mktemp)
-res="$(broot --outcmd $f && cat $f | sed 's/cd //')"
-rm -f "$f"
-if [ -f "$res" ]; then
-    cmd="select"
-elif [ -d "$res" ]; then
-    cmd="cd"
-fi
-lf -remote "send $id $cmd \"$res\""
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/chmod.sh b/home-manger/lf/cmds/chmod.sh
deleted file mode 100644
index f6a87336..00000000
--- a/home-manger/lf/cmds/chmod.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-readp "Mode Bits: " ans
-
-for file in $fx
-do
-    chmod "$ans" "$file"
-done
-
-lf -remote 'send reload'
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/clear_trash.sh b/home-manger/lf/cmds/clear_trash.sh
deleted file mode 100644
index c02321f2..00000000
--- a/home-manger/lf/cmds/clear_trash.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-trash-empty
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/dl_file.sh b/home-manger/lf/cmds/dl_file.sh
deleted file mode 100644
index 9cb9023c..00000000
--- a/home-manger/lf/cmds/dl_file.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-# Provides the ability to download a file by dropping it into a window
-
-url=$(dragon-drop -t -x)
-
-if [ -n "$url" ]; then
-  printf "File Name: "
-  name=""
-  while [ -z $name ] || [ -e $name ]
-  do
-    read -r name
-    if [ -e "$name" ]; then
-      printf "File already exists, overwrite (y|n): "
-      read -r ans
-
-      if [ "$ans" = "y" ]; then
-        break
-      else
-        printf "File Name: "
-      fi
-    fi
-  done
-
-  # Download the file with curl
-  [ -n "$name" ] && curl -o "$name" "$url" || exit 1
-else
-  exit 1
-fi
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/dragon.sh b/home-manger/lf/cmds/dragon.sh
deleted file mode 100644
index 36e94706..00000000
--- a/home-manger/lf/cmds/dragon.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-dragon-drop -a -x "$fx"
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/dragon_individual.sh b/home-manger/lf/cmds/dragon_individual.sh
deleted file mode 100644
index abcadb13..00000000
--- a/home-manger/lf/cmds/dragon_individual.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-dragon-drop "$fx"
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/dragon_stay.sh b/home-manger/lf/cmds/dragon_stay.sh
deleted file mode 100644
index 60195d09..00000000
--- a/home-manger/lf/cmds/dragon_stay.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-dragon-drop -a "$fx"
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/fzf_jump.sh b/home-manger/lf/cmds/fzf_jump.sh
deleted file mode 100644
index 688efdb9..00000000
--- a/home-manger/lf/cmds/fzf_jump.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location')"
-if [ -f "$res" ]; then
-    cmd="select"
-elif [ -d "$res" ]; then
-    cmd="cd"
-fi
-lf -remote "send $id $cmd \"$res\""
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/help.sh b/home-manger/lf/cmds/help.sh
deleted file mode 100644
index 8fedd0ea..00000000
--- a/home-manger/lf/cmds/help.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-cat ~/.config/lf/lfrc
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/mk_dir.sh b/home-manger/lf/cmds/mk_dir.sh
deleted file mode 100644
index bfa0627d..00000000
--- a/home-manger/lf/cmds/mk_dir.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-readp "Directory Name: " ans
-mkdir $ans
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/mk_file.sh b/home-manger/lf/cmds/mk_file.sh
deleted file mode 100644
index 044016a6..00000000
--- a/home-manger/lf/cmds/mk_file.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-readp "File Name: " name
-$EDITOR "$name"
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/mk_ln.sh b/home-manger/lf/cmds/mk_ln.sh
deleted file mode 100644
index 71a70a36..00000000
--- a/home-manger/lf/cmds/mk_ln.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-while IFS= read -r i;do
-    set -- "$@" "$i"
-done < "$(tmp "cat ~/.local/share/lf/files")"
-
-mode="$1"
-shift
-
-if [ "$#" -lt 1 ]; then
-    msg "no files to link"
-    exit 0
-fi
-
-
-case "$mode" in
-    copy)
-        while [ "$#" -gt 0 ]; do
-            file=$1
-            ans="$(basename "$file")"
-
-            while ls -a "$(pwd)" | grep --word-regexp "$ans" > /dev/null;do
-                printf "\"%s\" already exists, new name for link: " "$ans"
-                read -r ans
-            done
-
-            ln -s "$file" "$(pwd)/$ans"
-
-
-            shift
-        done
-        ;;
-esac
-rm ~/.local/share/lf/files
-# lf -remote "send clear"
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/mk_scr.sh b/home-manger/lf/cmds/mk_scr.sh
deleted file mode 100644
index b6c17458..00000000
--- a/home-manger/lf/cmds/mk_scr.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-star=$(mktmp)
-cat << EOF > $star
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
-EOF
-
-readp "Script Name: " script_name
-scr="$(pwd)"/"$script_name"
-
-[ -e $scr ] && die "$script_name exitst, exiting.."
-
-cat "$star" > $scr
-chmod +x $scr
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
-
-$VISUAL $scr
diff --git a/home-manger/lf/cmds/open.sh b/home-manger/lf/cmds/open.sh
deleted file mode 100644
index 8376be21..00000000
--- a/home-manger/lf/cmds/open.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-case $(file --mime-type "$f" -bL) in
-    text/*|application/json) $EDITOR "$f";;
-    image/*) $IVIEWER "$f";;
-    *) xdg-open "$f" ;;
-esac
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/open_config.sh b/home-manger/lf/cmds/open_config.sh
deleted file mode 100644
index 93c174d7..00000000
--- a/home-manger/lf/cmds/open_config.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-$EDITOR "$(bookmenu -b ~/.config/bookmenu/configs -f fzf -o)"
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/restore_trash.sh b/home-manger/lf/cmds/restore_trash.sh
deleted file mode 100644
index 432e9e9b..00000000
--- a/home-manger/lf/cmds/restore_trash.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-trash-restore
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/set_wall_paper.sh b/home-manger/lf/cmds/set_wall_paper.sh
deleted file mode 100644
index 4599de2a..00000000
--- a/home-manger/lf/cmds/set_wall_paper.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-die "No yet implemented"
-#sed -i "s,export AWMWALLPAPER='.*',export AWMWALLPAPER='${f}'," ${ZDOTDIR}/.zshenv
-#swaybg -i "$f" &
-#feh --bg-max --no-fehbg "$f"
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/stripspace.sh b/home-manger/lf/cmds/stripspace.sh
deleted file mode 100644
index c7f68767..00000000
--- a/home-manger/lf/cmds/stripspace.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-stripspace "$f"
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/sudo_mk_file.sh b/home-manger/lf/cmds/sudo_mk_file.sh
deleted file mode 100644
index 1f06a92f..00000000
--- a/home-manger/lf/cmds/sudo_mk_file.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-readp "File Name: " ans
-sudo $EDITOR "$ans"
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/trash.sh b/home-manger/lf/cmds/trash.sh
deleted file mode 100644
index 4598b4fd..00000000
--- a/home-manger/lf/cmds/trash.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-files=$(printf "$fx" | tr '\n' ';')
-
-while [ "$files" ]; do
-    # extract the substring from start of string up to delimiter.
-    # this is the first "element" of the string.
-    file=${files%%;*}
-
-    trash-put "$(basename "$file")"
-    # if there's only one element left, set `files` to an empty string.
-    # this causes us to exit this `while` loop.
-    # else, we delete the first "element" of the string from files, and move onto the next.
-    if [ "$files" = "$file" ]; then
-        files=''
-    else
-        files="${files#*;}"
-    fi
-done
-
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manger/lf/cmds/unarchive.sh b/home-manger/lf/cmds/unarchive.sh
deleted file mode 100644
index 47a713fa..00000000
--- a/home-manger/lf/cmds/unarchive.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ~/.local/lib/shell/lib
-
-
-# extract the current file with the right command
-# (xkcd link: https://xkcd.com/1168/)
-set -f
-case "$f" in
-    *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
-    *.tar.gz|*.tgz) tar xzvf $f;;
-    *.tar.xz|*.txz) tar xJvf $f;;
-    *.zip) unzip $f;;
-    *.rar) unrar x $f;;
-    *.7z) 7z x $f;;
-    *) warning "Unsupported format" ;;
-esac
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi