allow running templated scripts

This commit is contained in:
lelgenio 2020-10-20 13:54:12 -03:00
parent f1e0b1977a
commit 2c91ad91c9
2 changed files with 42 additions and 6 deletions

View File

@ -19,15 +19,46 @@ end
# s selected
# sc scrollbar
set -l fn "{{@@ font.mono @@}} 12"
set -l tb "{{@@ color.bg @@}}"
set -l tf "{{@@ color.accent @@}}"
set -l fb "{{@@ color.bg @@}}"
set -l ff "{{@@ color.txt @@}}"
set -l nb "{{@@ color.bg @@}}"
set -l nf "{{@@ color.txt @@}}"
set -l hb "{{@@ color.bg_light @@}}"
set -l hf "{{@@ color.accent @@}}"
#{%@@ if False @@%}#
# Hacks to allow runnning even if not templated
set -l fn "Fira Code 12"
set -l tf "#D9534F"
set -l tb "#202020"
set -l ff "#ffffff"
set -l fb "#202020"
set -l nf "#ffffff"
set -l nb "#202020"
set -l hf "#D9534F"
set -l hb "#404040"
#{%@@ endif @@%}#
bemenu \
--ignorecase\
--bottom\
--no-overlap\
--list 20\
--prefix '->'\
--fn "{{@@ font.mono @@}} 12"\
--tb "{{@@ color.bg @@}}" --tf "{{@@ color.accent @@}}" \
--fb "{{@@ color.bg @@}}" --ff "{{@@ color.txt @@}}" \
--nb "{{@@ color.bg @@}}" --nf "{{@@ color.txt @@}}" \
--hb "{{@@ color.bg_light @@}}" --hf "{{@@ color.accent @@}}" \
--fn "$fn"\
--tb "$tb" --tf "$tf" \
--fb "$fb" --ff "$ff" \
--nb "$nb" --nf "$nf" \
--hb "$hb" --hf "$hf" \
$argv

View File

@ -2,6 +2,11 @@
shopt -s nullglob globstar
INSERTKEY="{{@@ key.insertMode @@}}"
#{%@@ if False @@%}#
INSERTKEY="i"
#{%@@ endif @@%}#
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
@ -25,7 +30,7 @@ autotype(){
if [ $(swaymsg -t get_tree | jq -r '.. | select(.focused? == true).app_id') = "org.qutebrowser.qutebrowser" ]
then
ydotool --delay 1 key esc
ydotool --delay 1 key {{@@ key.insertMode @@}}
ydotool --delay 1 key "$INSERTKEY"
fi
ydotool type --delay 100 "$username"
ydotool key tab