Initial commit

This commit is contained in:
Ceres 2026-01-11 23:23:04 +00:00
commit f94fd70f07
Signed by: ceres-sees-all
GPG key ID: 9814758436430045
151 changed files with 7650 additions and 0 deletions

View file

@ -0,0 +1,74 @@
//@ pragma IconTheme Adwaita
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Widgets
import Quickshell.Services.UPower
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "../Config"
PanelWindow {
anchors {
bottom: true
right: true
}
width: text.width + 70
color: "transparent"
function getIcon() {
if (UPower.displayDevice.percentage > 0.9) {
if (UPower.onBattery == false) {
return "xfce4-battery-full-charging"
}
else {
return "xfce4-battery-full"
}
}
else if (0.5 < UPower.displayDevice.percentage) {
if (UPower.onBattery == false) {
return "xfce4-battery-ok-charging"
}
else {
return "xfce4-battery-ok"
}
}
else if (0.1 < UPower.displayDevice.percentage) {
if (UPower.onBattery == false) {
return "xfce4-battery-low-charging"
}
else {
return "xfce4-battery-low"
}
}
}
Rectangle {
anchors.fill: parent
topLeftRadius: 20
opacity: 0.95
color: Colours.colour1
Row {
anchors.verticalCenter: parent.verticalCenter
IconImage {
anchors.verticalCenter: parent.verticalCenter
width: 50
height: 50
source: Quickshell.iconPath(getIcon())
}
Text {
id: text
color: Colours.foreground
font.family: "Departure Mono"
font.pixelSize: 50
text: Math.floor(UPower.displayDevice.percentage * 100) + "%"
}
}
}
}

View file

@ -0,0 +1,56 @@
//@ pragma IconTheme Adwaita
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "../Config"
PanelWindow {
anchors {
bottom: true
left: true
}
width: text.width + 20
color: "transparent"
Rectangle {
anchors.fill: parent
topRightRadius: 20
opacity: 0.95
color: Colours.colour1
Text {
id: text
anchors.centerIn: parent
color: Colours.foreground
font.family: "Departure Mono"
font.pixelSize: 50
Process {
id: dateProc
command: ["date"]
running: true
stdout: StdioCollector {
onStreamFinished: clock.text = this.text
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: text.text = Qt.formatDateTime(new Date(), "HH:mm")
}
}
}
}

View file

@ -0,0 +1,178 @@
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "../Config"
PanelWindow {
id: launcher
anchors.top: true
property var open: false
property int selectedIndex: 0
readonly property list<DesktopEntry> visibleEntries: Array.from(DesktopEntries.applications.values).sort((d1, d2) => d1.name.localeCompare(d2.name)).filter(application => application.name.toLowerCase().includes(search.text.toLowerCase()))
function genHeight() {
if (launcher.visibleEntries.length > Config.launcherVisibleEntries) {
return ((search.height * (Config.launcherVisibleEntries + 1) + Config.launcherOuterPadding))
}
else {
return (search.height * (launcher.visibleEntries.length + 1) + Config.launcherOuterPadding)
}
}
implicitHeight: open ? genHeight() : 0
implicitWidth: 500
color: "transparent"
visible: open ? true : false
Behavior on implicitHeight {
NumberAnimation {
duration: 80
easing.type: Easing.InOutQuad
easing.overshoot: 2
}
}
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
exclusionMode: ExclusionMode.Ignore
Rectangle {
id: rect
anchors.fill: parent
color: Colours.background
opacity: 0.9
bottomLeftRadius: 20
bottomRightRadius: 20
ColumnLayout {
id: content
anchors.fill: parent
Row{
Rectangle {
color: "transparent"
width: Config.launcherOuterPadding
height: search.height
}
Rectangle {
height: search.height
width: search.height
color: "transparent"
IconImage {
anchors.centerIn: parent
source: Quickshell.iconPath("search-icon")
height: search.height
width: search.height
}
}
Rectangle {
color: "transparent"
width: launcher.width - search.height - (2 * Config.launcherOuterPadding)
height: search.height
TextField {
id: search
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
focus: true
placeholderText: "Search..."
background: null
color: Colours.foreground
placeholderTextColor: Colours.colour0
Keys.onPressed: event => {
if (event.key == Qt.Key_Return) {
launcher.open = false;
launcher.visibleEntries[launcher.selectedIndex].execute();
}
if (event.key == Qt.Key_Down) {
if (list.currentIndex < (launcher.visibleEntries.length-1)) {
list.currentIndex++;
}
event.accepted = true;
}
if (event.key == Qt.Key_Up) {
if (list.currentIndex > 0) {
list.currentIndex--;
}
event.accepted = true;
}
if (event.key == Qt.Key_Escape) {
launcher.open = false;
event.accepted = true;
}
}
}
}
Rectangle {
color: "transparent"
width: Config.launcherOuterPadding
height: search.height
}
}
ListView {
id: list
model: launcher.visibleEntries
Layout.fillWidth: true
Layout.fillHeight: true
clip: true
preferredHighlightBegin: 0
highlight: Rectangle { color: Colours.colour1; radius:20 }
currentIndex: 0
delegate: Row {
Rectangle {
color: "transparent"
width: Config.launcherOuterPadding
height: search.height
}
Rectangle {
color: "transparent"
height: search.height
width: search.height
IconImage {
source: Quickshell.iconPath(modelData.icon, true)
height:search.height
width: search.height
}
}
Rectangle {
color: "transparent"
height: search.height
width: launcher.width - search.height - Config.launcherOuterPadding
Text{
color: Colours.foreground
text: modelData.name
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
}
IpcHandler {
target: "launcher"
function toggle() {
search.text = ""
launcher.open = !launcher.open
}
}
}

View file

@ -0,0 +1,237 @@
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Widgets
import QtQuick
import Qt.labs.folderlistmodel
import QtQuick.Layouts
import QtQuick.Controls
import "../Config"
PanelWindow {
id: pass
anchors.bottom: true
property var open: false
property int selectedIndex: 0
property string passLocation: ""
function genHeight() {
if (folderModel.count > 5) {
return 200
}
else {
return (search.height * (folderModel.count + 1)) + Config.launcherOuterPadding
}
}
Process {
id: passCopy
running: false
command: ["pass", "-c", passLocation]
}
Process {
id: userCopy
running: false
command: ["pass", "-c2", passLocation]
stdout: StdioCollector {
onStreamFinished: passCopy.running = true
}
}
function goBack() {
var lastSlash = list.currentItem.filePath.lastIndexOf('/')
var currentDir = list.currentItem.filePath.substring(0, lastSlash)
var lastSlash = currentDir.lastIndexOf('/')
var parentDir = currentDir.substring(0, lastSlash)
if (currentDir == "/home/ceres/.password-store") {
return;
}
else {
folderModel.folder = "file://" + parentDir
}
}
function copyPass() {
if(list.currentItem.fileIsDir==true) {
folderModel.folder = folderModel.folder+"/"+list.currentItem.fileBaseName
}
else {
passLocation = list.currentItem.filePath
passLocation = passLocation.replace("/home/ceres/.password-store/", "")
passLocation = passLocation.replace(".gpg", "")
userCopy.running = true
pass.open = false
search.text = ""
folderModel.folder = "file:///home/ceres/.password-store"
}
}
implicitHeight: open ? genHeight() : 0
implicitWidth: 500
color: "transparent"
visible: open ? true : false
Behavior on implicitHeight {
NumberAnimation {
duration: 80
easing.type: Easing.InOutQuad
easing.overshoot: 2
}
}
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
exclusionMode: ExclusionMode.Ignore
Rectangle {
id: rect
anchors.fill: parent
color: Colours.background
opacity: 0.9
topLeftRadius: 20
topRightRadius: 20
ColumnLayout {
id: content
anchors.fill: parent
Row{
Rectangle {
color: "transparent"
width: Config.launcherOuterPadding
height: search.height
}
Rectangle {
height: search.height
width: search.height
color: "transparent"
IconImage {
anchors.centerIn: parent
source: Quickshell.iconPath("search-icon")
height: search.height
width: search.height
}
}
Rectangle {
color: "transparent"
width: pass.width - search.height - (2 * Config.launcherOuterPadding)
height: search.height
TextField {
id: search
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
focus: true
placeholderText: "Search..."
background: null
color: Colours.foreground
placeholderTextColor: Colours.colour0
Keys.onPressed: event => {
if (event.key == Qt.Key_Return) {
copyPass();
event.accepted = true;
}
if (event.key == Qt.Key_Down) {
if(list.currentIndex<folderModel.count-1) {
list.currentIndex++;
}
event.accepted = true;
}
if (event.key == Qt.Key_Up) {
if (list.currentIndex > 0) {
list.currentIndex--;
}
event.accepted = true;
}
if (event.key == Qt.Key_Escape) {
pass.open = false;
list.currentIndex = 0
folderModel.folder = "file:///home/ceres/.password-store"
event.accepted = true;
}
if (event.key == Qt.Key_Tab) {
goBack();
event.accepted = true;
}
}
}
}
Rectangle {
color: "transparent"
width: Config.launcherOuterPadding
height: search.height
}
}
FolderListModel {
id: folderModel
folder: "file:///home/ceres/.password-store"
caseSensitive: false
showDirs: search.text === "" ? true : false
showDirsFirst: true
nameFilters: "*"+search.text+"*"
}
ListView {
id: list
model: folderModel
Layout.fillWidth: true
Layout.fillHeight: true
clip: true
preferredHighlightBegin: 0
highlight: Rectangle { color: Colours.colour1; radius:20 }
currentIndex: 0
delegate: Row {
required property string fileBaseName
required property bool fileIsDir
required property string filePath
Rectangle {
color: "transparent"
width: Config.launcherOuterPadding
height: search.height
}
Rectangle {
color: "transparent"
height: search.height
width: pass.width - (2 * Config.launcherOuterPadding)
Text{
function genText() {
if(fileIsDir==true) {
return fileBaseName+"/"
}
else {
return fileBaseName
}
}
color: Colours.foreground
text: genText()
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
}
IpcHandler {
target: "pass"
function toggle() {
search.text = ""
pass.open = !pass.open
}
}
}

View file

@ -0,0 +1,22 @@
import Quickshell
import QtQuick
import Quickshell.Wayland
PanelWindow {
id: background
anchors {
left: true
right: true
bottom: true
top: true
}
WlrLayershell.layer: WlrLayer.Background
Image {
width: background.width
height: background.height
source: "/home/ceres/.local/state/niri/wallpaper"
fillMode: Image.PreserveAspectCrop
}
}

View file

@ -0,0 +1,33 @@
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "../Config"
ShellRoot{
id: widgets
property var open: false
Battery {
visible: open ? true : false
height: open ? 80 : 0
}
Clock {
visible: open ? true : false
height: open ? 80 : 0
}
IpcHandler {
target: "widgets"
function toggle() {
widgets.open = !widgets.open
}
}
}