Watch
1
0
Fork
You've already forked Zoe-Dotfiles
0
mirror of synced 2026-11-05 01:37:18 +00:00

Compare commits

..
3 changed files with 311 additions and 323 deletions

View file

@ -10,13 +10,10 @@
;; C-x RIGHT | LEFT : switches between buffers left and right ;; C-x RIGHT | LEFT : switches between buffers left and right
;; C-x b : switch to buffer with its name ;; C-x b : switch to buffer with its name
;; C-x 2 | 3 : split window horizontally or vertical ;; C-x 2 | 3 : split window horizontally or vertical
;; C-x 1 : Kill djacent window ;; C-x 0 : kills one window
;; C-x 0 : kills current active window
;; C-x C-q : toggle read-only mode ;; C-x C-q : toggle read-only mode
;; C-M-f : Goes to next closing bracket
;; C-M-b : Goes to next opening bracket
;; M-x cd : change dir duh ;; M-x cd : change dir duh
;; M-y : to paste into vterm or generally(?) ;; M-y : to paste into vterm or generally
;; M-x package-list-packages RET Ux : updates packages ;; M-x package-list-packages RET Ux : updates packages
;; M-x eglot-inlay-hints-mode : cool info for code ;; M-x eglot-inlay-hints-mode : cool info for code
;; M-ESC : Escapes corfu prompt ;; M-ESC : Escapes corfu prompt
@ -33,7 +30,7 @@
:ensure t :ensure t
:init :init
(defvar evil-mode-buffers '()) (defvar evil-mode-buffers '())
;; ^ Only fix for "Error in post-command-hook (evil-normal-post-command): (void-variable evil-mode-buffers)" i could find ;; Error in post-command-hook (evil-normal-post-command): (void-variable evil-mode-buffers)
;;(setq evil-want-keybinding nil) ;;(setq evil-want-keybinding nil)
(evil-mode 1) (evil-mode 1)
:config :config
@ -67,16 +64,16 @@
;; Vterm ;; Vterm
(use-package vterm (use-package vterm
:ensure t
:config :config
(add-hook 'vterm-mode-hook (lambda () (setq evil-default-state 'emacs)))) (add-hook 'vterm-mode-hook (lambda () (setq evil-default-state 'emacs)))
:ensure t)
;; QML ;; QML
(use-package qml-mode :ensure t) (use-package qml-mode :ensure t)
;; LSP / Eglot ;; LSP / Eglot
;;(setq eglot-ignored-server-capabilities '(:documentOnTypeFormattingProvider :documentFormattingProvider :documentRangeFormattingProvider)) (setq eglot-ignored-server-capabilities '(:documentOnTypeFormattingProvider :documentFormattingProvider :documentRangeFormattingProvider))
;; (add-hook 'nix-mode-hook #'eglot-ensure) ;;(for nix) ;; (add-hook 'nix-mode-hook #'eglot-ensure) ;;(for nix)
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1))) (add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)))
@ -86,7 +83,8 @@
(with-eval-after-load 'eglot (with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs '(c-mode . ("clangd"))) (add-to-list 'eglot-server-programs '(c-mode . ("clangd")))
(add-to-list 'eglot-server-programs '(c++-mode . ("clangd"))) (add-to-list 'eglot-server-programs '(c++-mode . ("clangd")))
(add-to-list 'eglot-server-programs '(qml-mode . ("~/Projects/Code/Random/qmlls")))) (add-to-list 'eglot-server-programs '(qml-mode . ("~/Projects/Code/Random/qmlls")))
(add-hook 'after-save-hook 'eglot-format))
;; Set some basic stuff up ;; Set some basic stuff up
@ -149,6 +147,8 @@
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(base16-theme-highlight-mode-line 'box) '(base16-theme-highlight-mode-line 'box)
'(eglot-ignored-server-capabilities
'(:documentFormattingProvider :documentRangeFormattingProvider))
'(package-selected-packages '(evil))) '(package-selected-packages '(evil)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.

View file

@ -10,16 +10,17 @@ import Quickshell.Services.Pipewire
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
// Some credit goes to my friends Lucy and Babsi // Some credit goes to my friends Lucy and Babsi
// Zoe here, ignore the wide ass code, emacs qml-mode adds 2 on my tab-width for some reason // Work in progress (Audio)
PanelWindow { PanelWindow {
id: root id: root
property color colBg: "#454545" property color colBg: "#64320a"
property color colAppBg: "#333333" property color colAppBg: "#2d1405"
property color colFg: "#ffffff" property color colFg: "#d2d2d2"
property string fontFamily: "Hack Nerd Font" property color colDark: "#230f05"
property int fontSize: 16 property string fontFamily: "Noto Sans"
property int fontSize: 18
property int appletRadHeight: 25 property int appletRadHeight: 25
property int appletSpacing: 6 property int appletSpacing: 6
@ -28,10 +29,9 @@ PanelWindow {
property var lastCpuIdle: 0 property var lastCpuIdle: 0
property var lastCpuTotal: 0 property var lastCpuTotal: 0
property real ramUsage: 0.00 property real ramUsage: 0.00
property var batTime: 0
property var batCharMin: (UPower.displayDevice.timeToFull / 60).toFixed(2) property var batCharMin: (UPower.displayDevice.timeToFull / 60).toFixed(2)
property var batDisMin: (UPower.displayDevice.timeToEmpty / 60).toFixed(2) property var batDisMin: (UPower.displayDevice.timeToEmpty / 60).toFixed(2)
property var batTime: 0
anchors { anchors {
right: true right: true
@ -40,17 +40,17 @@ PanelWindow {
} }
color: "transparent" color: "transparent"
implicitHeight: root.appletRadHeight + 5 implicitHeight: root.appletRadHeight + 10
margins { margins {
right: 0 // 5 right: 5
left: 0 // 5 left: 5
top: 0 // 5 top: 5
bottom: 0 bottom: 0
} }
Rectangle { Rectangle {
color: root.colBg color: root.colBg
anchors.fill: parent anchors.fill: parent
// radius: root.appletRadHeight radius: root.appletRadHeight
} }
RowLayout { RowLayout {
@ -71,6 +71,7 @@ PanelWindow {
id: wsRepeater id: wsRepeater
model: I3.workspaces model: I3.workspaces
anchors.centerIn: parent anchors.centerIn: parent
property var ws: I3.workspaces
Rectangle { Rectangle {
id: workspaceNumber id: workspaceNumber
@ -121,6 +122,7 @@ PanelWindow {
spacing: root.appletSpacing spacing: root.appletSpacing
Item { Item {
Process { Process {
id: cpuProc id: cpuProc
command: ["sh", "-c", "head -1 /proc/stat"] command: ["sh", "-c", "head -1 /proc/stat"]
@ -172,16 +174,14 @@ PanelWindow {
leftPadding: 10 leftPadding: 10
Loader { Loader {
id: batLoader id: statLoader
active: true active: true
sourceComponent: Rectangle { sourceComponent: Rectangle {
id: batRect id: batRect
clip: true height: root.appletRadHeight
color: root.colAppBg width: batText.paintedWidth + root.appletRadHeight
visible: UPower.displayDevice.isPresent
implicitHeight: root.appletRadHeight
implicitWidth: batText.implicitWidth + 25
radius: root.appletRadHeight radius: root.appletRadHeight
color: root.colAppBg
function getBatStat() { function getBatStat() {
if (UPower.displayDevice.state == UPowerDeviceState.Discharging) { if (UPower.displayDevice.state == UPowerDeviceState.Discharging) {
@ -209,14 +209,13 @@ PanelWindow {
} }
} }
} }
Rectangle { Rectangle {
height: root.appletRadHeight height: root.appletRadHeight
width: cpuText.paintedWidth + 25 width: cpuText.paintedWidth + 25
radius: root.appletRadHeight radius: root.appletRadHeight
color: root.colAppBg color: root.colAppBg
Text { Text {
id: cpuText id: cpuText
anchors.centerIn: parent anchors.centerIn: parent
@ -239,43 +238,6 @@ PanelWindow {
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true } font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
} }
} }
Rectangle {
id: pwRect
color: root.colAppBg
property PwNode defaultAudio: Pipewire.ready ? Pipewire.preferredDefaultAudioSink : null
property bool mute: Pipewire.ready ? defaultAudio?.audio.muted : null
radius: root.appletRadHeight
implicitHeight: root.appletRadHeight
implicitWidth: pwText.implicitWidth + 25
PwObjectTracker {
objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null]
}
Process {
id: pavuLauncher
command: ["pavucontrol"]
running: false
}
Text {
id: pwText
anchors.centerIn: pwRect
color: root.colFg
opacity: pwRect.defaultAudio?.audio.muted ? 0.6 : 1.0
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
text: pwRect.mute ? "MUT: " + Math.floor(pwRect.defaultAudio?.audio.volume * 100) + "%" : "VOL: " + Math.floor(pwRect.defaultAudio?.audio.volume * 100) + "%"
}
MouseArea {
id: clickHandler
hoverEnabled: true
acceptedButtons: Qt.LeftButton
cursorShape: Qt.PointingHandCursor
anchors.fill: pwRect
onClicked: pavuLauncher.running = true
}
}
} }
} }
} }
@ -283,61 +245,87 @@ PanelWindow {
Row { Row {
id: clockRow id: clockRow
Rectangle { Rectangle {
id: clockRect height: root.appletRadHeight
clip: true width: clock.paintedWidth + root.appletRadHeight
implicitHeight: root.appletRadHeight
implicitWidth: clockText.implicitWidth + 25
color: root.colAppBg
radius: root.appletRadHeight radius: root.appletRadHeight
SystemClock { color: root.colAppBg
id: clock
precision: SystemClock.Seconds
}
Text { Text {
id: clockText id: clock
anchors.centerIn: clockRect anchors.centerIn: parent
anchors.right: parent.right
text: Qt.formatDateTime(new Date(), "yyyy.MM.dd - HH:mm:ss")
color: root.colFg color: root.colFg
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true } font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
text: Qt.formatDateTime(clock.date, "yyyy.MM.dd - hh:mm:ss")
Timer {
interval: 1000
running: true
repeat: true
onTriggered: clock.text = Qt.formatDateTime(new Date(), "yyyy.MM.dd - HH:mm:ss")
}
} }
} }
} }
Row { Row {
id: trayWholeRow id: trayWholeRow
rightPadding: 10 rightPadding: 10
Item{
id: miscItem
implicitHeight: root.appletRadHeight
implicitWidth: trayRect.implicitWidth
visible: trayRepeater.count > 0
Rectangle { Rectangle {
id: trayRect id: trayRect
color: root.colAppBg
visible: iconRepeater.count != 0
radius: root.appletRadHeight
Layout.fillHeight: true
implicitHeight: root.appletRadHeight implicitHeight: root.appletRadHeight
implicitWidth: iconlayout.implicitWidth + 16 implicitWidth: trayRow.implicitWidth + 10
radius: root.appletRadHeight
color: root.colAppBg
anchors.centerIn: parent
Row {
id: trayRow
spacing: root.appletSpacing
anchors.verticalCenter: parent.verticalCenter
anchors.centerIn: parent
RowLayout {
id: iconlayout
anchors.centerIn: trayRect
Repeater { Repeater {
id: iconRepeater id: trayRepeater
model: SystemTray.items model: SystemTray.items
delegate: WrapperMouseArea {
id: iconWrapper MouseArea {
required property var modelData id: trayMouse
child: IconImage { property var bar: trayMouse.QsWindow.window
source: iconWrapper.modelData.icon required property SystemTrayItem modelData
implicitSize: 16
}
QsMenuAnchor {
id: menu
anchor.item: iconWrapper
menu: modelData.menu
}
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: mouse => { implicitWidth: 16
if (mouse.button == Qt.RightButton) { implicitHeight: 16
onClicked: event => {
if (event.button === Qt.LeftButton) {
modelData.activate();
}
else if (modelData.hasMenu) {
menu.open(); menu.open();
} }
} }
QsMenuAnchor {
id: menu
menu: trayMouse.modelData.hasMenu ? trayMouse.modelData.menu : null
anchor.item: trayMouse
}
IconImage {
id: trayIcon
width: parent.implicitWidth
height: parent.implicitHeight
source: trayMouse.modelData.icon
anchors.centerIn: parent
}
}
} }
} }
} }

2
zgit
View file

@ -14,7 +14,7 @@ while getopts "a:s:" o; do
;; ;;
s) s)
s=${OPTARG} s=${OPTARG}
if [ -f $s ] || [ -d $s ]; then if [ -f $s ]; then
git add $s git add $s
read -p "Commit message: " commitMsg read -p "Commit message: " commitMsg
tmp="${commitMsg%\"}" tmp="${commitMsg%\"}"