Immanuel Onyeka 4151f23339 | před 3 roky | |
---|---|---|
.gitignore | před 4 roky | |
README.md | před 3 roky | |
configure | před 3 roky | |
conveniently | před 3 roky | |
dwm-start | před 3 roky | |
dwm-statusbar | před 4 roky | |
edit-ini | před 4 roky | |
ewrap | před 3 roky | |
lsix | před 4 roky | |
mru | před 3 roky | |
music_player | před 3 roky | |
pages | před 4 roky | |
pinentry | před 4 roky | |
prompt | před 3 roky | |
setup-xbindkeys | před 4 roky | |
splitchapters | před 3 roky | |
t2p.c | před 3 roky | |
textopener | před 3 roky |
This is a collection of scripts I use to make managing files and processes easier. Use it to automagically select and run terminal applications, send signals to daemons, execute arbitrary commands, search the web, grab passwords from a password manager, and more.
sudo apt install pass enscript dunst xclip scrot mpc mpd ghostscript zathura suckless-tools youtube-dl
All of them are optional except suckless-tools. Many of the features aren’t interdependent and are made up of 1 or 2 functions.
The central script that gives the rest of the features interactivity. Read the source code for more details.
prompt [ COMMAND ]
most functionality is accessible from launch and action only
prompt action
and prompt launch
search package
will infer with their default operation
when the string entered is an invalid selectionUsed for storing file paths and their modification times in ~/.cache/mru/. When a file is opened with prompt open, it moves to the top of the home list. I wrote it because locate was too limiting.
mru [COMMAND] [CACHE]
`mru init; mru update; mru updatedirs`
mru insert
does not exist, it is removed from the cachealias cdz='cd $((mru listdirs | fzf --height=50%) || printf ".")'
mru init
pages is a command for viewing /tmp/pages-{number} files with st or zathura.
The files are the result of prompt commands like prompt search
-> Go page or
can be created from your own scripts. I use it for viewing local documentation
quickly.
pages [ pager | pdf | browser | send ] [ NAME ]
send will send stdin to the named page with the naming convention /tmp/pages-{NAME}. All other commands attempt to open the named page if it exists.
:!markdown % | pages send 1.html | pages browser 1.html
This could be given it’s own keybinding.The prompt’s rawurlencode function makes it easy to create new search functions for any website or service. Append the output of a call to rawurlencode to the site’s search prefix, then pass the resulting string to an application like lynx or brave-browser. No need for installing packages or directories of config files.
Example:
firefox "html.duckduckgo.com/html?q=$(rawurlencode "$1")"