PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: _localectl Size: 3.50 KB
//usr/share/zsh/site-functions/_localectl

#compdef localectl
# SPDX-License-Identifier: LGPL-2.1+

_localectl_set-locale() {
    local -a _locales locale_fields
    locale_fields=(LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME \
                   LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER \
                   LC_NAME LC_ADDRESS LC_TELEPHONE \
                   LC_MEASUREMENT LC_IDENTIFICATION)
    # LC_ALL is omitted on purpose

    local expl suf
    _locales=( ${(f)"$(_call_program locales "$service" list-locales)"} )
    compset -P1 '*='
    if [[ -prefix 1 *\= ]]; then
        local conf=${PREFIX%%\=*}
        _wanted locales expl "locales configs" \
            _combination localeconfs  confs=$conf locales "$@" -
    else
        compadd -S '=' $locale_fields
    fi
}

_localectl_set-keymap() {
    local -a _keymaps
    if (( CURRENT <= 3 )); then
        _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
        _describe keymaps _keymaps
    else
        _message "no more options"
    fi
}

_localectl_set-x11-keymap() {
    if (( $+commands[pkg-config] )); then
        local -a _file _layout _model _variant _options
        local _xorg_lst
        _xorg_lst=${"$($commands[pkg-config] xkeyboard-config --variable=xkb_base)"}
        _file=( ${(ps:\n\!:)"$(<$_xorg_lst/rules/xorg.lst)"} )
        _layout=( ${${${(M)${(f)_file[2]}:#  *}#  }%% *} )
        _model=( ${${${(M)${(f)_file[1]}:#  *}#  }%% *} )
        _variant=( ${${${(M)${(f)_file[3]}:#  *}#  }%% *} )
        _options=( ${${${(M)${(f)_file[4]}:#  *}#  }%% *} )
        #_layout=( ${(f)"$( echo $_file[1] | awk '/^  / {print $1}' )"} )
        #_model=( ${(f)"$(echo $_file[2] | awk '/^  / {print $1}')"} )
        #_variant=( ${(f)"$(echo $_file[3] | awk '/^  / {print $1}')"} )
        #_options=( ${(f)"$(echo ${_file[4]//:/\\:} | awk '/^  / {print $1}')"} )

        case $CURRENT in
            2) _describe layouts _layout ;;
            3) _describe models _model;;
            4) _describe variants _variant;;
            5) _describe options _options;;
            *) _message "no more options"
        esac
    fi
}

_localectl_command() {
    local -a _localectl_cmds
    _localectl_cmds=(
        'status:Show current locale settings'
        'set-locale:Set system locale'
        'list-locales:Show known locales'
        'set-keymap:Set virtual console keyboard mapping'
        'list-keymaps:Show known virtual console keyboard mappings'
        'set-x11-keymap:Set X11 keyboard mapping'
        'list-x11-keymap-models:Show known X11 keyboard mapping models'
        'list-x11-keymap-layouts:Show known X11 keyboard mapping layouts'
        'list-x11-keymap-variants:Show known X11 keyboard mapping variants'
        'list-x11-keymap-options:Show known X11 keyboard mapping options'
    )
    if (( CURRENT == 1 )); then
        _describe -t commands 'localectl command' _localectl_cmds
    else
        local curcontext="$curcontext"
        cmd="${${_localectl_cmds[(r)$words[1]:*]%%:*}}"
        if (( $+functions[_localectl_$cmd] )); then
            _localectl_$cmd
        else
            _message "unknown localectl command: $words[1]"
        fi
    fi
}

_arguments \
    {-h,--help}'[Show this help]' \
    '--version[Show package version]' \
    "--no-convert[Don't convert keyboard mappings]" \
    '--no-pager[Do not pipe output into a pager]' \
    '--no-ask-password[Do not prompt for password]' \
    {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
    {-M+,--machine=}'[Operate on local container]:machine' \
    '*::localectl commands:_localectl_command'

Directory Contents

Dirs: 0 × Files: 23

Name Size Perms Modified Actions
1.08 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
2.99 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
1.54 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
13.02 KB lrw-r--r-- 2025-12-18 14:22:08
Edit Download
2.22 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
5.83 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
651 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
3.50 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
5.67 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
116 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
355 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
289 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
255 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
15.24 KB lrw-r--r-- 2026-01-26 09:29:55
Edit Download
3.75 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
2.99 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
564 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
1.04 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
2.28 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
3.06 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
736 B lrw-r--r-- 2018-06-22 11:11:49
Edit Download
1.99 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download
5.86 KB lrw-r--r-- 2018-06-22 11:11:49
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI