mirror of
				https://github.com/Dejvino/pinephone-sway-poc.git
				synced 2025-10-30 18:15:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			203 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			203 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
| 
 | |
| {
 | |
|     //GLOBAL
 | |
| 
 | |
| 
 | |
|     "layer": "top",
 | |
| 
 | |
|     "position": "right",
 | |
|     "width": 100,
 | |
| 
 | |
|     "modules-left": [
 | |
|         "clock#time",
 | |
|         "clock#date",
 | |
|     	"battery",
 | |
|         "tray"
 | |
|     ],
 | |
|   
 | |
|     "modules-center": [
 | |
|         "sway/workspaces"
 | |
|     ],
 | |
| 
 | |
|     "modules-right": [
 | |
|     	"custom/kill",
 | |
|         "cpu",
 | |
| 	"memory",
 | |
| //        "disk"
 | |
|         "network",
 | |
|     	"backlight",
 | |
| 	"pulseaudio"
 | |
|     ],
 | |
| 
 | |
| //MODULES
 | |
| 
 | |
|     "clock#time": {
 | |
|         "interval": 10,
 | |
| 	"locale": "C",
 | |
| 	"timezone": "Europe/Berlin",
 | |
|         "format": "{:%H:%M}",
 | |
|         "tooltip": false
 | |
|     },
 | |
| 
 | |
| 
 | |
|     "clock#date": {
 | |
|         "interval": 20,
 | |
| 	"locale": "C",
 | |
| 	"timezone": "Europe/Berlin",
 | |
|         "format": " {:%e %b %Y}", // Icon: calendar-alt
 | |
|         //"tooltip-format": "{:%e %B %Y}"
 | |
|         "tooltip": true,
 | |
| 	"on-click": "termite -e swayphone_menuselect"
 | |
|     },
 | |
| 
 | |
|     "battery": {
 | |
|         "interval": 1,
 | |
|         "states": {
 | |
|             "warning": 30,
 | |
|             "critical": 15
 | |
|         },
 | |
|         // Connected to AC
 | |
|         "format": " {capacity}%", // Icon: bolt
 | |
|         // Not connected to AC
 | |
|         "format-discharging": " {capacity}%",
 | |
|         "format-icons": [
 | |
|             "", // Icon: battery-full
 | |
|             "", // Icon: battery-three-quarters
 | |
|             "", // Icon: battery-half
 | |
|             "", // Icon: battery-quarter
 | |
|             ""  // Icon: battery-empty
 | |
|         ],
 | |
|         "tooltip": false
 | |
|     },
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|     "sway/mode": {
 | |
|         "format": "<span style=\"italic\">  {}</span>",
 | |
|         "tooltip": true
 | |
|     },
 | |
| 
 | |
|     
 | |
|     "sway/workspaces": {
 | |
|         "all-outputs": false,
 | |
|         "disable-scroll": true,
 | |
| 	"persistent_workspaces": {
 | |
| 		"1": [],
 | |
| 		"3:F": [],
 | |
| 		"8:M": [],
 | |
| 		"9:K": []
 | |
| 	},
 | |
|         "format": "{name}",
 | |
|         "format-icons": {
 | |
|             //"1:T": "", // Icon: terminal
 | |
|             "3:F": "龜", // Icon: firefox-browser
 | |
|             "8:M": "", // Icon: mail
 | |
|             "urgent": "",
 | |
|             "focused": "",
 | |
|             "default": ""
 | |
|         }
 | |
|     },
 | |
| 
 | |
|     "custom/kill": {
 | |
| 	"on-click": "swaymsg kill",
 | |
| 	"format": "[x]"
 | |
|     },
 | |
| 
 | |
|     "battery": {
 | |
|         "interval": 1,
 | |
|         "states": {
 | |
|             "warning": 30,
 | |
|             "critical": 15
 | |
|         },
 | |
|         // Connected to AC
 | |
|         "format": " {capacity}%", // Icon: bolt
 | |
|         // Not connected to AC
 | |
|         "format-discharging": " {capacity}%",
 | |
|         "format-icons": [
 | |
|             "", // Icon: battery-full
 | |
|             "", // Icon: battery-three-quarters
 | |
|             "", // Icon: battery-half
 | |
|             "", // Icon: battery-quarter
 | |
|             ""  // Icon: battery-empty
 | |
|         ],
 | |
|         "tooltip": false
 | |
|     },
 | |
| 
 | |
| 
 | |
| 
 | |
|     "cpu": {
 | |
|         "interval": 5,
 | |
|         "tooltip": false,
 | |
|         "format": " {usage}%", //Icon: microchip
 | |
|         "states": {
 | |
|           "warning": 70,
 | |
|           "critical": 90
 | |
|         },
 | |
| 	"on-click": "termite -e \"htop --sort-key=PERCENT_CPU\""
 | |
|     },
 | |
| 
 | |
|    
 | |
|     "memory": {
 | |
|         "interval": 5,
 | |
|         "format": " {}%", // Icon: memory
 | |
|         "states": {
 | |
|             "warning": 70,
 | |
|             "critical": 90
 | |
|         },
 | |
| 	"on-click": "termite -e \"htop --sort-key=PERCENT_MEM\""
 | |
|     },
 | |
| 
 | |
|     "network": {
 | |
|         "interval": 5,
 | |
|         "format-wifi": "  {essid}", // Icon: wifi
 | |
|         "format-ethernet": "  {ifname}", // Icon: ethernet
 | |
|         "format-disconnected": "Disconnected",
 | |
|         "tooltip-format": "{ifname}: {ipaddr}",
 | |
| 	"on-click": "swaymsg exec \"termite -e nmtui\""
 | |
|     },
 | |
| 
 | |
|     "pulseaudio": {
 | |
|         "scroll-step": 1,
 | |
|         "format": "{icon} {volume}%",
 | |
|         "format-bluetooth": "{icon} {volume}%",
 | |
|         "format-muted": "",
 | |
|         "format-icons": {
 | |
|             "headphones": "",
 | |
|             "handsfree": "",
 | |
|             "headset": "",
 | |
|             "phone": "",
 | |
|             "portable": "",
 | |
|             "car": "",
 | |
|             "default": ["", ""]
 | |
|         },
 | |
|         "on-click": "pavucontrol"
 | |
|     },
 | |
| 
 | |
|     "disk": {
 | |
|         "interval": 5,
 | |
|         "format": " {percentage_used:2}%",
 | |
|         "path": "/"
 | |
|    
 | |
|     },
 | |
|       "backlight": {
 | |
|         // "device": "acpi_video1",
 | |
|         "format": "{icon} {percent}% ",
 | |
|         "states": [0,50],
 | |
|         "format-icons": ["", ""],
 | |
| 	"on-click": "termite -e swayphone_backlightselect"
 | |
|     },
 | |
|     "tray": {
 | |
|         "icon-size": 22
 | |
| 
 | |
|         //"spacing": 10
 | |
|     },
 | |
| 
 | |
|    
 | |
|     "custom/bar": {
 | |
|         "format": "",
 | |
|         "tooltip": false
 | |
|     }
 | |
| }
 | |
| 
 |