|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
-
- # Macros
- 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.
-
- ### Installing dependencies
- `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.
-
- - [ dmenu ](http://tools.suckless.org/dmenu/) is for the prompts. It can be
- changed to rofi or some other solution
- - scrot and xclip for screenshots
- - all scripts assume your prefered terminal is [ st ](http://st.suckless.org)
- - mpc is for media controls
- - zathura, ghostscript, and enscript are an aesthetic option for viewing man
- pages and command outputs as document files rather than terminal output
-
- ## prompt
- The central script that gives the rest of the features interactivity. Read
- the source code for more details.
- ### Usage
- prompt [ COMMAND ]
-
- #### COMMANDS
- * launch
- * action
- * cmd
- * cmd_clip
- * search
- * username
- * password
- * other_password
- * edit_password
- * open
- * edit
-
- most functionality is accessible from launch and action only
-
- ### Notes
- * The download action uses youtube-dl to download whatever is in the keyboard
- to ~/Downloads/tmp
- * You may want to bind Mod4+a to `launch action` and Mod4+g to `prompt launch`
- * Some prompts like `search package` will infer with their default operation
- when the string entered is an invalid selection
-
- ## mru
- Used for storing file paths and their modification times in ~/.cache/mru. It
- doesn't actually implement a caching algorithm using hit rate but it may be
- added in the future.
- mru [COMMAND] [CACHE]
-
- #### COMMMAND
- - init
- - update
- - output
- - list
- - insert [ FILE ]
-
- #### Notes
- - If no cache is specified, it assumes 'home'
- - If if the file passed to insert does not exist, it is removed from the cache
-
- ### Initializing
- mru init; mru create home $HOME all
-
- ## pages
- pages is a command for viewing /tmp/pages-{number} files with less or zathura.
- The files are the result of prompt commands like `prompt action` -> Go page or
- can be created from your own tools. I use it for viewing documentation.
-
- ### Usage
- 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.
-
- #### Notes
- * Page names don't have to be numbers, here is an example vim Ex mode command I
- use to convert a markdown file to html and open it in a browser: `:!markdown
- % | pages send 1.html | pages browser 1.html` This could then be given it's
- own keybinding.
- Use it to automagically select and run terminal applications, send signals to
- daemons, execute arbitrary commands, search the web, grab passwords from the
- password manager, and more.
-
- #### TODO
- - Finish vpn and networking stuff after ini script is finished, then make sure
- - maybe add an mru ranking alrogithm in the future
- printf in case goes to stderror which is shown in bar
- - Add ddg search prompt
- - setup pass
- - variables to the script to make assumed paths easier to change
- - show script for man pages, pkg info, and other things
- - command to clipboard
- - emoji select to clipboard
- - system of additional clipboards using /tmp files
- - use attach-session -t . -c /dir for selecting multiplexer directory
- - ddg fill options should be taken from bookmarks or history
- - Make password prompts green
- - Figure out range selecting for parsing passwords
- - Figure out using dmenu instead of gnome key prompt
- - Consider entr in dwm-start for watching files
- - make dmenu load time more like fzf?
- - change xdg text/plain opener to use vim and st if not in terminal
|