Skip to content

Commit

Permalink
✨ Support gnome-extensions, gdbus, gsettings, dconf
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Apr 26, 2024
1 parent aa2d17f commit 3b17d41
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sources/dconf-dump.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# :fzf-tab:complete:(\\|*/|)dconf-dump:
case $group in
directory)
# https://github.com/Aloxaf/fzf-tab/issues/325
# no real toml
dconf dump $ctxt[hpre]$word | bat -ltoml
;;
esac
7 changes: 7 additions & 0 deletions sources/dconf-list.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# :fzf-tab:complete:(\\|*/|)dconf-list:
case $group in
directory)
# https://github.com/Aloxaf/fzf-tab/issues/325
dconf list $ctxt[hpre]$word
;;
esac
6 changes: 6 additions & 0 deletions sources/dconf.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)dconf(|-help):
case $group in
command)
dconf help $word | bat -lhelp
;;
esac
4 changes: 4 additions & 0 deletions sources/gdbus.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# :fzf-tab:complete:(\\|*/|)gdbus:
# FIXME: strip trailing whitespaces
word=${word%% }
[[ $word != -* ]] && gdbus $word --help
6 changes: 6 additions & 0 deletions sources/gnome-extensions.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)gnome-extensions:
if [[ $word == *@* ]]; then
gnome-extensions show $word | bat -lyaml
else
gnome-extensions help $word 2>&1 | bat -lhelp
fi
6 changes: 6 additions & 0 deletions sources/gsettings-list-children.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)gsettings-list-children:
case $group in
schema)
gsettings list-children $word
;;
esac
6 changes: 6 additions & 0 deletions sources/gsettings-list-keys.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)gsettings-list-keys:
case $group in
schema)
gsettings list-keys $word
;;
esac
6 changes: 6 additions & 0 deletions sources/gsettings-list-recursively.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)gsettings-list-recursively:
case $group in
schema)
gsettings list-recursively $word
;;
esac
6 changes: 6 additions & 0 deletions sources/gsettings.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)gsettings(|-help):
case $group in
command)
gsettings help $word | bat -lhelp
;;
esac

0 comments on commit 3b17d41

Please sign in to comment.