My scripts for startup, dmenu, and the command line
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
= ada35e3d44 Add mru code and reformat readme 3年前
.gitignore Create utility functions for managing backups 4年前
README.md Add mru code and reformat readme 3年前
backup :q 4年前
bar.sh :q 4年前
cvpn statusbar and dwm improvements 4年前
dwm-start Add more terminal applications 3年前
dwm-statusbar Removed brightness and volume from statusbar 4年前
edit-ini Added INI editor 3年前
ewrap Move launcher and actions to prompt script 3年前
lsix :q 4年前
mru Add mru code and reformat readme 3年前
pages Add mru code and reformat readme 3年前
prompt Add mru code and reformat readme 3年前
screenshot.sh :q 4年前
setup-xbindkeys Make app launchers 3年前
syn.sh statusbar and dwm improvements 4年前
util util flag changes 4年前
util-audio statusbar and dwm improvements 4年前

README.md

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 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
  • 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
  • github
  • godoc
  • ddg
  • manual
  • username
  • password
  • other_password
  • edit_password
  • open
  • edit

Generaly, prompt has two types of commands, launch commands and action commands. Launch commands are used to open applications, manual pages, or spawn other windows. Action commands modify daemons or read/write th the clipboard. This means that prompt launch and prompt action are the only important subcommands because they will prompt for all the rest.

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

mru

Used for indexing and ranking frequently accessed files to ~/.cache/mru mru [COMMAND] [CACHE]

COMMMAND

  • init
  • update
  • output
  • list

If no cache is specified, it assumes ‘home’

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 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, inotifywait, auditctl, or find -atime for MRU
  • setup xdg-open. Need it for opener and editors