Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
496b047425 | ||
|
|
ecf0cc6a68 |
3 changed files with 323 additions and 311 deletions
|
|
@ -10,10 +10,13 @@
|
|||
;; C-x RIGHT | LEFT : switches between buffers left and right
|
||||
;; C-x b : switch to buffer with its name
|
||||
;; 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-M-f : Goes to next closing bracket
|
||||
;; C-M-b : Goes to next opening bracket
|
||||
;; 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 eglot-inlay-hints-mode : cool info for code
|
||||
;; M-ESC : Escapes corfu prompt
|
||||
|
|
@ -30,7 +33,7 @@
|
|||
:ensure t
|
||||
:init
|
||||
(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)
|
||||
(evil-mode 1)
|
||||
:config
|
||||
|
|
@ -64,16 +67,16 @@
|
|||
|
||||
;; Vterm
|
||||
(use-package vterm
|
||||
:ensure t
|
||||
:config
|
||||
(add-hook 'vterm-mode-hook (lambda () (setq evil-default-state 'emacs)))
|
||||
:ensure t)
|
||||
(add-hook 'vterm-mode-hook (lambda () (setq evil-default-state 'emacs))))
|
||||
|
||||
;; QML
|
||||
(use-package qml-mode :ensure t)
|
||||
|
||||
;; 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 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)))
|
||||
|
|
@ -83,8 +86,7 @@
|
|||
(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 '(qml-mode . ("~/Projects/Code/Random/qmlls")))
|
||||
(add-hook 'after-save-hook 'eglot-format))
|
||||
(add-to-list 'eglot-server-programs '(qml-mode . ("~/Projects/Code/Random/qmlls"))))
|
||||
|
||||
;; Set some basic stuff up
|
||||
|
||||
|
|
@ -147,8 +149,6 @@
|
|||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(base16-theme-highlight-mode-line 'box)
|
||||
'(eglot-ignored-server-capabilities
|
||||
'(:documentFormattingProvider :documentRangeFormattingProvider))
|
||||
'(package-selected-packages '(evil)))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
|
|
|
|||
|
|
@ -10,17 +10,16 @@ import Quickshell.Services.Pipewire
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
// 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 {
|
||||
id: root
|
||||
|
||||
property color colBg: "#64320a"
|
||||
property color colAppBg: "#2d1405"
|
||||
property color colFg: "#d2d2d2"
|
||||
property color colDark: "#230f05"
|
||||
property string fontFamily: "Noto Sans"
|
||||
property int fontSize: 18
|
||||
property color colBg: "#454545"
|
||||
property color colAppBg: "#333333"
|
||||
property color colFg: "#ffffff"
|
||||
property string fontFamily: "Hack Nerd Font"
|
||||
property int fontSize: 16
|
||||
property int appletRadHeight: 25
|
||||
property int appletSpacing: 6
|
||||
|
||||
|
|
@ -29,9 +28,10 @@ PanelWindow {
|
|||
property var lastCpuIdle: 0
|
||||
property var lastCpuTotal: 0
|
||||
property real ramUsage: 0.00
|
||||
property var batTime: 0
|
||||
|
||||
property var batCharMin: (UPower.displayDevice.timeToFull / 60).toFixed(2)
|
||||
property var batDisMin: (UPower.displayDevice.timeToEmpty / 60).toFixed(2)
|
||||
property var batTime: 0
|
||||
|
||||
anchors {
|
||||
right: true
|
||||
|
|
@ -40,17 +40,17 @@ PanelWindow {
|
|||
}
|
||||
|
||||
color: "transparent"
|
||||
implicitHeight: root.appletRadHeight + 10
|
||||
implicitHeight: root.appletRadHeight + 5
|
||||
margins {
|
||||
right: 5
|
||||
left: 5
|
||||
top: 5
|
||||
right: 0 // 5
|
||||
left: 0 // 5
|
||||
top: 0 // 5
|
||||
bottom: 0
|
||||
}
|
||||
Rectangle {
|
||||
color: root.colBg
|
||||
anchors.fill: parent
|
||||
radius: root.appletRadHeight
|
||||
// radius: root.appletRadHeight
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
@ -71,7 +71,6 @@ PanelWindow {
|
|||
id: wsRepeater
|
||||
model: I3.workspaces
|
||||
anchors.centerIn: parent
|
||||
property var ws: I3.workspaces
|
||||
|
||||
Rectangle {
|
||||
id: workspaceNumber
|
||||
|
|
@ -107,7 +106,7 @@ PanelWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
/*
|
||||
RowLayout {
|
||||
id: centerRow
|
||||
spacing: root.appletSpacing
|
||||
|
|
@ -122,7 +121,6 @@ PanelWindow {
|
|||
spacing: root.appletSpacing
|
||||
|
||||
Item {
|
||||
|
||||
Process {
|
||||
id: cpuProc
|
||||
command: ["sh", "-c", "head -1 /proc/stat"]
|
||||
|
|
@ -174,14 +172,16 @@ PanelWindow {
|
|||
leftPadding: 10
|
||||
|
||||
Loader {
|
||||
id: statLoader
|
||||
id: batLoader
|
||||
active: true
|
||||
sourceComponent: Rectangle {
|
||||
id: batRect
|
||||
height: root.appletRadHeight
|
||||
width: batText.paintedWidth + root.appletRadHeight
|
||||
radius: root.appletRadHeight
|
||||
clip: true
|
||||
color: root.colAppBg
|
||||
visible: UPower.displayDevice.isPresent
|
||||
implicitHeight: root.appletRadHeight
|
||||
implicitWidth: batText.implicitWidth + 25
|
||||
radius: root.appletRadHeight
|
||||
|
||||
function getBatStat() {
|
||||
if (UPower.displayDevice.state == UPowerDeviceState.Discharging) {
|
||||
|
|
@ -209,13 +209,14 @@ PanelWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
height: root.appletRadHeight
|
||||
width: cpuText.paintedWidth + 25
|
||||
radius: root.appletRadHeight
|
||||
color: root.colAppBg
|
||||
|
||||
|
||||
Text {
|
||||
id: cpuText
|
||||
anchors.centerIn: parent
|
||||
|
|
@ -238,6 +239,43 @@ PanelWindow {
|
|||
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 {
|
||||
id: clockRow
|
||||
Rectangle {
|
||||
height: root.appletRadHeight
|
||||
width: clock.paintedWidth + root.appletRadHeight
|
||||
radius: root.appletRadHeight
|
||||
id: clockRect
|
||||
clip: true
|
||||
implicitHeight: root.appletRadHeight
|
||||
implicitWidth: clockText.implicitWidth + 25
|
||||
color: root.colAppBg
|
||||
|
||||
Text {
|
||||
radius: root.appletRadHeight
|
||||
SystemClock {
|
||||
id: clock
|
||||
anchors.centerIn: parent
|
||||
anchors.right: parent.right
|
||||
text: Qt.formatDateTime(new Date(), "yyyy.MM.dd - HH:mm:ss")
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
Text {
|
||||
id: clockText
|
||||
anchors.centerIn: clockRect
|
||||
color: root.colFg
|
||||
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: clock.text = Qt.formatDateTime(new Date(), "yyyy.MM.dd - HH:mm:ss")
|
||||
}
|
||||
text: Qt.formatDateTime(clock.date, "yyyy.MM.dd - hh:mm:ss")
|
||||
}
|
||||
}
|
||||
}
|
||||
Row {
|
||||
id: trayWholeRow
|
||||
rightPadding: 10
|
||||
Item{
|
||||
id: miscItem
|
||||
implicitHeight: root.appletRadHeight
|
||||
implicitWidth: trayRect.implicitWidth
|
||||
visible: trayRepeater.count > 0
|
||||
|
||||
Rectangle {
|
||||
id: trayRect
|
||||
implicitHeight: root.appletRadHeight
|
||||
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
|
||||
visible: iconRepeater.count != 0
|
||||
radius: root.appletRadHeight
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: root.appletRadHeight
|
||||
implicitWidth: iconlayout.implicitWidth + 16
|
||||
|
||||
RowLayout {
|
||||
id: iconlayout
|
||||
anchors.centerIn: trayRect
|
||||
Repeater {
|
||||
id: trayRepeater
|
||||
id: iconRepeater
|
||||
model: SystemTray.items
|
||||
|
||||
MouseArea {
|
||||
id: trayMouse
|
||||
property var bar: trayMouse.QsWindow.window
|
||||
required property SystemTrayItem modelData
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
|
||||
onClicked: event => {
|
||||
if (event.button === Qt.LeftButton) {
|
||||
modelData.activate();
|
||||
delegate: WrapperMouseArea {
|
||||
id: iconWrapper
|
||||
required property var modelData
|
||||
child: IconImage {
|
||||
source: iconWrapper.modelData.icon
|
||||
implicitSize: 16
|
||||
}
|
||||
else if (modelData.hasMenu) {
|
||||
menu.open();
|
||||
}
|
||||
}
|
||||
|
||||
QsMenuAnchor {
|
||||
id: menu
|
||||
menu: trayMouse.modelData.hasMenu ? trayMouse.modelData.menu : null
|
||||
anchor.item: trayMouse
|
||||
anchor.item: iconWrapper
|
||||
menu: modelData.menu
|
||||
}
|
||||
|
||||
IconImage {
|
||||
id: trayIcon
|
||||
width: parent.implicitWidth
|
||||
height: parent.implicitHeight
|
||||
source: trayMouse.modelData.icon
|
||||
anchors.centerIn: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: mouse => {
|
||||
if (mouse.button == Qt.RightButton) {
|
||||
menu.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
zgit
2
zgit
|
|
@ -14,7 +14,7 @@ while getopts "a:s:" o; do
|
|||
;;
|
||||
s)
|
||||
s=${OPTARG}
|
||||
if [ -f $s ]; then
|
||||
if [ -f $s ] || [ -d $s ]; then
|
||||
git add $s
|
||||
read -p "Commit message: " commitMsg
|
||||
tmp="${commitMsg%\"}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue