My scripts for startup, dmenu, and the command line
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

README.md 4.1 KiB

3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. - the password functions assume that logins for the same services are all
  41. stored in the same file, with each account's information seperated by an
  42. empty line. Each line containing a username begins with 'username:', each
  43. line containing a password is the first line of it's section.
  44. ## mru
  45. Used for storing file paths and their modification times in ~/.cache/mru/.
  46. When a file is opened with prompt open, it moves to the top of the home list
  47. mru [COMMAND] [CACHE]
  48. #### COMMMAND
  49. - init
  50. - update
  51. - output
  52. - list
  53. - insert [ FILE ]
  54. #### Notes
  55. - by default, it ignores hidden directories
  56. - If no cache is specified, it assumes 'home'
  57. - more cache pathes can be added by editing the cache_info variable in the
  58. source code. For last load times you may want to seperate different tasks or
  59. types of files into their own cache, i.e projects, videos, config files.
  60. - If if the file passed to `mru insert` does not exist, it is removed from the cache
  61. - You may want to run mru update at startup to add new files and cleanup hidden
  62. files in .cache/mru
  63. ### Initializing
  64. mru init
  65. ## pages
  66. pages is a command for viewing /tmp/pages-{number} files with less or zathura.
  67. The files are the result of prompt commands like `prompt search` -> Go page or
  68. can be created from your own tools. I use it for viewing local documentation
  69. quickly.
  70. ### Usage
  71. pages [ pager | pdf | browser | send ] [ NAME ]
  72. send will send stdin to the named page with the naming convention
  73. /tmp/pages-{NAME}. All other commands attempt to open the named page if it
  74. exists.
  75. #### Notes
  76. * Page names don't have to be numbers, here is an example vim Ex mode command I
  77. use to convert a markdown file to html and open it in a browser: `:!markdown
  78. % | pages send 1.html | pages browser 1.html` This could then be given it's
  79. own keybinding.
  80. #### TODO
  81. - Finish vpn and networking stuff after ini script is finished, then make sure
  82. - setup pass
  83. - variables to the script to make assumed paths easier to change
  84. - emoji select to clipboard
  85. - use attach-session -t . -c /dir for selecting multiplexer directory
  86. - ddg fill options should be taken from bookmarks or history
  87. - Make password prompts green
  88. - Figure out range selecting for parsing passwords
  89. - Figure out using dmenu instead of gnome key prompt (pinentry)
  90. what?- Consider entr in dwm-start for watching files
  91. - change xdg text/plain opener to use vim and st if not in terminal
  92. - unicode character insertion
  93. - finish editing text-opener
  94. change prompt icon to nerd icon
  95. - finish dwm patching, select window with wmctrl, then setup vpn, then maybe dmenu patches
  96. - prompt for copying files to laptop