From e02304f014645a01ef6cdd40276997dea58504d9 Mon Sep 17 00:00:00 2001 From: Vikas Kushwaha Date: Fri, 10 Jan 2025 15:08:05 +0530 Subject: Cleaning up 'bin' folder. --- .local/bin/shorts/ec | 5 +++++ .local/bin/shorts/qr | 4 ++++ .local/bin/shorts/refcitx | 5 +++-- .local/bin/shorts/sync-server | 12 ------------ .local/bin/shorts/syncdrive | 3 --- .local/bin/shorts/synchs | 7 ------- .local/bin/shorts/synctab | 19 ------------------- .local/bin/shorts/syslogcat | 3 +++ .local/bin/shorts/xprint | 4 ++-- 9 files changed, 17 insertions(+), 45 deletions(-) create mode 100755 .local/bin/shorts/ec create mode 100755 .local/bin/shorts/qr delete mode 100755 .local/bin/shorts/sync-server delete mode 100755 .local/bin/shorts/syncdrive delete mode 100755 .local/bin/shorts/synchs delete mode 100755 .local/bin/shorts/synctab create mode 100755 .local/bin/shorts/syslogcat (limited to '.local/bin/shorts') diff --git a/.local/bin/shorts/ec b/.local/bin/shorts/ec new file mode 100755 index 0000000..bc6e7d5 --- /dev/null +++ b/.local/bin/shorts/ec @@ -0,0 +1,5 @@ +#!/bin/sh + +# edit-clipboard: edit the content of clipboard + +xclip -sel clip -o >/tmp/clipboard && nvim /tmp/clipboard && xclip -sel clip -i /tmp/clipboard diff --git a/.local/bin/shorts/qr b/.local/bin/shorts/qr new file mode 100755 index 0000000..4203e71 --- /dev/null +++ b/.local/bin/shorts/qr @@ -0,0 +1,4 @@ +#!/bin/sh + +qrencode "$@" -o /tmp/qr.png +${OPENER:-xdg-open} /tmp/qr.png diff --git a/.local/bin/shorts/refcitx b/.local/bin/shorts/refcitx index 668952c..1d104bf 100755 --- a/.local/bin/shorts/refcitx +++ b/.local/bin/shorts/refcitx @@ -1,7 +1,8 @@ #!/bin/sh -notify-send "Starting Fcitx..." +id="$(notify-send --print-id "Starting Fcitx...")" fcitx sleep 1 remap -notify-send "Fcitx Started" +fcitx-remote -t +notify-send --replace-id="$id" "✅ Fcitx Started" diff --git a/.local/bin/shorts/sync-server b/.local/bin/shorts/sync-server deleted file mode 100755 index 641db9c..0000000 --- a/.local/bin/shorts/sync-server +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -sshadd "$HOME/.ssh/${1}_id_ed25519" -sync() { rsync -PRru --delete --exclude "*.git" "$@"; } - -sync \ - "${XDG_CONFIG_HOME:-$HOME/.config}/./vim/vimrc" \ - "${XDG_CONFIG_HOME:-$HOME/.config}/./tmux/tmux.conf" \ - "${XDG_CONFIG_HOME:-$HOME/.config}/./shell/aliasrc" \ - "${XDG_CONFIG_HOME:-$HOME/.config}/./shell/inputrc" \ - "${XDG_CONFIG_HOME:-$HOME/.config}/./shell/server.profile" \ - "${1}:.config" diff --git a/.local/bin/shorts/syncdrive b/.local/bin/shorts/syncdrive deleted file mode 100755 index 3d010cc..0000000 --- a/.local/bin/shorts/syncdrive +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -rclone -v sync --delete-excluded --exclude=".git/**" ~/GDrive gdrive: diff --git a/.local/bin/shorts/synchs b/.local/bin/shorts/synchs deleted file mode 100755 index 244dd48..0000000 --- a/.local/bin/shorts/synchs +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -sync-server rpi - -# rsync -u ~/.config/lf/lfrc /tmp/lfrc -# sed -i '/set icons/d' /tmp/lfrc -# rsync -Pu /tmp/lfrc rpi:.config/lf/ diff --git a/.local/bin/shorts/synctab b/.local/bin/shorts/synctab deleted file mode 100755 index 1e44419..0000000 --- a/.local/bin/shorts/synctab +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -sshadd ~/.ssh/tab_id_ed25519 -sync() { rsync -Pru --delete --exclude "*.git" "$@"; } - -sync ~/GDrive/ tab:GDrive/ -sync "${XDG_VIDEOS_DIR:-$HOME/Videos}" tab:Videos/ - -sync -R \ - "${XDG_DOCUMENTS_DIR:-$HOME/Documents}/./allreader" \ - "${XDG_DOCUMENTS_DIR:-$HOME/Documents}/./latex" \ - "${XDG_DOCUMENTS_DIR:-$HOME/Documents}/./Notes/bookmarks.txt" \ - tab:Documents/ - -sync \ - "${XDG_MUSIC_DIR:-$HOME/Music}/Piano" \ - "${XDG_MUSIC_DIR:-$HOME/Music}/Devotional" \ - tab:Music/ - diff --git a/.local/bin/shorts/syslogcat b/.local/bin/shorts/syslogcat new file mode 100755 index 0000000..c9763c7 --- /dev/null +++ b/.local/bin/shorts/syslogcat @@ -0,0 +1,3 @@ +#!/bin/sh + +awk '{ printf "%s: %s\n", FILENAME, $0 }' /var/log/*/current | sort -k2 | less +G -X diff --git a/.local/bin/shorts/xprint b/.local/bin/shorts/xprint index 12156f2..74fc666 100755 --- a/.local/bin/shorts/xprint +++ b/.local/bin/shorts/xprint @@ -2,7 +2,7 @@ [ -n "$TERMUX_VERSION" ] && { termux-clipboard-get; exit; } -xclip -out -selection clipboard 2>/dev/null || -xclip -out -selection secondry 2>/dev/null || xclip -out -selection primary 2>/dev/null || +xclip -out -selection secondry 2>/dev/null || +xclip -out -selection clipboard 2>/dev/null || notify-send "Selection and clipboard is empty" -- cgit v1.2.3