Add command to launcher to nix run
This commit is contained in:
parent
13b006c4ce
commit
c2cb2c2fb6
2 changed files with 10 additions and 9 deletions
|
@ -33,6 +33,7 @@ let
|
||||||
jq
|
jq
|
||||||
kitty
|
kitty
|
||||||
libqalculate
|
libqalculate
|
||||||
|
nix
|
||||||
pass
|
pass
|
||||||
slurp
|
slurp
|
||||||
sway
|
sway
|
||||||
|
|
|
@ -27,6 +27,14 @@ emoji() {
|
||||||
@sway@/bin/swaymsg exec -- "echo -n $char | @wlClipboard@/bin/wl-copy --foreground"
|
@sway@/bin/swaymsg exec -- "echo -n $char | @wlClipboard@/bin/wl-copy --foreground"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nrun_options() {
|
||||||
|
echo "nrun "
|
||||||
|
}
|
||||||
|
|
||||||
|
nrun() {
|
||||||
|
@sway@/bin/swaymsg exec -- @nix@/bin/nix run nixpkgs\#$1
|
||||||
|
}
|
||||||
|
|
||||||
pass_options(){
|
pass_options(){
|
||||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||||
password_files=( "$prefix"/**/*.gpg )
|
password_files=( "$prefix"/**/*.gpg )
|
||||||
|
@ -81,14 +89,6 @@ run() {
|
||||||
@sway@/bin/swaymsg exec $1
|
@sway@/bin/swaymsg exec $1
|
||||||
}
|
}
|
||||||
|
|
||||||
ssh_options() {
|
|
||||||
cat $HOME/.ssh/config | grep "^Host [a-zA-Z]\+" | sed "s/Host /ssh /"
|
|
||||||
}
|
|
||||||
|
|
||||||
ssh() {
|
|
||||||
@sway@/bin/swaymsg exec "@kitty@/bin/kitty -e ssh $1"
|
|
||||||
}
|
|
||||||
|
|
||||||
systemctl_options() {
|
systemctl_options() {
|
||||||
echo systemctl hibernate
|
echo systemctl hibernate
|
||||||
echo systemctl poweroff
|
echo systemctl poweroff
|
||||||
|
@ -105,7 +105,7 @@ windows() {
|
||||||
@sway@/bin/swaymsg \[con_id="$window"\] focus
|
@sway@/bin/swaymsg \[con_id="$window"\] focus
|
||||||
}
|
}
|
||||||
|
|
||||||
CHOSEN=$(cat <(windows_options) <(ssh_options) <(systemctl_options) <(pass_options) <(run_options) <(record_options) <(calc_options) <(emoji_options) | @fzy@/bin/fzy --lines 40 | tail -n1)
|
CHOSEN=$(cat <(windows_options) <(systemctl_options) <(pass_options) <(nrun_options) <(run_options) <(record_options) <(calc_options) <(emoji_options) | @fzy@/bin/fzy --lines 40 | tail -n1)
|
||||||
|
|
||||||
if [ -n "$CHOSEN" ]
|
if [ -n "$CHOSEN" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue