From de0e31d5434b57cc32c34b84fff8d20568fa3661 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 18 Jan 2021 22:05:01 -0500 Subject: [PATCH] Add more terminal applications --- README.md | 1 + dwm-start | 2 +- mru | 4 ++++ prompt | 46 +++++++++++++++++++++++++++++++++------------- 4 files changed, 39 insertions(+), 14 deletions(-) create mode 100755 mru diff --git a/README.md b/README.md index 29b8170..8447bad 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,4 @@ Use it to automagically select and run terminal applications, send signals to da - Make password prompts green - Figure out range selecting for parsing passwords - Figure out using dmenu instead of gnome key prompt +- Give launched st windows better naming diff --git a/dwm-start b/dwm-start index f45ff7f..aa16272 100755 --- a/dwm-start +++ b/dwm-start @@ -13,7 +13,7 @@ do then csum=$new_csum dwm-statusbar & - dwm.winkey + dwm else exit 0 fi diff --git a/mru b/mru new file mode 100755 index 0000000..b2b349f --- /dev/null +++ b/mru @@ -0,0 +1,4 @@ +#!/bin/sh + + + diff --git a/prompt b/prompt index 4a21208..a3842ee 100755 --- a/prompt +++ b/prompt @@ -13,46 +13,66 @@ launch() { Chat Music Browser + Hidden browser + Manual Email + Page + Define + Package search + Package info Processes" | tr -d '\t' | dmenu -i -p "Launcher") case $app in - Notes) st -e vim "+cd ~/Notes/text" "+CtrlP";; - Files) st -e sh -lc nnn;; - Editor) st -e vim;; - Terminal) st;; - Multiplexer) st -e tmux $*;; + Notes) st -t "Notes" -e vim "+cd ~/Notes/text" "+CtrlP";; + Files) st -t "Files" -e sh -lc nnn;; + Editor) st -t "Editor" -e vim;; + Terminal) st -t "Terminal";; + Page) pages pager "$(printf "1\n2\n3\n" | dmenu -p 'page')";; + Manual) st -e man "$(printf "" | dmenu -p 'man')";; + Multiplexer) st -t "Multiplexer" -e tmux attach || st -t "Multiplexer" -e tmux;; LBRY) lbry;; Chat) element-desktop;; - Music) st -e ncmpcpp;; + Music) st -t "Music" -e ncmpcpp;; Browser) $browser_cmd;; + 'Hidden browser') $browser_cmd --incognito;; Email) $browser_cmd mail.protonmail.com/login;; - Processes) st -e htop;; + 'Define') word=$(printf '' | dmenu -p 'word'); st -e sh -lc "dict \"$word\" | less";; + 'Package search')s=$(printf '' | dmenu -p 'name'); if [ -z "$s" ]; then exit; fi; st -t "Package $s" -e sh -lc "apt search $s | less";; + 'Package info')s=$(printf '' | dmenu -p 'name'); if [ -z "$s" ]; then exit; fi; st -t "Package $s" -e sh -lc "apt show $s | less";; + Processes) st -t "Processes" -e htop;; esac } +editor() { + type=$(printf "Recent\nProjects\nSource\nConfigs\nMacros" | dmenu -i -p 'edit what?') +} + +#Opening all mru files, not just for editing +opener() { + sdfs +} + action() { - action=$(printf "Play Music + action=$(printf "Toggle Music Pause Music - Toggle Music + Play Music Go page Command Command to clipboard Search github Search ddg Search godoc - Open page Select VPN Disable VPN Enable VPN VPN Status Rebind Keys Disable Bar - Man Password Username Alternate password + Download Enable Bar" | tr -d '\t' | dmenu -i -p "Actions") @@ -66,13 +86,13 @@ case $action in 'Search github') github;; 'Search godoc') godoc;; 'Search ddg') ddg;; - 'Open page') pages pager "$(printf "1\n2\n3\n" | dmenu -p 'page')";; 'Command') cmd;; 'Command to clipboard') cmd_clip;; 'Username') username;; 'Password') password;; 'Alternate password') other_password;; - 'Man') st -e man "$(printf "" | dmenu -p 'man')";; + #This should check for an error code and confirm that download has started + 'Download') youtube-dl --no-progress -o "$HOME/Downloads/tmp/%(title)s.%(ext)s" "$(xclip -selection clipboard -o)"; notify-send -u low -t 3000 "Download complete";; 'Go page') num=$(go_page); pages pager $num;; esac }