mirror of
https://github.com/zhenyan121/dotfiles.git
synced 2026-04-10 06:24:08 +08:00
431 lines
11 KiB
JSON
Executable File
431 lines
11 KiB
JSON
Executable File
{
|
||
//电池电量
|
||
"battery": {
|
||
"interval": 60,
|
||
"states": {
|
||
"critical": 20,
|
||
},
|
||
"format": "{icon} {capacity}%",
|
||
"format-charging": " {capacity}% ",
|
||
"format-icons": [
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
""
|
||
],
|
||
"tooltip-format": "剩余电量:{capacity}%\n充 放 电 :{power}\n可用时间:{timeTo}\n---\n电池健康度:{health}%",
|
||
},
|
||
//时钟
|
||
"clock": {
|
||
"interval": 60,
|
||
"format": " {:%H:%M}",
|
||
"tooltip-format": "{:%Y/%m/%d %A}\n---\n左键:打开时钟\n右键:打开日历",
|
||
"max-length": 25,
|
||
"on-click": "gnome-clocks",
|
||
"on-click-right": "gnome-calendar",
|
||
},
|
||
"clock#date": {
|
||
// "interval":
|
||
"format": " {:%m-%d}",
|
||
// "timezone":
|
||
// "timezones":
|
||
// "locale":
|
||
// "rotate":
|
||
// "on-click":
|
||
// "on-click-middle":
|
||
// "on-click-right":
|
||
// "on-scroll-up":
|
||
// "on-scroll-down":
|
||
// "smooth-scrolling-threshold":
|
||
// "tooltip":
|
||
"on-click": "gnome-calendar",
|
||
"tooltip-format": "{:%Y/%m/%d %A}",
|
||
},
|
||
//正在运行的软件
|
||
"tray": {
|
||
"icon-size": 22,
|
||
"spacing": 7,
|
||
// 自定义图标
|
||
//"icons": {
|
||
// "blueman": "/home/shorin/.config/waybar/logo/bluetooth.png",
|
||
//},
|
||
},
|
||
//工作区和窗口名字
|
||
"niri/workspaces": {
|
||
"format": "{icon}",
|
||
"format-icons": {
|
||
"active": "",
|
||
"default": "",
|
||
},
|
||
},
|
||
"niri/window": {
|
||
"format": "{}",
|
||
"rewrite": {
|
||
"(.*) - Mozilla Firefox": "🌎 $1",
|
||
"(.*) - zsh": "> [$1]",
|
||
},
|
||
},
|
||
//网络和蓝牙
|
||
"group/network-bluetooth": {
|
||
"orientation": "inherit",
|
||
"drawer": {
|
||
"transition-left-to-right": false,
|
||
},
|
||
"modules": [
|
||
"network",
|
||
"bluetooth"
|
||
],
|
||
},
|
||
"network": {
|
||
"format-disconnected": "{icon}",
|
||
"format-wifi": "{icon}",
|
||
"format-ethernet": "{icon}",
|
||
"format-icons": {
|
||
"disconnected": "",
|
||
"wifi": [
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
""
|
||
],
|
||
"ethernet": "",
|
||
},
|
||
//鼠标悬浮在wifi图标上会显示wifi名称、信号强度、ip地址、设备名
|
||
"tooltip-format-wifi": "{essid} ({signalStrength}%)\n{ifname} : {ipaddr}\n---\n左键:打开面板\n右键:打开高级网络配置工具",
|
||
"tooltip-format-ethernet": "{ifname} : {ipaddr}\n---\n左键:打开面板\n右键:打开高级网络配置工具",
|
||
"tooltip-format-disconnected": "网络未连接\n---\n左键:打开面板\n右键:打开高级网络配置工具",
|
||
"on-click": "kitty --class nmtui -e nmtui",
|
||
"on-click-right": "nm-connection-editor",
|
||
},
|
||
"bluetooth": {
|
||
//蓝牙关闭状态下的图标和鼠标悬浮时的提示
|
||
"format-disabled": "",
|
||
"tooltip-format-disabled": "左键:启用蓝牙",
|
||
"format": "",
|
||
"tooltip-format-on": "左键:禁用蓝牙\n右键:打开面板",
|
||
//连接状态下的图标和提示
|
||
"format-connected": "",
|
||
"tooltip-format-connected": " {:device_alias}\n---\n右键:打开面板",
|
||
//点击功能
|
||
"on-click": "~/.config/waybar/scripts/toggle-bluetooth.sh",
|
||
"on-click-right": "kitty --class bluetui -e bluetui",
|
||
},
|
||
//左键循环切换性能模式
|
||
"power-profiles-daemon": {
|
||
"format": "{icon}",
|
||
"tooltip-format": "当前性能模式:{profile}\n---\n左键:切换性能模式",
|
||
"tooltip": true,
|
||
"format-icons": {
|
||
"performance": "",
|
||
"balanced": "",
|
||
"power-saver": "",
|
||
},
|
||
},
|
||
"custom/dae": {
|
||
"exec": "$HOME/.config/waybar/scripts/dae_control.sh",
|
||
"return-type": "json",
|
||
"interval": 5,
|
||
"on-click": "$HOME/.config/waybar/scripts/dae_control.sh toggle",
|
||
"tooltip": true,
|
||
"format": "{}"
|
||
},
|
||
//截图
|
||
"custom/screenshot": {
|
||
"format": "",
|
||
"tooltip-format": "左键:快速截图(仅保存到剪贴板)\n右键:打开截图菜单\n中键:打开长截图菜单",
|
||
"on-click": "~/.config/waybar/scripts/screenshot.sh",
|
||
"on-click-right": "~/.config/waybar/scripts/power-screenshot.sh",
|
||
"on-click-middle": "~/.config/waybar/scripts/longshot-sh/longshot.sh"
|
||
},
|
||
//wf-recorder
|
||
"custom/wfrec": {
|
||
"exec": "~/.config/waybar/scripts/wf-recorder.sh status-json",
|
||
"return-type": "json",
|
||
//"interval": 1, // 每秒刷新一次
|
||
"signal": 9, // 与脚本里的 WAYBAR_SIG 对应
|
||
"tooltip": true,
|
||
"on-click": "~/.config/waybar/scripts/wf-recorder.sh toggle", // 左键:开始/停止
|
||
"on-click-right": "~/.config/waybar/scripts/wf-recorder.sh stop"
|
||
},
|
||
//声音模块
|
||
"group/audio": {
|
||
"orientation": "inherit",
|
||
"drawer": {
|
||
"transition-left-to-right": false,
|
||
},
|
||
"modules": [
|
||
"pulseaudio",
|
||
"pulseaudio/slider"
|
||
],
|
||
},
|
||
"pulseaudio": {
|
||
"tooltip-format": "左键:静音\n右键:关闭麦克风\n中键:打开面板",
|
||
"format": "{icon} {format_source} ",
|
||
"format-bluetooth": " {format_source} ",
|
||
"format-source": "{volume}%",
|
||
"format-source-muted": "",
|
||
"format-muted": " {format_source} ",
|
||
"format-icons": {
|
||
"headphone": "",
|
||
"bluetooth": "",
|
||
// "speaker":""
|
||
"speaker": [
|
||
"",
|
||
"",
|
||
""
|
||
],
|
||
},
|
||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
|
||
"on-click-middle": "pavucontrol --tab=3",
|
||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+",
|
||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-",
|
||
},
|
||
"pulseaudio/slider": {
|
||
"min": 0,
|
||
"max": 100,
|
||
"orientation": "horizontal",
|
||
},
|
||
//多媒体
|
||
"mpris": {
|
||
"format": "{player_icon}",
|
||
"format-paused": "{status_icon}",
|
||
"player-icons": {
|
||
"default": "▶",
|
||
},
|
||
"status-icons": {
|
||
"paused": "⏸",
|
||
},
|
||
"toooltip": "{dynamic}",
|
||
"enable-tooltip-len-limits": true,
|
||
},
|
||
//logo+程序启动器
|
||
"custom/applauncher": {
|
||
"tooltip-format": "左键:软件启动菜单\n右键:切换壁纸",
|
||
"format": "",
|
||
"on-click": "fuzzel",
|
||
"on-click-right": "waypaper",
|
||
// "on-click-middle": "~/.config/scripts/niri_auto_blur_bg.sh || pkill -f niri_auto_blur_bg.sh"
|
||
},
|
||
//电源菜单
|
||
"group/powermenu": {
|
||
"orientation": "inherit",
|
||
"drawer": {
|
||
"transition-left-to-right": false,
|
||
},
|
||
"modules": [
|
||
"custom/wlogout",
|
||
"custom/reboot",
|
||
"custom/logout",
|
||
"custom/lockscreen",
|
||
],
|
||
},
|
||
"custom/wlogout": {
|
||
"tooltip": false,
|
||
"format": "",
|
||
"on-click": "systemctl poweroff",
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
"custom/lockscreen": {
|
||
"tooltip": false,
|
||
"format": "",
|
||
"on-click": "swaylock || hyprlock",
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
"custom/reboot": {
|
||
"tooltip": false,
|
||
"format": "",
|
||
"on-click": "systemctl reboot",
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
"custom/logout": {
|
||
"format": "",
|
||
"on-click": "niri msg action quit",
|
||
"tooltip": false,
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
"group/screenlight": {
|
||
"orientation": "inherit",
|
||
"drawer": {
|
||
"transition-left-to-right": false,
|
||
},
|
||
"modules": [
|
||
"backlight",
|
||
"backlight/slider",
|
||
|
||
],
|
||
},
|
||
//内屏亮度
|
||
"backlight/slider": {
|
||
"min": 5,
|
||
"max": 100,
|
||
"orientation": "horizontal",
|
||
},
|
||
"backlight": {
|
||
"tooltip": true,
|
||
"tooltip-format":"调节内屏亮度",
|
||
"format": ""
|
||
},
|
||
//调节外接屏幕亮度
|
||
"group/ddcutil": {
|
||
"orientation": "inherit",
|
||
"drawer": {
|
||
"transition-left-to-right": false,
|
||
},
|
||
"modules": [
|
||
"custom/ddcutil-day",
|
||
"backlight/slider",
|
||
"backlight",
|
||
"custom/separator#1",
|
||
"custom/ddcutil-sleep",
|
||
"custom/ddcutil-night",
|
||
],
|
||
},
|
||
"custom/ddcutil-day": {
|
||
"tooltip-format": "左键:100%外接屏幕亮度\n右键:切换护眼模式",
|
||
"format": "",
|
||
"on-click": "ddcutil --display 1 setvcp 10 100 ",
|
||
"on-click-right": "~/.local/bin/toggle-wlsunset",
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
"custom/ddcutil-night": {
|
||
"tooltip-format": "左键:65%外接屏幕亮度",
|
||
"format": "",
|
||
"on-click": "ddcutil --display 1 setvcp 10 65 ",
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
"custom/ddcutil-sleep": {
|
||
"tooltip-format": "左键:5%外接屏幕亮度",
|
||
"format": "",
|
||
"on-click": "ddcutil --display 1 setvcp 10 5 ",
|
||
"on-scroll-up": "true",
|
||
"on-scroll-down": "true"
|
||
},
|
||
//swaync通知模块
|
||
"custom/swaync": {
|
||
"tooltip": false,
|
||
"format": "{icon}",
|
||
"format-icons": {
|
||
"notification": "<span foreground='red'><sup></sup></span>",
|
||
"none": "",
|
||
"dnd-notification": "<span foreground='red'><sup></sup></span>",
|
||
"dnd-none": "",
|
||
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
|
||
"inhibited-none": "",
|
||
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
|
||
"dnd-inhibited-none": "",
|
||
},
|
||
"return-type": "json",
|
||
"exec-if": "which swaync-client",
|
||
"exec": "swaync-client -swb",
|
||
"on-click": "swaync-client -t -sw",
|
||
"on-click-right": "swaync-client -d -sw",
|
||
"escape": true,
|
||
},
|
||
"custom/mako": {
|
||
"format": "",
|
||
"on-click": "makoctl restore",
|
||
},
|
||
//gnome-control-center
|
||
"custom/settings": {
|
||
"format": "",
|
||
"on-click": "env XDG_CURRENT_DESKTOP=GNOME gnome-control-center",
|
||
"tooltip-format": "Open control center",
|
||
},
|
||
//获取屏幕颜色colorpicker
|
||
"custom/colorpicker": {
|
||
"tooltip": true,
|
||
"format": "",
|
||
"on-click": "hyprpicker | wl-copy",
|
||
"tooltip-format":"左键:提取颜色",
|
||
},
|
||
//音频可视化
|
||
"custom/cava": {
|
||
"tooltip": false,
|
||
"format": "{}",
|
||
"exec": "~/.config/waybar/scripts/cava.sh",
|
||
},
|
||
//禁止熄屏
|
||
"idle_inhibitor": {
|
||
"format": "{icon}",
|
||
"format-icons": {
|
||
"activated": "",
|
||
"deactivated": "",
|
||
},
|
||
"tooltip-format-activated": "自动熄屏已禁止",
|
||
"tooltip-format-deactivated": "自动熄屏已开启",
|
||
"on-click-right": "~/.config/scripts/matugen-select-type.sh"
|
||
},
|
||
//分隔符
|
||
"custom/separator#1": {
|
||
"format": "",
|
||
"tooltip": false,
|
||
},
|
||
//archupdater
|
||
"custom/updates": {
|
||
"format": "{}{icon}",
|
||
"return-type": "json",
|
||
"format-icons": {
|
||
"has-updates": "",
|
||
"updated": ""
|
||
},
|
||
"exec": "~/.config/waybar/scripts/check-updates.sh",
|
||
"interval": 3600,
|
||
"on-click": "kitty -e paru",
|
||
},
|
||
//隐私
|
||
"privacy": {
|
||
"icon-spacing": 10,
|
||
"icon-size": 16,
|
||
"transition-duration": 250,
|
||
"modules": [
|
||
{
|
||
"type": "screenshare",
|
||
"tooltip": true,
|
||
"tooltip-icon-size": 24,
|
||
},
|
||
],
|
||
},
|
||
"cffi/niri-taskbar": {
|
||
// module_path
|
||
"module_path": "/usr/lib/waybar/libniri_taskbar.so",
|
||
"apps": {
|
||
"signal": [
|
||
{
|
||
"match": "\\([0-9]+\\)$",
|
||
"class": "unread",
|
||
},
|
||
],
|
||
},
|
||
},
|
||
// dwl and mangowc
|
||
"ext/workspaces": {
|
||
"format": "{icon}",
|
||
//"format-icons": {
|
||
// "active": "",
|
||
// "default": ""
|
||
// },
|
||
"ignore-hidden": true,
|
||
"on-click": "activate",
|
||
"on-click-right": "deactivate",
|
||
"sort-by-id": true,
|
||
},
|
||
"dwl/window": {
|
||
"format": "[{layout}]{title}",
|
||
}
|
||
|
||
}
|