当前位置: 首页 > news >正文

wayland桌面环境-waybar

目录
  • build
  • Examples
  • taskbar nemo应用图标错误
  • wlr/taskbar
  • 参考配置
  • 配置文件config.jsonc

build

$ sudo apt install libfmt-dev libspdlog-dev libgtkmm-3.0-dev

Examples

https://github.com/Alexays/Waybar/wiki/Examples

taskbar nemo应用图标错误

逻辑:waybar在获取到task的app_id后,去查找app_id.desktop文件,然后过滤文件中的Icon字段

  1. 确认nemo.desktop存在
sudo find / -name nemo.desktop
...
/usr/share/applications/nemo.desktop
  1. 确认nemo.desktop的Icon
Icon=system-file-manager
  1. 确认图标存在
sudo find / -name 'system-file-manager.svg' # 或者system-file-manager.png
...
/usr/share/icons/Papirus/64x64/apps/system-file-manager.svg

通过以上步骤,可以确认是没问题,但不清楚为什么最终结果不符合预期。直接改成绝对路径

Icon=/usr/share/icons/Papirus/64x64/apps/system-file-manager.svg

wlr/taskbar

"wlr/taskbar" 任务栏 当dock用了。wlr 是wlroots的缩写

    "wlr/taskbar": {"all-outputs": true,"format": "{icon}","on-click": "minimize-raise","icon-theme": "Papirus, hicolor"},

参考配置

https://github.com/meowrch/meowrch

https://github.com/kmephistoh/dotfiles

配置文件config.jsonc

点击查看代码
{"layer": "top","position": "bottom",// swaymsg -t get_outputs (sway)// wlr-randr (others)//"output": "eDP-1","output": "HDMI-A-1","modules-left": [//"wlr/taskbar","custom/launcher","cpu","memory","custom/media","tray"],"modules-center": ["wlr/taskbar"//"river/tags"],"modules-right": [//"custom/updates",//"custom/wallpaper","bluetooth",//"backlight","pulseaudio","clock","battery"// "custom/power"],"pulseaudio": {"tooltip": false,"scroll-step": 1,"format": "{icon}   {volume}%","format-muted": "{icon} {volume}%","on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle","format-icons": {"default": ["","",""]}},"river/tags": {"num-tags": 6},"network": {"tooltip": false,"format-wifi": "  {essid}","format-ethernet": ""},"backlight": {"tooltip": false,"format": " {}%","interval": 1,"on-scroll-up": "light -A 5","on-scroll-down": "light -U 5"},"battery": {"states": {"good": 95,"warning": 30,"critical": 20},"format": "{icon}  {capacity}%","format-charging": " {capacity}%","format-plugged": " {capacity}%","format-alt": "{time} {icon}","format-icons": ["","","","",""]},"tray": {"icon-size": 16,"spacing": 10},"clock": {"format": "  {:%H:%M  %d/%m/%Y %a}"},"cpu": {"interval": 15,"format": "  {}%","max-length": 10},"memory": {"interval": 30,"format": "  {}%","max-length": 10},"custom/media": {"interval": 30,"format": "{icon} {}","return-type": "json","max-length": 60,"format-icons": {"spotify": " ","default": " "},"escape": true,"exec": "$HOME/.config/system_scripts/mediaplayer.py 2> /dev/null","on-click": "playerctl play-pause"},"custom/launcher": {"format": " ","on-click": "wofi -show drun","on-click-right": "killall wofi"},"custom/power": {"format": " ","on-click": "bash ~/.config/rofi/leave/leave.sh",},"custom/updates": {"format": "{} Update(s)","exec": "checkupdates | wc -l","exec-if": "[[ $(checkupdates | wc -l) != 0 ]]","interval": 15,"on-click": "alacritty -e paru -Syu && notify-send 'The system has been updated' "},"custom/wallpaper": {"format": " ","on-click": "bash ~/.config/system_scripts/pkill_bc"},"wlr/taskbar": {"all-outputs": true,"format": "{icon}","on-click": "minimize-raise","icon-theme": "Papirus, hicolor"},"bluetooth": {"format": " {status}","format-connected": " {device_alias}","format-connected-battery": " {device_alias} {device_battery_percentage}%",// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected","tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}","tooltip-format-enumerate-connected": "{device_alias}\t{device_address}","tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"},
}
点击查看代码
* {border: none;border-radius: 10px;font-family: "JetbrainsMono Nerd Font";font-size: 15px;min-height: 10px;
}window#waybar {background: transparent;
}window#waybar.hidden {opacity: 0.8;
}#window {margin-top: 0px;padding-left: 10px;padding-right: 10px;border-radius: 10px;transition: none;color: transparent;background: transparent;
}#tags {margin-top: 0px;margin-left: 12px;font-size: 4px;margin-bottom: 0px;border-radius: 10px;background: #161320;transition: none;
}#tags button {transition: none;color: #B5E8E0;background: transparent;font-size: 16px;border-radius: 2px;
}#tags button.occupied {transition: none;color: #F28FAD;background: transparent;font-size: 4px;
}#tags button.focused {color: #ABE9B3;border-top: 2px solid #ABE9B3;border-bottom: 2px solid #ABE9B3;
}#tags button:hover {transition: none;box-shadow: inherit;text-shadow: inherit;color: #FAE3B0;border-color: #E8A2AF;color: #E8A2AF;
}#tags button.focused:hover {color: #E8A2AF;
}#network {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #bd93f9;
}#pulseaudio {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #1A1826;background: #FAE3B0;
}#battery {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #B5E8E0;
}#battery.charging,
#battery.plugged {color: #161320;background-color: #B5E8E0;
}#battery.critical:not(.charging) {background-color: #B5E8E0;color: #161320;animation-name: blink;animation-duration: 0.5s;animation-timing-function: linear;animation-iteration-count: infinite;animation-direction: alternate;
}@keyframes blink {to {background-color: #BF616A;color: #B5E8E0;}
}#backlight {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #F8BD96;
}#clock {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #ABE9B3;/*background: #1A1826;*/
}#memory {margin-top: 0px;margin-left: 8px;padding-left: 10px;margin-bottom: 0px;padding-right: 10px;border-radius: 10px;transition: none;color: #161320;background: #DDB6F2;
}#cpu {margin-top: 0px;margin-left: 8px;padding-left: 10px;margin-bottom: 0px;padding-right: 10px;border-radius: 10px;transition: none;color: #161320;background: #96CDFB;
}#tray {margin-top: 0px;margin-left: 8px;padding-left: 10px;margin-bottom: 0px;padding-right: 10px;border-radius: 10px;transition: none;color: #B5E8E0;background: #161320;
}#custom-launcher {font-size: 24px;margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 5px;border-radius: 10px;transition: none;color: #89DCEB;background: #161320;
}#custom-power {font-size: 20px;margin-top: 0px;margin-left: 8px;margin-right: 8px;padding-left: 10px;padding-right: 5px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #F28FAD;
}#custom-wallpaper {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #C9CBFF;
}#custom-updates {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #E8A2AF;
}#custom-media {margin-top: 0px;margin-left: 8px;padding-left: 10px;padding-right: 10px;margin-bottom: 0px;border-radius: 10px;transition: none;color: #161320;background: #F2CDCD;
}
http://www.jsqmd.com/news/445867/

相关文章:

  • 2026年浸没式液冷系统加工厂口碑排名,选哪家更合适 - 工业品牌热点
  • 2026年杭州艺术漆店费用大揭秘,售后完善的艺术漆专营店怎么收费 - 工业设备
  • wayland桌面环境-labwc theme
  • wayland桌面环境-输入设备控制(libinput):触控板配置等
  • 聊聊2026年口碑好的干冷器供应商,哪家性价比高有答案 - mypinpai
  • 上传文件提示超出网站限制大值(文件上传超出网站限制大值解决方法总结)
  • 2026年全国靠谱的水泥厂除尘布袋公司排名,前十有哪些 - 工业品牌热点
  • 盘点浙江省中央空调费用,欧瑞博集成空调价格贵吗? - myqiye
  • 2026年快餐配送企业排名揭晓,看看哪些品牌值得选 - mypinpai
  • wayland桌面环境-labwc初步配置
  • 2026年盘点有名的税务筹划公司,这些机构性价比超高 - 工业推荐榜
  • AMD 驱动相关-AI 回答
  • 解锁效率新范式|UD软件,让每一次操作都更具价值
  • CF1681F Unique Occurrences 题解
  • 如何查看宝塔面板的默认信息(云服务器中如何查看宝塔面板的默认信息)
  • Linux中SQL 从基础到进阶:五大分类详解与表结构执行(ALTER/DROP)全攻略
  • wayland桌面环境-labwc编译
  • 聊聊2026年山西预应力混凝土管桩生产厂家哪家性价比高 - 工业品网
  • 北航2026软件工程第一次个人作业
  • 2026太原靠谱的花灯彩灯生产厂家代加工推荐,性价比如何 - 工业设备
  • Z-BlogPHP强制开启 Debug 调试模式 zblog网站常见问题
  • 2026好的职业培训学校口碑排名,学电焊的专业学校哪家强 - 工业品牌热点
  • 资深用户推荐:2025年高效短视频获客平台,抖音运营公司/短视频代运营团队/小红书代运营/抖音代运营/企业号代运营短视频获客服务商有哪些 - 品牌推荐师
  • 网站出现SQL语句报错是什么原因?
  • 2026年江门性价比高的装修公司,鲁班匠心费用合理 - myqiye
  • 帝国cms万能标签(ecmsinfo)和灵动标签(e:loop)主要区别EmpireCMS
  • 2026方案多有经验的防伪公司价格,哪家口碑好值得考虑 - 工业推荐榜
  • Z-BlogPHP网站文件结构,zblog网站常见问题之模板目录在哪里
  • 闲置京东e卡变钱攻略 - 京顺回收
  • PbootCMS附件上传失败报错UNKNOW: Code: 8192; Desc: stripos():