Watch
1
0
Fork
You've already forked Zoe-Dotfiles
0
mirror of synced 2026-11-03 21:57:18 +00:00

Compare commits

...
Author SHA1 Message Date
MysteryBirb
496b047425 Slight emacs and zgit update 2026-10-02 00:23:02 +02:00
MysteryBirb
ecf0cc6a68 Updated my own swayshell just for funsies 2026-10-02 00:05:28 +02:00
3 changed files with 323 additions and 311 deletions

View file

@ -10,10 +10,13 @@
;; 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 0 : kills one window ;; C-x 1 : Kill djacent 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
@ -30,7 +33,7 @@
:ensure t :ensure t
:init :init
(defvar evil-mode-buffers '()) (defvar evil-mode-buffers '())
;; Error in post-command-hook (evil-normal-post-command): (void-variable evil-mode-buffers) ;; ^ Only fix for "Error in post-command-hook (evil-normal-post-command): (void-variable evil-mode-buffers)" i could find
;;(setq evil-want-keybinding nil) ;;(setq evil-want-keybinding nil)
(evil-mode 1) (evil-mode 1)
:config :config
@ -64,16 +67,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)))
@ -83,8 +86,7 @@
(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
@ -147,8 +149,6 @@
;; 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,17 +10,16 @@ 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
// Work in progress (Audio) // Zoe here, ignore the wide ass code, emacs qml-mode adds 2 on my tab-width for some reason
PanelWindow { PanelWindow {
id: root id: root
property color colBg: "#64320a" property color colBg: "#454545"
property color colAppBg: "#2d1405" property color colAppBg: "#333333"
property color colFg: "#d2d2d2" property color colFg: "#ffffff"
property color colDark: "#230f05" property string fontFamily: "Hack Nerd Font"
property string fontFamily: "Noto Sans" property int fontSize: 16
property int fontSize: 18
property int appletRadHeight: 25 property int appletRadHeight: 25
property int appletSpacing: 6 property int appletSpacing: 6
@ -29,9 +28,10 @@ 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 + 10 implicitHeight: root.appletRadHeight + 5
margins { margins {
right: 5 right: 0 // 5
left: 5 left: 0 // 5
top: 5 top: 0 // 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,7 +71,6 @@ 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
@ -107,7 +106,7 @@ PanelWindow {
} }
} }
} }
/* /*
RowLayout { RowLayout {
id: centerRow id: centerRow
spacing: root.appletSpacing spacing: root.appletSpacing
@ -122,7 +121,6 @@ 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"]
@ -174,14 +172,16 @@ PanelWindow {
leftPadding: 10 leftPadding: 10
Loader { Loader {
id: statLoader id: batLoader
active: true active: true
sourceComponent: Rectangle { sourceComponent: Rectangle {
id: batRect id: batRect
height: root.appletRadHeight clip: true
width: batText.paintedWidth + root.appletRadHeight
radius: root.appletRadHeight
color: root.colAppBg color: root.colAppBg
visible: UPower.displayDevice.isPresent
implicitHeight: root.appletRadHeight
implicitWidth: batText.implicitWidth + 25
radius: root.appletRadHeight
function getBatStat() { function getBatStat() {
if (UPower.displayDevice.state == UPowerDeviceState.Discharging) { if (UPower.displayDevice.state == UPowerDeviceState.Discharging) {
@ -209,13 +209,14 @@ 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
@ -238,6 +239,43 @@ 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
}
}
} }
} }
} }
@ -245,85 +283,59 @@ PanelWindow {
Row { Row {
id: clockRow id: clockRow
Rectangle { Rectangle {
height: root.appletRadHeight id: clockRect
width: clock.paintedWidth + root.appletRadHeight clip: true
radius: root.appletRadHeight implicitHeight: root.appletRadHeight
implicitWidth: clockText.implicitWidth + 25
color: root.colAppBg color: root.colAppBg
radius: root.appletRadHeight
Text { SystemClock {
id: clock id: clock
anchors.centerIn: parent precision: SystemClock.Seconds
anchors.right: parent.right }
text: Qt.formatDateTime(new Date(), "yyyy.MM.dd - HH:mm:ss") Text {
id: clockText
anchors.centerIn: clockRect
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
implicitHeight: root.appletRadHeight
implicitWidth: trayRow.implicitWidth + 10
radius: root.appletRadHeight
color: root.colAppBg color: root.colAppBg
anchors.centerIn: parent visible: iconRepeater.count != 0
radius: root.appletRadHeight
Row { Layout.fillHeight: true
id: trayRow implicitHeight: root.appletRadHeight
spacing: root.appletSpacing implicitWidth: iconlayout.implicitWidth + 16
anchors.verticalCenter: parent.verticalCenter
anchors.centerIn: parent
RowLayout {
id: iconlayout
anchors.centerIn: trayRect
Repeater { Repeater {
id: trayRepeater id: iconRepeater
model: SystemTray.items model: SystemTray.items
delegate: WrapperMouseArea {
MouseArea { id: iconWrapper
id: trayMouse required property var modelData
property var bar: trayMouse.QsWindow.window child: IconImage {
required property SystemTrayItem modelData source: iconWrapper.modelData.icon
implicitSize: 16
acceptedButtons: Qt.LeftButton | Qt.RightButton
implicitWidth: 16
implicitHeight: 16
onClicked: event => {
if (event.button === Qt.LeftButton) {
modelData.activate();
} }
else if (modelData.hasMenu) {
menu.open();
}
}
QsMenuAnchor { QsMenuAnchor {
id: menu id: menu
menu: trayMouse.modelData.hasMenu ? trayMouse.modelData.menu : null anchor.item: iconWrapper
anchor.item: trayMouse menu: modelData.menu
} }
acceptedButtons: Qt.LeftButton | Qt.RightButton
IconImage { onClicked: mouse => {
id: trayIcon if (mouse.button == Qt.RightButton) {
width: parent.implicitWidth menu.open();
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 ]; then if [ -f $s ] || [ -d $s ]; then
git add $s git add $s
read -p "Commit message: " commitMsg read -p "Commit message: " commitMsg
tmp="${commitMsg%\"}" tmp="${commitMsg%\"}"