mirror of
				https://forge.katzen.cafe/schrottkatze/nix-configs.git
				synced 2025-10-30 09:07:58 +01:00 
			
		
		
		
	traveldings stuff!
This commit is contained in:
		
					parent
					
						
							
								54a1e34fa6
							
						
					
				
			
			
				commit
				
					
						b4dfef1d6d
					
				
			
		
					 5 changed files with 89 additions and 8 deletions
				
			
		|  | @ -1,4 +1,5 @@ | |||
| (include "bottomBar/workspaces.yuck") | ||||
| (include "bottomBar/traveldings.yuck") | ||||
| 
 | ||||
| (defwindow bottomBar | ||||
|   :monitor 0 | ||||
|  | @ -21,7 +22,7 @@ | |||
|       ) | ||||
|       (box | ||||
|         :halign "center" | ||||
|         (label :text "mid") | ||||
|         (traveldings) | ||||
|       ) | ||||
|       (box | ||||
|         :halign "end" | ||||
|  |  | |||
|  | @ -0,0 +1,50 @@ | |||
| (defwidget traveldings [] | ||||
|   (revealer | ||||
|     :class "traveldings" | ||||
|     :transition "crossfade" | ||||
|     :reveal { traveldings_data != "null" } | ||||
|     (traveldingsBarWidget) | ||||
|   ) | ||||
| ) | ||||
| 
 | ||||
| (defwidget traveldingsBarWidget [] | ||||
|   (overlay | ||||
|     (box | ||||
|       :width 640 | ||||
|       (label  | ||||
|         :halign "start" | ||||
|         :text "${traveldings_data.line} -> ${strlength(traveldings_data.arrival_station) > 24 ? "${substring(traveldings_data.arrival_station, 0, 24)}…" : traveldings_data.arrival_station}${traveldings_data.arrival_platform_data_available ? " (Gl. ${traveldings_data.arrival_platform_real})" : ""}" | ||||
|       ) | ||||
|       (label  | ||||
|         :halign "end" | ||||
|         :text { traveldings_data.time_left >= 3600 ? formattime(traveldings_data.time_left, "noch %-Hh %-Mmin", "Etc/UTC") : formattime(traveldings_data.time_left, "noch %-Mmin", "Etc/UTC") } | ||||
|       ) | ||||
|     ) | ||||
|     (box | ||||
|       (progress | ||||
|         :value {traveldings_data.progress * 100} | ||||
|         :orientation "horizontal" | ||||
|       ) | ||||
|     ) | ||||
|   ) | ||||
| ) | ||||
| 
 | ||||
| (defwindow traveldingsWindow | ||||
|   :monitor 0 | ||||
|   :stacking "overlay" | ||||
|   :exclusive "false" | ||||
|   :geometry (geometry | ||||
|               :x "0%" | ||||
|               :y "6.6%" | ||||
|               :width "30%" | ||||
|               :height "20%" | ||||
|               :anchor "bottom center") | ||||
|   (box  | ||||
|     :class "traveldingsWindow" | ||||
|   (label :text "TODO")) | ||||
| ) | ||||
| 
 | ||||
| (deflisten traveldings_data | ||||
|   :initial "null"  | ||||
|   "traveldings current" | ||||
| ) | ||||
|  | @ -13,4 +13,21 @@ label { | |||
| 
 | ||||
| .workspaces button.focused { | ||||
|   background-color: #504935; | ||||
| } | ||||
| 
 | ||||
| .traveldings progressbar trough { | ||||
|   border: none; | ||||
|   background-color: #3c3836; | ||||
|   border-bottom-right-radius: 0; | ||||
|   border-bottom-left-radius: 0; | ||||
| } | ||||
| 
 | ||||
| .traveldings progressbar progress { | ||||
|   background-color: #79740e; | ||||
|   border-bottom-left-radius: 0; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| .traveldingsWindow { | ||||
|   border-radius: 15px; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Schrottkatze
				Schrottkatze