My scripts for startup, dmenu, and the command line
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.8 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Macros
  2. This is a collection of scripts I use to make managing files and processes easier.
  3. 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.
  4. ### Installing dependencies
  5. `sudo apt install pass enscript dunst xclip scrot mpc mpd ghostscript zathura
  6. suckless-tools youtube-dl`
  7. All of them are optional except suckless-tools. Many of the features aren't
  8. interdependent and are made up of 1 or 2 functions.
  9. - [ dmenu ](http://tools.suckless.org/dmenu/) is for the prompts. It can be
  10. changed to rofi or some other solution
  11. - scrot and xclip for screenshots
  12. - all scripts assume your prefered terminal is [ st ](http://st.suckless.org)
  13. - mpc is for media controls
  14. - zathura, ghostscript, and enscript are an aesthetic option for viewing man
  15. pages and command outputs as document files rather than terminal output
  16. ## prompt
  17. The central script that gives the rest of the features interactivity. Read
  18. the source code for more details.
  19. ### Usage
  20. prompt [ COMMAND ]
  21. #### COMMANDS
  22. * launch
  23. * action
  24. * cmd
  25. * cmd_clip
  26. * search
  27. * username
  28. * password
  29. * other_password
  30. * edit_password
  31. * open
  32. * edit
  33. most functionality is accessible from launch and action only
  34. ### Notes
  35. * The download action uses youtube-dl to download whatever is in the keyboard
  36. to ~/Downloads/tmp
  37. * You may want to bind Mod4+a to `launch action` and Mod4+g to `prompt launch`
  38. * Some prompts like `search package` will infer with their default operation
  39. when the string entered is an invalid selection
  40. ## mru
  41. Used for storing file paths and their modification times in ~/.cache/mru. It
  42. doesn't actually implement a caching algorithm using hit rate but it may be
  43. added in the future.
  44. mru [COMMAND] [CACHE]
  45. #### COMMMAND
  46. - init
  47. - update
  48. - output
  49. - list
  50. - insert [ FILE ]
  51. #### Notes
  52. - If no cache is specified, it assumes 'home'
  53. - If if the file passed to insert does not exist, it is removed from the cache
  54. ### Initializing
  55. mru init; mru create home $HOME all
  56. ## pages
  57. pages is a command for viewing /tmp/pages-{number} files with less or zathura.
  58. The files are the result of prompt commands like `prompt action` -> Go page or
  59. can be created from your own tools. I use it for viewing documentation.
  60. ### Usage
  61. pages [ pager | pdf | browser | send ] [ NAME ]
  62. send will send stdin to the named page with the naming convention
  63. /tmp/pages-{NAME}. All other commands attempt to open the named page if it
  64. exists.
  65. #### Notes
  66. * Page names don't have to be numbers, here is an example vim Ex mode command I
  67. use to convert a markdown file to html and open it in a browser: `:!markdown
  68. % | pages send 1.html | pages browser 1.html` This could then be given it's
  69. own keybinding.
  70. Use it to automagically select and run terminal applications, send signals to
  71. daemons, execute arbitrary commands, search the web, grab passwords from the
  72. password manager, and more.
  73. #### TODO
  74. - Finish vpn and networking stuff after ini script is finished, then make sure
  75. - maybe add an mru ranking alrogithm in the future
  76. printf in case goes to stderror which is shown in bar
  77. - Add ddg search prompt
  78. - setup pass
  79. - variables to the script to make assumed paths easier to change
  80. - show script for man pages, pkg info, and other things
  81. - command to clipboard
  82. - emoji select to clipboard
  83. - system of additional clipboards using /tmp files
  84. - use attach-session -t . -c /dir for selecting multiplexer directory
  85. - ddg fill options should be taken from bookmarks or history
  86. - Make password prompts green
  87. - Figure out range selecting for parsing passwords
  88. - Figure out using dmenu instead of gnome key prompt
  89. - Consider entr in dwm-start for watching files
  90. - make dmenu load time more like fzf?
  91. - change xdg text/plain opener to use vim and st if not in terminal