Updates, fix bar, add walker
This commit is contained in:
		
							parent
							
								
									3b587f3e15
								
							
						
					
					
						commit
						2bfdda55d4
					
				
					 12 changed files with 284 additions and 161 deletions
				
			
		| 
						 | 
				
			
			@ -160,15 +160,10 @@ in {
 | 
			
		|||
                      then []
 | 
			
		||||
                      else item.mimeTypes;
 | 
			
		||||
 | 
			
		||||
          actions = {};
 | 
			
		||||
 | 
			
		||||
          exec = "${item.exec} ${if entry ? noremote && entry.noremote then "-no-remote" else ""} -P ${entry.profile}";
 | 
			
		||||
        })) entries);
 | 
			
		||||
 | 
			
		||||
      imEntry = pkg.desktopItem.override (entry: {
 | 
			
		||||
        name = "discord-firefox";
 | 
			
		||||
        desktopName = "IMs (Firefox)";
 | 
			
		||||
        exec = "${entry.exec} -no-remote -P Im";
 | 
			
		||||
        mimeTypes = [];
 | 
			
		||||
      });
 | 
			
		||||
    in {
 | 
			
		||||
      buildCommand = ''
 | 
			
		||||
        ${pkg.buildCommand}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,15 +6,24 @@ import Quickshell.Wayland
 | 
			
		|||
PanelWindow {
 | 
			
		||||
	id: root
 | 
			
		||||
 | 
			
		||||
	PopupSurface {
 | 
			
		||||
		id: popupSurface
 | 
			
		||||
		screen: root.screen
 | 
			
		||||
		bar: barRect
 | 
			
		||||
		visible: false
 | 
			
		||||
	PersistentProperties {
 | 
			
		||||
		id: persist
 | 
			
		||||
		reloadableId: "persist"
 | 
			
		||||
 | 
			
		||||
		property bool barVisible: false
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	onWindowConnected: {
 | 
			
		||||
		popupSurface.visible = true
 | 
			
		||||
	PopupSurface {
 | 
			
		||||
		id: popupSurface
 | 
			
		||||
		reloadableId: "popupSurface"
 | 
			
		||||
 | 
			
		||||
		screen: root.screen
 | 
			
		||||
		bar: barRect
 | 
			
		||||
		visible: persist.barVisible
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	onBackingWindowVisibleChanged: {
 | 
			
		||||
		persist.barVisible = Qt.binding(() => backingWindowVisible);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	anchors {
 | 
			
		||||
| 
						 | 
				
			
			@ -52,9 +61,11 @@ PanelWindow {
 | 
			
		|||
					left: parent.left
 | 
			
		||||
					right: parent.right
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				ClockWidget {
 | 
			
		||||
					Layout.fillWidth: true
 | 
			
		||||
					popupSurface: popupSurface
 | 
			
		||||
					barWindow: root
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,8 +2,8 @@ import QtQuick
 | 
			
		|||
import QtQuick.Layouts
 | 
			
		||||
 | 
			
		||||
OverlayWidget {
 | 
			
		||||
	expandedWidth: 100
 | 
			
		||||
	expandedHeight: 100
 | 
			
		||||
	expandedWidth: 600
 | 
			
		||||
	expandedHeight: 600
 | 
			
		||||
 | 
			
		||||
	BarWidgetInner {
 | 
			
		||||
		implicitHeight: layout.implicitHeight
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,8 @@ Item {
 | 
			
		|||
	required property real expandedHeight;
 | 
			
		||||
	required default property Item widget;
 | 
			
		||||
 | 
			
		||||
	required property var barWindow;
 | 
			
		||||
 | 
			
		||||
	property bool expanded: false;
 | 
			
		||||
 | 
			
		||||
	onExpandedChanged: {
 | 
			
		||||
| 
						 | 
				
			
			@ -23,20 +25,22 @@ Item {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	readonly property rect collapsedLayerRect: {
 | 
			
		||||
		//console.log(`schrodinger's coordinate space: ${popupSurface.width} ${popupSurface.height}`);
 | 
			
		||||
		const w = popupSurface.width;
 | 
			
		||||
		const h = popupSurface.height;
 | 
			
		||||
		void [barWindow.windowTransform, popupSurface.windowTransform];
 | 
			
		||||
		return this.mapToItem(popupSurface.contentItem, 0, 0, width, height);
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	readonly property rect expandedLayerRect: popupSurface.expandedPosition(this)
 | 
			
		||||
 | 
			
		||||
	readonly property rect layerRect: {
 | 
			
		||||
		const [p, xCurve, yCurve] = [animationProgress, ShellGlobals.popoutXCurve, ShellGlobals.popoutYCurve];
 | 
			
		||||
 | 
			
		||||
		return Qt.rect(
 | 
			
		||||
			ShellGlobals.popoutXCurve.interpolate(animationProgress, collapsedLayerRect.x, expandedLayerRect.x),
 | 
			
		||||
			ShellGlobals.popoutYCurve.interpolate(animationProgress, collapsedLayerRect.y, expandedLayerRect.y),
 | 
			
		||||
			ShellGlobals.popoutXCurve.interpolate(animationProgress, collapsedLayerRect.width, expandedLayerRect.width),
 | 
			
		||||
			ShellGlobals.popoutYCurve.interpolate(animationProgress, collapsedLayerRect.height, expandedLayerRect.height),
 | 
			
		||||
			xCurve.interpolate(p, collapsedLayerRect.x, expandedLayerRect.x),
 | 
			
		||||
			yCurve.interpolate(p, collapsedLayerRect.y, expandedLayerRect.y),
 | 
			
		||||
			xCurve.interpolate(p, collapsedLayerRect.width, expandedLayerRect.width),
 | 
			
		||||
			yCurve.interpolate(p, collapsedLayerRect.height, expandedLayerRect.height),
 | 
			
		||||
 | 
			
		||||
		);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -50,6 +54,7 @@ Item {
 | 
			
		|||
		widget.width = Qt.binding(() => layerRect.width);
 | 
			
		||||
		widget.height = Qt.binding(() => layerRect.height);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	Component.onDestruction: {
 | 
			
		||||
		popupSurface.disconnectOverlay(this)
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
import QtQuick
 | 
			
		||||
import Quickshell
 | 
			
		||||
import Quickshell.Wayland
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -18,11 +19,16 @@ WlrLayershell {
 | 
			
		|||
		lastActiveOverlay = activeOverlay;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	readonly property rect barRect: this.contentItem.mapFromItem(bar, 0, 0, bar.width, bar.height)
 | 
			
		||||
	readonly property rect barRect: {
 | 
			
		||||
		void [width, height];
 | 
			
		||||
		this.contentItem.mapFromItem(bar, 0, 0, bar.width, bar.height)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	readonly property real overlayXOffset: barRect.x + barRect.width + 10
 | 
			
		||||
 | 
			
		||||
	exclusionMode: ExclusionMode.Ignore
 | 
			
		||||
	color: "transparent"
 | 
			
		||||
 | 
			
		||||
	namespace: "shell:bar"
 | 
			
		||||
 | 
			
		||||
	Variants {
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +37,7 @@ WlrLayershell {
 | 
			
		|||
 | 
			
		||||
		Region {
 | 
			
		||||
			required property var modelData;
 | 
			
		||||
			item: modelData == undefined ? null : modelData.widget
 | 
			
		||||
			item: modelData.widget
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +53,7 @@ WlrLayershell {
 | 
			
		|||
 | 
			
		||||
	width: {
 | 
			
		||||
		const extents = overlays
 | 
			
		||||
			.filter(overlay => overlay != undefined && !overlay.fullyCollapsed)
 | 
			
		||||
			.filter(overlay => !overlay.fullyCollapsed)
 | 
			
		||||
			.map(overlay => overlayXOffset + overlay.expandedWidth);
 | 
			
		||||
 | 
			
		||||
		return Math.max(barRect.x + barRect.width, ...extents);
 | 
			
		||||
| 
						 | 
				
			
			@ -59,8 +65,9 @@ WlrLayershell {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	function disconnectOverlay(overlay: variant) {
 | 
			
		||||
		const index = overlays.indexOf(overlay);
 | 
			
		||||
		if (index != -1) overlays.splice(index, 1);
 | 
			
		||||
		// Splice seems to make it undefined as an intermediary step
 | 
			
		||||
		// which breaks bindings.
 | 
			
		||||
		overlays = overlays.filter(o => o != overlay);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function expandedPosition(overlay: variant): rect {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,9 +5,9 @@ import Quickshell
 | 
			
		|||
 | 
			
		||||
Singleton {
 | 
			
		||||
	readonly property var colors: QtObject {
 | 
			
		||||
		readonly property var bar: "#30e0ffff";
 | 
			
		||||
		readonly property var bar: "#30c0ffff";
 | 
			
		||||
		readonly property var barOutline: "#50ffffff";
 | 
			
		||||
		readonly property var widget: "#40e0ffff";
 | 
			
		||||
		readonly property var widget: "#40ceffff";
 | 
			
		||||
		readonly property var widgetOutline: "#60ffffff";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,7 @@ ShellRoot {
 | 
			
		|||
 | 
			
		||||
				screen: modelData
 | 
			
		||||
				WlrLayershell.layer: WlrLayer.Background
 | 
			
		||||
				WlrLayershell.namespace: "shell:background"
 | 
			
		||||
 | 
			
		||||
				anchors {
 | 
			
		||||
					top: true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										48
									
								
								modules/user/modules/walker/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								modules/user/modules/walker/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,48 @@
 | 
			
		|||
{ inputs, impurity, ... }: {
 | 
			
		||||
  imports = [ inputs.walker.homeManagerModules.walker ];
 | 
			
		||||
 | 
			
		||||
  programs.walker = {
 | 
			
		||||
    enabled = true;
 | 
			
		||||
    runAsService = true;
 | 
			
		||||
 | 
			
		||||
    config = {
 | 
			
		||||
      fullscreen = true;
 | 
			
		||||
      scrollbar_policy = "external";
 | 
			
		||||
      activation_mode.use_alt = true;
 | 
			
		||||
 | 
			
		||||
      align = {
 | 
			
		||||
        width = 500;
 | 
			
		||||
        horizontal = "center";
 | 
			
		||||
        vertical = "center";
 | 
			
		||||
        margins.top = 0;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      list = {
 | 
			
		||||
        height = 500;
 | 
			
		||||
        fixed_height = true;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      modules = [
 | 
			
		||||
        {
 | 
			
		||||
          name = "applications";
 | 
			
		||||
          prefix = "";
 | 
			
		||||
        }
 | 
			
		||||
        {
 | 
			
		||||
          name = "runner";
 | 
			
		||||
          prefix = ">";
 | 
			
		||||
        }
 | 
			
		||||
        {
 | 
			
		||||
          name = "commands";
 | 
			
		||||
          prefix = "";
 | 
			
		||||
          switcher_exclusive = true;
 | 
			
		||||
        }
 | 
			
		||||
        {
 | 
			
		||||
          name = "switcher";
 | 
			
		||||
          prefix = "/";
 | 
			
		||||
        }
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  xdg.configFile."walker/style.css".source = impurity.link ./style.css;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										87
									
								
								modules/user/modules/walker/style.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								modules/user/modules/walker/style.css
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,87 @@
 | 
			
		|||
* {
 | 
			
		||||
  color: white;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#window {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#box {
 | 
			
		||||
  background: #c0ffff30;
 | 
			
		||||
  padding: 7px;
 | 
			
		||||
 | 
			
		||||
  border: 1px solid #ffffff50;
 | 
			
		||||
  border-radius: 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#search,
 | 
			
		||||
#typeahead {
 | 
			
		||||
  border-radius: 0;
 | 
			
		||||
  outline: none;
 | 
			
		||||
  outline-width: 0px;
 | 
			
		||||
  box-shadow: none;
 | 
			
		||||
  border-bottom: none;
 | 
			
		||||
  border: none;
 | 
			
		||||
  background: #e0ffff30;
 | 
			
		||||
  padding-left: 10px;
 | 
			
		||||
  padding-right: 10px;
 | 
			
		||||
  padding-top: 0px;
 | 
			
		||||
  padding-bottom: 0px;
 | 
			
		||||
  border-radius: 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#typeahead {
 | 
			
		||||
  background: none;
 | 
			
		||||
  opacity: 0.5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#search placeholder {
 | 
			
		||||
  opacity: 0.5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#search text {
 | 
			
		||||
    padding-left: 7px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#list {
 | 
			
		||||
  background: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#list *:selected {
 | 
			
		||||
  border-radius: 5px;
 | 
			
		||||
  border: 1px solid #ffffff30;
 | 
			
		||||
  background: #e0ffff20;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.item {
 | 
			
		||||
  padding: 5px;
 | 
			
		||||
  border-radius: 2px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.icon {
 | 
			
		||||
  padding-right: 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.textwrapper {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.label {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.sub {
 | 
			
		||||
  opacity: 0.5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.activationlabel {
 | 
			
		||||
  opacity: 0.25;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.activation .activationlabel {
 | 
			
		||||
  opacity: 1;
 | 
			
		||||
  color: #76946a;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.activation .textwrapper,
 | 
			
		||||
.activation .icon,
 | 
			
		||||
.activation .search {
 | 
			
		||||
  opacity: 0.5;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue