nirish

config files for niri window manager
Log | Files | Refs | README | LICENSE

config.jsonc (4301B)


      1 {
      2 	"layer": "top",
      3 	"position": "top",
      4 	"modules-left": [
      5 		"clock",
      6 		// "custom/uptime",
      7 		// "niri/window"
      8 		"network",
      9 		"custom/vpn",
     10 	],
     11 	"modules-center": [
     12 		"custom/workspaces"
     13 	],
     14 	"modules-right": [
     15 		"custom/screenrecording-indicator",
     16 		"tray",
     17 		"custom/brightness",
     18 		// "network",
     19 		// "custom/vpn",
     20 		"pulseaudio",
     21 		"bluetooth",
     22 		"battery",
     23 	],
     24 	"niri/window": {
     25 		"format": "{app_id} | {title}",
     26 		"max-length": 30,
     27 	},
     28 	"clock": {
     29 		"format": "{:%a, %b %d %H:%M}",
     30 		"tooltip": false,
     31 	},
     32 	"battery": {
     33 		"interval": 60,
     34 		"max-length": 25,
     35 		"states": {
     36 			"good": 95,
     37 			"warning": 30,
     38 			"critical": 15,
     39 		},
     40 		// "format": "{icon} {capacity}%",
     41 		"format": "BAT: {capacity}%",
     42 		"format-icons": {
     43 			// "default": [
     44 			// 	"",
     45 			// 	"",
     46 			// 	"",
     47 			// 	"",
     48 			// 	""
     49 			// ],
     50 			// "charging": "<span color='#ffff00'></span>"
     51 			// no nerd font support font
     52 			"charging": "<span color='#ffff00'>PWR: {capacity}%</span>",
     53 		},
     54 		// "format-plugged": " {capacity}%"
     55 		"format-plugged": "PLG: {capacity}%",
     56 	},
     57 	"bluetooth": {
     58 		// "format": " {num_connections}",
     59 		"format": "BT: {num_connections}",
     60 		// "format-disabled": "<span color='#aaaaaa'>󰂲</span>",
     61 		"format-disabled": "<span color='#aaaaaa'>BT: DC'D</span>",
     62 		// "format-connected": " {num_connections}",
     63 		"format-connected": "BT: {num_connections}",
     64 		"tooltip-format": "Devices connected: {num_connections}\n{device_alias} at {device_battery_percentage}%",
     65 		"on-click": "$TERMINAL --app-id=TUI.float -e bluetui",
     66 		"on-click-right": "rfkill toggle bluetooth",
     67 	},
     68 	"pulseaudio": {
     69 		// "format": "{icon} {volume}%",
     70 		"format": "{icon} <span color='#aaaaaa'>{volume}</span>",
     71 		// "format-bluetooth": " {icon} {volume}%",
     72 		"format-bluetooth": "BT: {icon} {volume}",
     73 		// "format-muted": "",
     74 		"format-muted": "X MUTED",
     75 		"format-icons": [
     76 			"+--",
     77 			"++-",
     78 			"+++"
     79 		],
     80 		// "format-icons": {
     81 		// 	"alsa_output.pci-0000_00_1f.3.analog-stereo": "",
     82 		// 	"alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "",
     83 		// 	"headphone": "",
     84 		// 	"phone": "",
     85 		// 	"phone-muted": "",
     86 		// 	"portable": "",
     87 		// 	"car": "",
     88 		// 	"default": [
     89 		// 		"",
     90 		// 		""
     91 		// 	]
     92 		// },
     93 		"on-click": "$TERMINAL --app-id=TUI.float -e wiremix",
     94 		"tooltip-format": "{desc}",
     95 		"scroll-step": 5,
     96 	},
     97 	"network": {
     98 		"interface": "wlan0",
     99 		"format": "{ifname}",
    100 		// "format-wifi": " {signalStrength}%",
    101 		"format-wifi": "WiFi: {essid} <span color='#aaaaaa'>{signalStrength}%</span>",
    102 		"format-ethernet": "Eth: {ipaddr}/<span color='#aaaaaa'>{cidr}</span>",
    103 		// "format-ethernet": " {ipaddr}/{cidr}",
    104 		// "format-disconnected": "󰖪", //An empty format will hide the module.
    105 		"format-disconnected": "DC'D",
    106 		// "tooltip-format-wifi": " {essid} {signalStrength}%",
    107 		"tooltip-format-wifi": "{essid} ({signalStrength}%)",
    108 		"tooltip-format-ethernet": "{ifname} via {gwaddr}",
    109 		// "tooltip-format-disconnected": "󰖪",
    110 		"tooltip-format-disconnected": "DC'D",
    111 		"max-length": 50,
    112 		"interval": 60,
    113 		"on-click": "$TERMINAL --app-id TUI.float -e wifitui",
    114 		"on-click-right": "rfkill toggle wlan",
    115 	},
    116 	"custom/vpn": {
    117 		// "format": " VPN",
    118 		"format": "VPN",
    119 		"exec": "echo '{\"class\": \"connected\"}'",
    120 		"exec-if": "test -d /proc/sys/net/ipv4/conf/proton0",
    121 		"return-type": "json",
    122 		"interval": 5,
    123 	},
    124 	"custom/workspaces": {
    125 		"exec": "~/.config/waybar/niri-workspaces",
    126 		"return-type": "json",
    127 		"format": "{}",
    128 	},
    129 	// The below module require `ddcutil` to be working on the system
    130 	// or it will not work
    131 	"custom/brightness": {
    132 		// "format": "☀ {}%",
    133 		"format": "HDMI: {}%",
    134 		// "tooltip-format": "☀ {}%",
    135 		"interval": "once",
    136 		"signal": 9,
    137 		"exec": "~/.config/waybar/brightness get",
    138 		"on-scroll-up": "~/.config/waybar/brightness up",
    139 		"on-scroll-down": "~/.config/waybar/brightness down",
    140 		"on-click": "~/.config/waybar/brightness left_click",
    141 		"on-click-right": "~/.config/waybar/brightness right_click",
    142 	},
    143 	"custom/screenrecording-indicator": {
    144 		"on-click": "~/.local/bin/screenrecord",
    145 		"exec": "~/.config/waybar/waybar-screenrecord",
    146 		"signal": 8,
    147 		"return-type": "json",
    148 	},
    149 	"custom/uptime": {
    150 		"format": "{}",
    151 		"interval": 1600,
    152 		"tooltip": false,
    153 		"exec": "~/.config/waybar/uptime",
    154 	},
    155 }