Просмотр исходного кода

Try displaying info with zathura

master
= 3 лет назад
Родитель
Сommit
f92d2f5971
2 измененных файлов: 20 добавлений и 6 удалений
  1. +9
    -1
      README.md
  2. +11
    -5
      prompt

+ 9
- 1
README.md Просмотреть файл

@@ -3,6 +3,9 @@
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 enscript ghostscript ps2pdf zathura suckless-tools`

## Prompt
mpc dmenu scrot xclip tmux vim lbry pass dunst
They're all optional but missing commands may have unexpeted side effects. The scripts also assumes you have the common commands in GNU core utilities like sed, awk, etc.
@@ -13,9 +16,14 @@ They're all optional but missing commands may have unexpeted side effects. The s
- all scripts assume your prefered terminal is [ st ](http://st.suckless.org)
- mpc is for media controls
- the script assumes your passwords are in ~/Passwords/
- commands that display information from man pages, godoc, logs, etc
do it using `enscript -p - | ps2pdf - | zathura -`. I'm considering
more minimal combinations like enscript and surf or st and less but
they create their own set of problems. This solution makes future
changes easy without becoming too complicated

### Usage
prompt [launch | action | cmd | ddg | pass]
prompt [launch | action | cmd | ddg | pass | manual]
edit-ini ...
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.



+ 11
- 5
prompt Просмотреть файл

@@ -151,15 +151,21 @@ godoc() {
manual() {
search=$(printf '' | dmenu -p 'manual')
result=$(man "$search")
printf "$result" | zathura -
# notify-send -u low -t 0 "Manual" "$result"
printf "$result" | enscript -p - | ps2pdf - | zathura -
}

goinfo() {
#Maybe this can also show recent searches
search=$(printf '' | dmenu -p 'goinfo')
result=$(go doc "$search")
notify-send -u low -t -1 "Go documentation" "$result"
search=$(printf "Window\nNotify" | dmenu -p 'goinfo')
case $search in
Window) search=$(printf '' | dmenu -p 'goinfo'); result=$(go doc "$search"); infowindow "$result"; exit;;
Notify) search=$(printf '' | dmenu -p 'goinfo'); result=$(go doc "$search"); notify-send -u low -t 0 "Go documentation" "$result"; exit;;
esac
result=$(go doc "$search"); notify-send -u low -t 0 "Go documentation" "$result";
}

infowindow() {
printf "$1" | enscript -p - | ps2pdf - | zathura -
}

cmd() {


Загрузка…
Отмена
Сохранить