更改「Mate Panel」的「Layout」/ By mate-panel

主題

其他方式

其他方式
By dconf
By mate-tweak

範例腳本

範例腳本

Mate Panel Layouts

Mate Panel 內建的 Layout
/usr/share/mate-panel/layouts
我個人撰寫的 Mate Panel Layout
/usr/share/mate-panel/layouts

執行

ls /usr/share/mate-panel/layouts/*.layout | awk -F '/' '{printf $6"\n"}' | awk -F '.layout' '{printf $1"\n"}'

顯示

brisk-menu-stand-alone-bottom
brisk-menu-stand-alone-top
classic-menu-stand-alone-bottom
classic-menu-stand-alone-top
default
fedora
linuxmint
mageia
mate-menu-stand-alone-bottom
mate-menu-stand-alone-top
opensuse
stand-alone-bottom
stand-alone-top
ubuntu

By mate-panel

範例腳本

本來預期採用下面三行的流程,不過不是每次都會成功。

mate-panel --reset

mate-panel --layout 'default'

mate-panel --replace &

於是改為下面三行的流程,就可以正常運行

舉例:執行下面指令,將「Mate Panel Layout」改成「default」。

mate-panel --reset

dconf write /org/mate/panel/general/default-layout "'default'"

mate-panel --replace &

舉例:執行下面指令,將「Mate Panel Layout」改成「brisk-menu-stand-alone-top」。

mate-panel --reset

dconf write /org/mate/panel/general/default-layout "'brisk-menu-stand-alone-top'"

mate-panel --replace &

Debian Package

Manpage

Help

執行

dconf help

顯示

Usage:
  dconf COMMAND [ARGS...]

Commands:
  help              Show this information
  read              Read the value of a key
  list              List the contents of a dir
  write             Change the value of a key
  reset             Reset the value of a key or dir
  compile           Compile a binary database from keyfiles
  update            Update the system databases
  watch             Watch a path for changes
  dump              Dump an entire subpath to stdout
  load              Populate a subpath from stdin

Use 'dconf help COMMAND' to get detailed help.

執行

mate-panel --help

顯示

Usage:
  mate-panel [OPTION…]

Help Options:
  -h, --help                      Show help options
  --help-all                      Show all help options
  --help-sm-client                Show session management options
  --help-gtk                      Show GTK+ Options

Application Options:
  --replace                       Replace a currently running panel
  --reset                         Reset the panel configuration to default
  --run-dialog                    Execute the run dialog
  --layout                        Set the default panel layout
  --display=DISPLAY               X display to use

執行

mate-tweak --help

顯示

usage: mate-tweak [-h] [--layout LAYOUT] [--get-layout]

options:
  -h, --help       show this help message and exit
  --layout LAYOUT  Switch to a panel layout
  --get-layout     Get the current panel layout