add logic to control hyprland gaps and rounding based on screencorners and padding
This commit is contained in:
parent
f1a947e02e
commit
6a038fc7dd
38
Colors.qml
38
Colors.qml
@ -5,25 +5,25 @@ import Quickshell
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: customColors
|
id: customColors
|
||||||
// Core Backgrounds
|
// Core Backgrounds
|
||||||
readonly property color background: "#1A1B26"
|
readonly property color background: "#1D2021"
|
||||||
readonly property color foreground: "#C0CAF5"
|
readonly property color foreground: "#D5C4A1"
|
||||||
readonly property color cursor: "#C0CAF5"
|
readonly property color cursor: "#D5C4A1"
|
||||||
|
|
||||||
// The 16 Colors of the Apocalypse
|
// The 16 Colors of the Apocalypse
|
||||||
readonly property color color0: "#414868"
|
readonly property color color0: "#1D2021"
|
||||||
readonly property color color1: "#F7768E"
|
readonly property color color1: "#FB4934"
|
||||||
readonly property color color2: "#9ECE6A"
|
readonly property color color2: "#B8BB26"
|
||||||
readonly property color color3: "#E0AF68"
|
readonly property color color3: "#FABD2F"
|
||||||
readonly property color color4: "#7AA2F7"
|
readonly property color color4: "#83A598"
|
||||||
readonly property color color5: "#BB9AF7"
|
readonly property color color5: "#D3869B"
|
||||||
readonly property color color6: "#7DCFFF"
|
readonly property color color6: "#8EC07C"
|
||||||
readonly property color color7: "#A9B1D6"
|
readonly property color color7: "#D5C4A1"
|
||||||
readonly property color color8: "#414868"
|
readonly property color color8: "#665C54"
|
||||||
readonly property color color9: "#F7768E"
|
readonly property color color9: "#FB4934"
|
||||||
readonly property color color10: "#9ECE6A"
|
readonly property color color10: "#B8BB26"
|
||||||
readonly property color color11: "#E0AF68"
|
readonly property color color11: "#FABD2F"
|
||||||
readonly property color color12: "#7AA2F7"
|
readonly property color color12: "#83A598"
|
||||||
readonly property color color13: "#BB9AF7"
|
readonly property color color13: "#D3869B"
|
||||||
readonly property color color14: "#7DCFFF"
|
readonly property color color14: "#8EC07C"
|
||||||
readonly property color color15: "#C0CAF5"
|
readonly property color color15: "#FBF1C7"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
import Quickshell
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: settingsView
|
id: settingsView
|
||||||
@ -16,13 +16,13 @@ FileView {
|
|||||||
property string currentWall: ""
|
property string currentWall: ""
|
||||||
property string wallDir: "/home/lucy/.walls/"
|
property string wallDir: "/home/lucy/.walls/"
|
||||||
property string font: "CommitMono Nerd Font Propo"
|
property string font: "CommitMono Nerd Font Propo"
|
||||||
property real fontSize: 14
|
property real fontSize: 12
|
||||||
|
|
||||||
onCurrentWallChanged: settingsView.writeAdapter()
|
|
||||||
onWallDirChanged: settingsView.writeAdapter()
|
|
||||||
onFontChanged: settingsView.writeAdapter()
|
|
||||||
onFontSizeChanged: settingsView.writeAdapter()
|
|
||||||
}
|
}
|
||||||
|
onCurrentWallChanged: writeAdapter()
|
||||||
|
onWallDirChanged: writeAdapter()
|
||||||
|
onFontChanged: writeAdapter()
|
||||||
|
onFontSizeChanged: writeAdapter()
|
||||||
|
|
||||||
property alias currentWall: jsonAdapter.currentWall
|
property alias currentWall: jsonAdapter.currentWall
|
||||||
property alias font: jsonAdapter.font
|
property alias font: jsonAdapter.font
|
||||||
property alias fontSize: jsonAdapter.fontSize
|
property alias fontSize: jsonAdapter.fontSize
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Io
|
||||||
import "../../"
|
import "../../"
|
||||||
import "."
|
import "."
|
||||||
|
|
||||||
@ -8,7 +9,29 @@ WlrLayershell {
|
|||||||
id: overlayRoot
|
id: overlayRoot
|
||||||
required property var modelData
|
required property var modelData
|
||||||
property var padding: 5
|
property var padding: 5
|
||||||
|
property var rounding: 20
|
||||||
|
onPaddingChanged: {
|
||||||
|
hyprGaps.exec(hyprGaps.command);
|
||||||
|
console.log(hyprGaps.command);
|
||||||
|
}
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: hyprGaps
|
||||||
|
running: true
|
||||||
|
property bool isZero: overlayRoot.padding === 0
|
||||||
|
property var top: isZero ? 10 : overlayRoot.padding * 2
|
||||||
|
property var sides: overlayRoot.padding + top
|
||||||
|
property var gaps: top + "," + sides + "," + sides + "," + sides
|
||||||
|
command: ["hyprctl", "keyword", "general:gaps_out", gaps]
|
||||||
|
onStarted: console.log("set gaps to ", gaps)
|
||||||
|
}
|
||||||
|
Process {
|
||||||
|
id: hyprRounding
|
||||||
|
property var rounding: overlayRoot.rounding - 5
|
||||||
|
running: true
|
||||||
|
command: ["hyprctl", "keyword", "decoration:rounding", rounding]
|
||||||
|
onStarted: console.log("set rounding to ", overlayRoot.rounding)
|
||||||
|
}
|
||||||
// 1. Fill the entire screen
|
// 1. Fill the entire screen
|
||||||
anchors {
|
anchors {
|
||||||
top: true
|
top: true
|
||||||
@ -35,7 +58,8 @@ WlrLayershell {
|
|||||||
}
|
}
|
||||||
ScreenCorners {
|
ScreenCorners {
|
||||||
// Adjust these to match your screen's aesthetic
|
// Adjust these to match your screen's aesthetic
|
||||||
cornerRadius: 20
|
cornerRadius: overlayRoot.rounding
|
||||||
|
margin: overlayRoot.padding
|
||||||
cornerColor: Colors.background
|
cornerColor: Colors.background
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ Item {
|
|||||||
|
|
||||||
// Enable/Disable toggle
|
// Enable/Disable toggle
|
||||||
property bool shouldShow: true
|
property bool shouldShow: true
|
||||||
|
property real margin
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
@ -42,9 +43,9 @@ Item {
|
|||||||
|
|
||||||
// Margins (Leave 0 unless your bar overlaps)
|
// Margins (Leave 0 unless your bar overlaps)
|
||||||
readonly property real topMargin: 0
|
readonly property real topMargin: 0
|
||||||
readonly property real bottomMargin: 5
|
readonly property real bottomMargin: root.margin
|
||||||
readonly property real leftMargin: 5
|
readonly property real leftMargin: root.margin
|
||||||
readonly property real rightMargin: 5
|
readonly property real rightMargin: root.margin
|
||||||
|
|
||||||
readonly property real screenWidth: cornersShape.width
|
readonly property real screenWidth: cornersShape.width
|
||||||
readonly property real screenHeight: cornersShape.height
|
readonly property real screenHeight: cornersShape.height
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user