Skip to content

Commit

Permalink
Merge pull request #562 from VorpalBlade/feature/completions
Browse files Browse the repository at this point in the history
Add zsh completion (issue #478)
  • Loading branch information
es20490446e authored Mar 30, 2024
2 parents 5357a56 + 6746f26 commit 6433e5c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions completion/zsh/_optimus-manager
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#compdef optimus-manager

declare -a args
args=(
'(-)'{-h,--help}'[display usage information]'
'(-)'{-V,--version}'[display version information and exit]'
'(-)--status[print current status of optimus-manager]'
'(-)--print-mode[print the GPU mode that your current desktop session is running on]'
'(-)--print-next-mode[print the GPU mode that will be used the next time you log into your session]'
'(-)--print-startup[print the GPU mode that will be used on startup]'
'--switch=[set the GPU mode to MODE, you need to log out then log in to apply the change]:mode:(integrated nvidia hybrid)'
'(--unset-temp-config)--temp-config=[set a path to a temporary configuration file to use for the next reboot ONLY]:path:_files'
'(--temp-config)--unset-temp-config[undo --temp-config (unset temp config path)]'
'--no-confirm[do not ask for confirmation and skip all warnings when switching GPUs]'
'--cleanup[remove auto-generated configuration files left over by the daemon]'
)

_arguments $args
3 changes: 2 additions & 1 deletion package/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ package() {

install -Dm644 systemd/logind/10-optimus-manager.conf "$pkgdir/usr/lib/systemd/logind.conf.d/10-optimus-manager.conf"
install -Dm755 systemd/suspend/optimus-manager.py "$pkgdir/usr/lib/systemd/system-sleep/optimus-manager.py"


install -Dm644 completion/zsh/_optimus-manager "$pkgdir/usr/share/zsh/site-functions/_optimus-manager"

install -Dm644 login_managers/sddm/20-optimus-manager.conf "$pkgdir/etc/sddm.conf.d/20-optimus-manager.conf"
install -Dm644 login_managers/lightdm/20-optimus-manager.conf "$pkgdir/etc/lightdm/lightdm.conf.d/20-optimus-manager.conf"
Expand Down

0 comments on commit 6433e5c

Please sign in to comment.