summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-09-06 08:59:31 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-09-06 08:59:31 +0300
commit7fdabfc177106f0b005c512cb52e52505a58ed7b (patch)
tree03c2129ad91bed6342521e8cd6053cfe958bab88
parentd3f2c801c39d42726c0cff4f9fd005664f87b26c (diff)
downloaddotfiles-7fdabfc177106f0b005c512cb52e52505a58ed7b.tar
dotfiles-7fdabfc177106f0b005c512cb52e52505a58ed7b.tar.gz
dotfiles-7fdabfc177106f0b005c512cb52e52505a58ed7b.zip
(1) Added zsh function for launching desktop applications
-rw-r--r--.zshrc16
1 files changed, 15 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index fded803..7e70c8f 100644
--- a/.zshrc
+++ b/.zshrc
@@ -325,6 +325,8 @@ if [[ -x "$(command -v vimx)" ]]; then
}
fi
+
+
mexec () {
for cmd in "${@[@]}"; do
if ! [ -z "$cmd" ]; then
@@ -342,7 +344,7 @@ mcd () {
}
bgr () {
- nohup $@ 2>&1 &
+ nohup sh -c "$@" 2>&1 &
disown
}
@@ -351,4 +353,16 @@ res () {
bgr $@
}
+dela () {
+ name=$1
+ if [[ ${name:0:1} != "/" ]]; then
+ name="/usr/share/applications/${name}"
+ fi
+ if [[ ! $name =~ .desktop$ ]]; then
+ name+=".desktop"
+ fi
+ comm=($(awk -F= '$1=="Exec"{$1=""; print}' "$name"))
+ bgr "$comm"
+}
+
bindkey '^H' backward-kill-word