[Others] 将菜单显示在标题栏上 [2021/08/19]
Tofloor
poster avatar
septemberhx
deepin
2021-08-17 17:22
Author

由官方 dde-kwin 仓库中的 chameleon 窗口装饰器结合 https://github.com/Zren/material-decoration 修改而来,保留了原来的全部功能,并将每个窗口的菜单显示在标题栏上以节省纵向屏幕空间。

 

项目地址:https://github.com/SeptemberHX/Chameleon-patched

 

======== 2021/08/19 ========

修复左右方向键越界异常崩溃问题

修复屏幕设置缩放情况下菜单图标过小的问题

 

如何使用

1. 安装 https://github.com/SeptemberHX/dde-globalmenu-service 。进入链接后,右侧 release 页面下载 deb 安装包,安装后,在启动器中设置自启动。V20.6 之后可能需要先手动安装appemenu-qt:`sudo apt install appmenu-qt`

2. 

  • 修改文件 ~/.gtkrc-2.0 ,添加 gtk-modules=appmenu-gtk-module
  • 修改文件 ~/.config/gtk-3.0/settings.ini ,[Settings] 条目下 添加 gtk-modules=appmenu-gtk-module

2. sudo apt install libkf5config-bin libqt5quickparticles5 libqt5quickshapes5 依赖可能不全,请务必先使用命令 ldd libdde-chameleon.so 查看一下依赖是否全部存在。欢迎反馈以完善依赖项

3. 备份系统原有装饰器文件:cp /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/libdeepin-chameleon.so 备份路径

4. 前往项目地址 右侧 的 release 页面,下载最新版本。将下载的 so 文件复制到 /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/libdeepin-chameleon.so 即可

 

如何还原:

如果依赖不足等情况发生,装饰器会出现异常并导致 kwin 无限重启,用户界面基本无法操作。此时:

1. 按下 ctrl+alt+F2,输入用户名密码登陆

2. 将备份的 so 文件拷贝回 /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/libdeepin-chameleon.so 即可

3. 如果之前没有备份,那么 sudo apt reinstall dde-kwin 即可

 

截图:

Reply Favorite View the author
All Replies
2 / 5
To page
squallliu
deepin
2021-09-26 18:02
#21
Reply View the author
squallliu
deepin
2021-09-29 19:52
#22

edge升级到95好了

Reply View the author
155******69
deepin
2021-12-06 22:02
#23

uos自己编译的时候还需要加一个组件

sudo apt install libxcb-util0-dev

https://github.com/QupZilla/qupzilla/issues/2034

Reply View the author
观摩
deepin
2021-12-16 19:56
#24

帮作者顶一顶joy

Reply View the author
niu0518
deepin
2021-12-16 21:54
#25

先帮作者顶一下,然后再去试试joy

Reply View the author
niu0518
deepin
2021-12-16 22:46
#26

image.png

image.png

image.png

楼主,我操作完之后 idea的工具栏没有了 typora额头确实笑了很多,但是工具栏也没有了,求助

Reply View the author
septemberhx
deepin
2021-12-16 22:50
#27
niu0518

image.png

image.png

image.png

楼主,我操作完之后 idea的工具栏没有了 typora额头确实笑了很多,但是工具栏也没有了,求助

第二步 gtk 配置文件有没有修改?

jetbrains 全系列 IDE 需要安装 javafx-runtime 插件,在 IDE 插件仓库里就能找到

Reply View the author
niu0518
deepin
2021-12-16 22:57
#28
septemberhx

第二步 gtk 配置文件有没有修改?

jetbrains 全系列 IDE 需要安装 javafx-runtime 插件,在 IDE 插件仓库里就能找到

image.png

image.png

这两个配置文件都改了,插件也安装了,电脑也重启了,请问还需要做什么吗?

Reply View the author
niu0518
deepin
2021-12-16 23:53
#29
septemberhx

第二步 gtk 配置文件有没有修改?

jetbrains 全系列 IDE 需要安装 javafx-runtime 插件,在 IDE 插件仓库里就能找到

image.png

会不会是因为我没有那个 libdde-chameleon.so 这个文件

Reply View the author
septemberhx
deepin
2021-12-16 23:57
#30
niu0518

image.png

会不会是因为我没有那个 libdde-chameleon.so 这个文件

第 4 步做了吗,要手动把 so 文件放到指定目录里

Reply View the author
niu0518
deepin
2021-12-17 00:01
#31
septemberhx

第 4 步做了吗,要手动把 so 文件放到指定目录里

做了,我把原来的文件改了个名字,把下载的那个放进去了

Reply View the author
septemberhx
deepin
2021-12-17 00:04
#32
niu0518

做了,我把原来的文件改了个名字,把下载的那个放进去了

那为啥 find 的结果里面没有它,ls /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/ 看看?

vscode 是正常的吗,菜单栏显示在标题栏上?

Reply View the author
niu0518
deepin
2021-12-17 00:09
#33
septemberhx

那为啥 find 的结果里面没有它,ls /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/ 看看?

vscode 是正常的吗,菜单栏显示在标题栏上?

好了,现在可以了,原来不行的原因应该是两个so文件共存的原因,我之前的操作是两个so文件共存,把系统原来的文件改了个名字,出现了之前的现象,现在我在备份之后,把系统原来的文件删掉,就可以了,谢谢楼主耐心的回答

kissing_heart

image.png

image.png

typora 和 idea都可以了 ,再次感谢楼主

Reply View the author
老咸鱼
deepin
2021-12-17 09:16
#34

话说so文件在哪里下载,怎么都找不到

Reply View the author
septemberhx
deepin
2021-12-17 18:54
#35
老咸鱼

话说so文件在哪里下载,怎么都找不到

Reply View the author
川顺页
deepin
2021-12-18 04:48
#36

厉害了楼主。收藏了。

Reply View the author
williamye
deepin
2021-12-18 06:21
#37

这个不错,试试看,谢谢楼主的分享!

Reply View the author
老咸鱼
deepin
2021-12-18 08:27
#38

截图_选择区域_20211218002529.jpg

感谢大佬指点,这窗口看起来终于舒服了

Reply View the author
老咸鱼
deepin
2021-12-18 08:43
#39

貌似fcitx5输入法图标会消失

Reply View the author
要讲武德
deepin
2022-01-02 21:29
#40

这种风格挺好的呀, windows自己的vscode也是菜单栏和标题栏在一排, 挺好用的

Reply View the author
2 / 5
To page