【分享】適合 Ubuntu MATE 的面板布局方案 [論壇 - Ubuntu基本設定]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊

« 1 (2) 3 4 »


回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
## 修改 Panel 屬性

除了可以在「Panel」按下「滑鼠右鍵」,

出現一個選單,選擇「Properties」,

會出現另一個視窗「Panel Properties」。

就可以修改「該 Panel 的屬性」。

================================================================================

接著要介紹的是,是如何透過指令來「修改 Panel 屬性」。

我在另一篇討論串「#16 - 回覆: 雙系統,更新BIOS後,Xubuntu進不了。」提到

使用「GSettings」的機制時,

其中有一種「Relocatable schemas」,比較特別,

在「mate-panel」的設定,就有使用到。

所以我們就先從「dconf」來看起,比較容易入門

================================================================================

執行


dconf dump / | grep mate | grep panel



show


[org/mate/panel/general]
[org/mate/panel/objects/briskmenu]
[org/mate/panel/objects/chromium]
[org/mate/panel/objects/indicatorappletcomplete]
[org/mate/panel/objects/notification-area]
[org/mate/panel/objects/separator-1]
[org/mate/panel/objects/separator-2]
[org/mate/panel/objects/showdesktopapplet]
[org/mate/panel/objects/window-list]
[org/mate/panel/objects/workspace-switcher]
[org/mate/panel/toplevels/bottom]




================================================================================

run


dconf dump /org/mate/panel/general/



show


[/]
default-layout='Perfect-2022-tweak'
object-id-list=['briskmenu', 'chromium', 'separator-1', 'workspace-switcher', 'window-list', 'notification-area', 'indicatorappletcomplete', 'separator-2', 'showdesktopapplet', 'briskmenu', 'chromium', 'separator-1', 'workspace-switcher', 'window-list', 'notification-area', 'indicatorappletcomplete', 'separator-2', 'showdesktopapplet']
toplevel-id-list=['bottom']



================================================================================


run


dconf dump /org/mate/panel/toplevels/bottom/




show


[/]
expand=true
orientation='bottom'
screen=0
size=28
y=740
y-bottom=0




注意,這裡的「/org/mate/panel/toplevels/bottom/」,

是因為「toplevel-id-list=['bottom']」。

也就是這個「bottom名稱」,是根據的您的「Panel ID(toplevel-id)」而定,

請對照「#1」的範例。

================================================================================

## read

執行


dconf read /org/mate/panel/toplevels/bottom/orientation



顯示


'bottom'




================================================================================

## write

執行下面指令,就可以將「該 Panel」移到「上方」


dconf write /org/mate/panel/toplevels/bottom/orientation "'top'"



執行下面指令,就可以將「該 Panel」移到「下方」


dconf write /org/mate/panel/toplevels/bottom/orientation "'bottom'"



執行下面指令,就可以將「該 Panel」移到「左方」


dconf write /org/mate/panel/toplevels/bottom/orientation "'left'"



執行下面指令,就可以將「該 Panel」移到「右方」


dconf write /org/mate/panel/toplevels/bottom/orientation "'right'"



================================================================================

這裡有一個地方要注意的,

就是在修改「/org/mate/panel/toplevels/bottom/orientation」的時候,

要確保「/org/mate/panel/toplevels/bottom/expand」的值是「true」

若當「/org/mate/panel/toplevels/bottom/expand」的值是「false」的時候,

是無法修改「/org/mate/panel/toplevels/bottom/orientation」的值。

這在上面視窗「Panel Properties」修改,也是如此。

================================================================================


因此,若當「/org/mate/panel/toplevels/bottom/expand」的值是「false」的時候,

我們就要改成如下的方式修改「/org/mate/panel/toplevels/bottom/orientation」


執行下面指令,就可以將「該 Panel」移到「上方」


dconf write /org/mate/panel/toplevels/bottom/expand true
dconf write /org/mate/panel/toplevels/bottom/orientation "'top'"
dconf write /org/mate/panel/toplevels/bottom/expand false



執行下面指令,就可以將「該 Panel」移到「下方」


dconf write /org/mate/panel/toplevels/bottom/expand true
dconf write /org/mate/panel/toplevels/bottom/orientation "'bottom'"
dconf write /org/mate/panel/toplevels/bottom/expand false



執行下面指令,就可以將「該 Panel」移到「左方」


dconf write /org/mate/panel/toplevels/bottom/expand true
dconf write /org/mate/panel/toplevels/bottom/orientation "'left'"
dconf write /org/mate/panel/toplevels/bottom/expand false



執行下面指令,就可以將「該 Panel」移到「右方」


dconf write /org/mate/panel/toplevels/bottom/expand true
dconf write /org/mate/panel/toplevels/bottom/orientation "'right'"
dconf write /org/mate/panel/toplevels/bottom/expand false




================================================================================


待續...

2022/12/18 10:27
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
接續「#11

除了可以透過「dconf」這個指令來操作,

也可以透過「gsettings」這個指令來操作,

================================================================================

執行


gsettings list-recursively org.mate.panel



顯示


org.mate.panel confirm-panel-remove true
org.mate.panel default-layout 'Perfect-2022-tweak'
org.mate.panel disable-force-quit false
org.mate.panel disabled-applets @as []
org.mate.panel drawer-autoclose true
org.mate.panel enable-animations true
org.mate.panel enable-autocompletion true
org.mate.panel enable-program-list true
org.mate.panel enable-sni-support false
org.mate.panel highlight-launchers-on-mouseover true
org.mate.panel history-max-size-mate-run uint32 10
org.mate.panel history-reverse-mate-run false
org.mate.panel locked-down false
org.mate.panel object-id-list ['briskmenu', 'chromium', 'separator-1', 'workspace-switcher', 'window-list', 'notification-area', 'indicatorappletcomplete']
org.mate.panel show-program-list true
org.mate.panel tooltips-enabled true
org.mate.panel toplevel-id-list ['bottom']




================================================================================


執行


gsettings list-recursively org.mate.panel.toplevel:/



顯示


org.mate.panel.toplevel animation-speed 'fast'
org.mate.panel.toplevel auto-hide false
org.mate.panel.toplevel auto-hide-size 1
org.mate.panel.toplevel enable-animations true
org.mate.panel.toplevel enable-arrows true
org.mate.panel.toplevel enable-buttons false
org.mate.panel.toplevel expand true
org.mate.panel.toplevel hide-delay 300
org.mate.panel.toplevel monitor 0
org.mate.panel.toplevel name ''
org.mate.panel.toplevel orientation 'top'
org.mate.panel.toplevel screen 0
org.mate.panel.toplevel size 24
org.mate.panel.toplevel unhide-delay 100
org.mate.panel.toplevel x 0
org.mate.panel.toplevel x-centered false
org.mate.panel.toplevel x-right -1
org.mate.panel.toplevel y 0
org.mate.panel.toplevel y-bottom -1
org.mate.panel.toplevel y-centered false
org.mate.panel.toplevel.background color '#ffffff'
org.mate.panel.toplevel.background fit false
org.mate.panel.toplevel.background image ''
org.mate.panel.toplevel.background opacity 6000
org.mate.panel.toplevel.background rotate false
org.mate.panel.toplevel.background stretch false
org.mate.panel.toplevel.background type 'none'





================================================================================


執行


gsettings list-recursively org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/



顯示


org.mate.panel.toplevel animation-speed 'fast'
org.mate.panel.toplevel auto-hide false
org.mate.panel.toplevel auto-hide-size 1
org.mate.panel.toplevel enable-animations true
org.mate.panel.toplevel enable-arrows true
org.mate.panel.toplevel enable-buttons false
org.mate.panel.toplevel expand false
org.mate.panel.toplevel hide-delay 300
org.mate.panel.toplevel monitor 0
org.mate.panel.toplevel name ''
org.mate.panel.toplevel orientation 'bottom'
org.mate.panel.toplevel screen 0
org.mate.panel.toplevel size 28
org.mate.panel.toplevel unhide-delay 100
org.mate.panel.toplevel x 0
org.mate.panel.toplevel x-centered true
org.mate.panel.toplevel x-right 0
org.mate.panel.toplevel y 740
org.mate.panel.toplevel y-bottom 0
org.mate.panel.toplevel y-centered false
org.mate.panel.toplevel.background color '#ffffff'
org.mate.panel.toplevel.background fit false
org.mate.panel.toplevel.background image ''
org.mate.panel.toplevel.background opacity 6000
org.mate.panel.toplevel.background rotate false
org.mate.panel.toplevel.background stretch false
org.mate.panel.toplevel.background type 'none'



================================================================================


執行


gsettings list-keys org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/



顯示


animation-speed
auto-hide
auto-hide-size
enable-animations
enable-arrows
enable-buttons
expand
hide-delay
monitor
name
orientation
screen
size
unhide-delay
x
x-centered
x-right
y
y-bottom
y-centered




================================================================================


執行


gsettings get org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ orientation



顯示


'bottom'



================================================================================

執行下面指令,就可以將「該 Panel」移到「上方」


gsettings set org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ orientation "'top'"



================================================================================

跟在「#11」提到的一樣,在修改前,要確保「expand」的值是「true」。

執行


gsettings set org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ expand true
gsettings set org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ orientation "'top'"



================================================================================


執行


gsettings set org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ expand true
gsettings set org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ orientation "'bottom'"
gsettings set org.mate.panel.toplevel:/org/mate/panel/toplevels/bottom/ expand false



================================================================================

## 相關檔案路徑

* /usr/share/glib-2.0/schemas/
* ~/.config/dconf/
* /etc/dconf/

================================================================================

剛好藉著上面的案例,也許能提供一個探索的起點,

關於「gsettings」和「dconf」的用法。

在「GNOME 系列的 Desktop」,都有用到「GSettings」的機制來做設定。

一些「GTK」的應用程式,也有用到,例如「mousepad」。

所以把這個機制的概念弄懂了,就比較能觸類旁通,透過指令,操作這些設定。

我有留存一些「微調腳本」,放在「GitHub」上,可供參考。

這也是我在另一篇「討論串 」提到的,恢復我慣用設定的基礎。

================================================================================

以上提供參考

報告完畢


2022/12/18 11:05
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
趁過年期間,在整理之前的設定

整理成「gschema.override」,

並且簡易打包成「Arch Package」,

以利於製作自己慣用設定的「Arch ISO」

剛好整理到「mate panel layouts」這一段,

所以我根據「/usr/share/mate-panel/layouts/default.layout」,

整理了不同「menu」的「mate panel layout」,



* compact menu
* classic menu
* brisk menu
* mate menu

都是「單一 panel layout」,所以也分上下

因此就有8種layout可供選擇。

================================================================================

待續...

1/25 22:46:36
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
在「回覆: #2」提到的,

可以透過「mate-tweak」這個工具來操作「切換Layout」這個功能,

有「圖形使用介面」的方式,也有「下指令」的方式。

接著要補充的是,在沒有「mate-tweak」這個工具的前提下,

也可以透過「gsettings」和「dconf」,以及「mate-panel」,採用「下指令」的方式,來達到同樣的效果。

參考指令如下


gsettings set org.mate.panel default-layout "Perfect-2022-tweak"

dconf reset -f /org/mate/panel/general/object-id-list

dconf reset -f /org/mate/panel/general/object-id-list

mate-panel --replace &




注意事項

這段指令,只需要在「#1」提到的「檔案1」

檔案1:
/usr/share/mate-panel/layouts/Perfect-2022-tweak.layout

================================================================================

因為「mate-panel」應該是之前從「gnome-panel」修改演變過來的。

所以可以對照「gnome-panel」的用法

之前在另一個討論串,討論到「gnome-flashback」,

有提到「gnome-panle」切換「layout」的下指令用法。

在「回覆: #20」有提到。

================================================================================

另外根據上面「下指令」的原理,

我先簡單寫了幾個輔助工具,可以用來「list」,「set」,「get」這幾個操作動作,

接著再搭配「fzf」,

可以簡單用來整合「list」,「set」這個兩個操作動作

預計以後會再找時間撰寫成一個指令,類似「wallpaper-select」的用法。

================================================================================

待續...

1/25 23:07:29
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
在「#1」,

裡面有提到一個檔案


檔案2:
/usr/share/mate-panel/layouts/Perfect-2022-tweak.panel

================================================================================

這個檔案,可以透過下面指令,將它回復到系統上


dconf load /org/mate/panel/ < /usr/share/mate-panel/layouts/Perfect-2022-tweak.panel



================================================================================

也可以透過下面指令,將它從系統「dump」出來,並且保存到檔案。


dconf dump /org/mate/panel/ > Perfect-2022-tweak.panel



================================================================================

## Manpage

* man 1 dconf
* man 7 dconf

================================================================================

以上補充

提供參考

報告完畢


1/25 23:17:48
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2009/10/29 4:50
所屬群組:
已註冊使用者
等級: 41
HP : 204 / 1022
MP : 930 / 41548
EXP: 91
離線
samwhelp 寫到:

================================================================================

這個檔案,可以透過下面指令,將它回復到系統上


dconf load /org/mate/panel/ < /usr/share/mate-panel/layouts/Perfect-2022-tweak.panel



================================================================================

也可以透過下面指令,將它從系統「dump」出來,並且保存到檔案。


dconf dump /org/mate/panel/ > Perfect-2022-tweak.panel





感謝分享。

1/26 14:32:45
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
版主
註冊日期:
2008/7/14 0:03
來自 螢幕的另一端
所屬群組:
網站管理員
已註冊使用者
討論區管理群
等級: 33
HP : 0 / 809
MP : 513 / 35958
EXP: 39
離線
請教一下 samwhelp 若我想要把我目前的桌面環境的設定備份下來,下回重灌系統時方便很快的匯入設定,因為我找不到匯出匯入的方式,所以每次都要花不少時間手動設定回來。

我說一下我的桌面環境
debian10, mate + compiz + emerald
compiz+emerald 都可在程式介面上找到設定匯出的部份
但是 mate 桌面環境的很多設定我就找不到
比如:圖章、圖示的設定

參考附圖:
icon 右上角的小圖示是可用滑鼠右鍵→屬性→圖章
來加上去的

整體的icon圖示是可以換成同一套風格,但還可針對不同資料夾換成不同的icon比如附圖裡的那些藍色圖示

還有資料夾的書籤功能我也找不到在哪兒備份

附件:



png  screenshot1.png (63.71 KB)
11931_63d3521d81d58.png 912X368 px

1/27 12:29:15
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
夢見草 寫到:
請教一下 samwhelp 若我想要把我目前的桌面環境的設定備份下來,下回重灌系統時方便很快的匯入設定,因為我找不到匯出匯入的方式,所以每次都要花不少時間手動設定回來。


我先簡單的回覆您,讓您有個探索的起點,

您可以先從「dconf」和「gettings」的使用方法去熟悉,

這樣講有點籠統,但因為要講的議題會有點多,

所以給我點時間,用案例寫一些指引,慢慢引導您入門,

讓您對「dconf」和「gettings」的使用概念理解融會貫通後,

您就可以自行運用,產生你自己的設定檔,未來就可以很容易的復原到新系統。

我本來預計要寫這些出來,放在我自己的筆記裡

* dconf 探索筆記 / Demo
* gsettings 探索筆記

目前只有寫個開頭,有很多理解到的概念要紀錄下來,但還沒時間寫完。

另外之前我有簡單紀錄,我對「mate」設定,先紀錄連結,提供您參考

* Ubuntu 探索筆記 / Mate Desktop


至於您後面提到的設定,我沒有設定過,所以我研究一下,我再回覆您


## 相關連結

### Arch Wiki

* MATE

### System Modeling

* System Modeling / Mate
* /usr/share/glib-2.0/schemas/
* /etc/dconf/db/distro.d/
* /etc/dconf/profile/user


### Ubuntu 探索筆記

* Ubuntu 探索筆記 / Mate Desktop / 微調腳本

### Ezarcher Adjustment

* Ezarcher Adjustment / ezarcher-adjustment-modeling-dconf-default-user-db-initialization / PKGBUILD
* Ezarcher Adjustment / mate


以上先簡單的回覆,讓您有個探索的起點

待續...

1/27 14:54:39
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
夢見草 寫到:
還有資料夾的書籤功能我也找不到在哪兒備份



關於書籤的功能,

我猜您用的「File Manager」應該是「Caja」

書籤是保存在「~/.config/gtk-3.0/bookmarks」這個檔案

以我目前操作的系統為例

執行下面指令


cat ~/.config/gtk-3.0/bookmarks



顯示


file:///home/sam/Documents
file:///home/sam/Music
file:///home/sam/Pictures
file:///home/sam/Videos
file:///home/sam/Downloads
file:///home/sam




我觀察到這個好像是通用的,我猜是用同樣的函式庫做出來的功能,或是遵循同樣的規範

像是「thunar」,「pcmanfm」,「pcmanfm-qt」都適用。


## Source Code

* caja/src/caja-bookmark-list.c:caja_bookmark_list_get_file (~/.config/gtk-3.0/bookmarks)
* caja/src/caja-bookmark-list.c:caja_bookmark_list_get_legacy_file (~/.gtk-bookmarks)

1/27 15:11:04
應用擴展 工具箱
回覆: 【分享】適合 Ubuntu MATE 22.04 的面板布局方案
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30224
EXP: 23
離線
回覆:「#17

夢見草 寫到:
但是 mate 桌面環境的很多設定我就找不到

比如:圖章、圖示的設定

參考附圖:
icon 右上角的小圖示是可用滑鼠右鍵→屬性→圖章
來加上去的

整體的icon圖示是可以換成同一套風格,但還可針對不同資料夾換成不同的icon比如附圖裡的那些藍色圖示



================================================================================

一開始我到「caja」的原始碼去探索,找不到

https://github.com/mate-desktop/caja/blob/master/libcaja-private/caja-customization-data.c

https://github.com/mate-desktop/caja/blob/master/libcaja-private/caja-emblem-utils.c


https://github.com/mate-desktop/caja/blob/master/libcaja-private/caja-file-utilities.c#L859


## Keyword

* emblem
* CAJA_DATADIR
* caja_get_data_file_path
* caja_get_user_directory
* ~/.config/caja/
* /usr/share/caja/

================================================================================

### Google Search

後來我用「關鍵字:emblem dir icon caja store」在「Google」查詢

查到下面的連結,有提到相關的資訊

* Where does Caja save folder state and icon?
* GNOME: Where does Nautilus store emblem data and how?
* Are "file Notes" exclusive to Nautilus; is there a Terminal CLI?
* GTK Icons for special files

================================================================================

初步可以了解到,這些設定是保存在「~/.local/share/gvfs-metadata」這個資料夾。

================================================================================

來做個小實驗

先用「caja」產生一個資料夾「~/Documents/demo-folder」,

然後將這個資料夾的「Properties / Emblems」設為「question」,

接著在「Terminal」執行下面指令


gio info -a metadata::emblems ~/Documents/demo-folder



就會顯示類似如下的資訊


uri: file:///home/sam/Documents/demo-folder
local path: /home/sam/Documents/demo-folder
unix mount: /dev/sdb3 / ext4 rw,noatime
attributes:
metadata::emblems: [question]



================================================================================

也可以透過指令修改,將「~/Documents/demo-folder」這個資料夾的「Properties / Emblems」設為「added」,


gio set -t stringv ~/Documents/demo-folder metadata::emblems "added"



接著執行下面指令


gio info -a metadata::emblems ~/Documents/demo-folder



就會顯示類似如下的資訊


uri: file:///home/sam/Documents/demo-folder
local path: /home/sam/Documents/demo-folder
unix mount: /dev/sdb3 / ext4 rw,noatime
attributes:
metadata::emblems: [added]




> 在「pcmanfm-qt」和「thunar」以及「nemo」,也會有「圖章、圖示」的效果。

================================================================================

要找相關的「icon」應該可以執行類似如下的指令


find /usr/share/icons/Adwaita/ | grep emblems




find /usr/share/icons/ | grep emblems




find /usr/share/icons/ | grep emblems | grep question




find /usr/share/icons/ | grep emblems | grep added



================================================================================

以上暫時紀錄目前探索到的

提供參考


1/27 20:42:46
應用擴展 工具箱

« 1 (2) 3 4 »

 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.