summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/eww/.config/eww/eww.yuck34
-rwxr-xr-xarch/eww/.config/eww/scripts/active-workspace4
-rwxr-xr-xarch/eww/.config/eww/scripts/active-ws2
-rwxr-xr-xarch/eww/.config/eww/scripts/day-with-suffix10
-rwxr-xr-xarch/eww/.config/eww/scripts/hypr-socket24
-rw-r--r--arch/hyprland/.config/hypr/hyprland.conf10
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/completion.lua8
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/extras.lua15
8 files changed, 38 insertions, 69 deletions
diff --git a/arch/eww/.config/eww/eww.yuck b/arch/eww/.config/eww/eww.yuck
index 7c80505..79e2fec 100644
--- a/arch/eww/.config/eww/eww.yuck
+++ b/arch/eww/.config/eww/eww.yuck
@@ -1,17 +1,10 @@
-;; ── Listeners (Hyprland IPC) ──────────────────────────────────────────────
-;; hyprland-workspaces emits JSON arrays with {id, name, windows, isActive}
-;; on every workspace change — single source of truth for list + active state.
-
-(deflisten workspaces :initial "[]"
- `scripts/workspaces`)
-
;; ── Polls ──────────────────────────────────────────────────────────────────
(defpoll clock :interval "1s"
`date +"%-H:%M"`)
(defpoll date-str :interval "60s"
- `date +"%a %b %d"`)
+ `scripts/day-with-suffix`)
;; Show the PLAYING source; fall back to any paused one
(defpoll player-status :interval "2s"
@@ -48,15 +41,7 @@
(defpoll netspeed :interval "3s"
`scripts/netspeed`)
-;; ── Left: Workspaces + Music ───────────────────────────────────────────────
-
-(defwidget workspaces []
- (box :class "workspaces" :space-evenly false :spacing 5
- (for ws in workspaces
- (button
- :class {ws.active ? "ws active" : "ws"}
- :onclick "hyprctl dispatch workspace ${ws.id}"
- {ws.id}))))
+;; ── Left: Date + Music ───────────────────────────────────────────────
(defwidget music []
(eventbox
@@ -68,12 +53,11 @@
:text {player-status == "Playing" ? "▶" : "⏸"})
(label :class "song" :text player-song :limit-width 30))))
-;; ── Center: Clock ──────────────────────────────────────────────────────────
-
-(defwidget center-section []
- (box :class "center" :halign "center" :space-evenly false :spacing 8
+(defwidget left-section []
+ (box :class "left" :space-evenly false :spacing 8
+ (label :class "clock" :text clock)
(label :class "date" :text date-str)
- (label :class "clock" :text clock)))
+ (music)))
;; ── Right: Stats ───────────────────────────────────────────────────────────
@@ -130,10 +114,8 @@
(defwidget bar []
(centerbox :class "bar" :orientation "h"
- (box :class "left" :halign "start" :space-evenly false :spacing 12
- (workspaces)
- (music))
- (center-section)
+ (left-section)
+ (box)
(right-section)))
(defwindow bar
diff --git a/arch/eww/.config/eww/scripts/active-workspace b/arch/eww/.config/eww/scripts/active-workspace
deleted file mode 100755
index 21795b9..0000000
--- a/arch/eww/.config/eww/scripts/active-workspace
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-hyprctl activeworkspace -j | jq '.id'
-socat -u UNIX-CONNECT:"${XDG_RUNTIME_DIR}/hypr/${HYPRLAND_INSTANCE_SIGNATURE}/.socket2.sock" STDOUT \
- | while read -r _; do hyprctl activeworkspace -j | jq '.id'; done
diff --git a/arch/eww/.config/eww/scripts/active-ws b/arch/eww/.config/eww/scripts/active-ws
deleted file mode 100755
index c7b3f3e..0000000
--- a/arch/eww/.config/eww/scripts/active-ws
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-hyprctl activeworkspace | awk '/^workspace/{print $3}'
diff --git a/arch/eww/.config/eww/scripts/day-with-suffix b/arch/eww/.config/eww/scripts/day-with-suffix
new file mode 100755
index 0000000..f7c2243
--- /dev/null
+++ b/arch/eww/.config/eww/scripts/day-with-suffix
@@ -0,0 +1,10 @@
+#!/bin/sh
+DaySuffix() {
+ case `date +%d` in
+ 1|21|31) echo "st";;
+ 2|22) echo "nd";;
+ 3|23) echo "rd";;
+ *) echo "th";;
+ esac
+}
+echo $(date +%d)`DaySuffix`
diff --git a/arch/eww/.config/eww/scripts/hypr-socket b/arch/eww/.config/eww/scripts/hypr-socket
deleted file mode 100755
index 9012c17..0000000
--- a/arch/eww/.config/eww/scripts/hypr-socket
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python3
-"""Stream lines from Hyprland's socket2 IPC."""
-import socket, sys, os
-
-sock_path = (
- os.environ.get("XDG_RUNTIME_DIR", f"/run/user/{os.getuid()}")
- + "/hypr/"
- + os.environ["HYPRLAND_INSTANCE_SIGNATURE"]
- + "/.socket2.sock"
-)
-
-s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-s.connect(sock_path)
-
-buf = b""
-while True:
- chunk = s.recv(4096)
- if not chunk:
- break
- buf += chunk
- while b"\n" in buf:
- line, buf = buf.split(b"\n", 1)
- sys.stdout.write(line.decode(errors="replace") + "\n")
- sys.stdout.flush()
diff --git a/arch/hyprland/.config/hypr/hyprland.conf b/arch/hyprland/.config/hypr/hyprland.conf
index 4811f89..944d540 100644
--- a/arch/hyprland/.config/hypr/hyprland.conf
+++ b/arch/hyprland/.config/hypr/hyprland.conf
@@ -70,11 +70,11 @@ decoration {
animations {
enabled = true
- bezier = myBezier, 0.05, 0.97, 0.05, 0.97
- animation = windows, 1, 4, myBezier
- animation = windowsOut, 1, 4, default, popin 80%
- animation = fade, 1, 4, default
- animation = workspaces, 1, 4, default
+ bezier = myBezier, 0.35, 0.97, 0.35, 0.97
+ animation = windows, 1, 1, myBezier
+ animation = windowsOut, 1, 2, default, popin 80%
+ animation = fade, 1, 2, default
+ animation = workspaces, 1, 2, default
}
exec-once = awww-daemon
diff --git a/arch/nvim/.config/nvim/lua/plugins/completion.lua b/arch/nvim/.config/nvim/lua/plugins/completion.lua
index c7b5652..385cdb3 100644
--- a/arch/nvim/.config/nvim/lua/plugins/completion.lua
+++ b/arch/nvim/.config/nvim/lua/plugins/completion.lua
@@ -38,12 +38,4 @@ return {
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
- {
- "nullromo/go-up.nvim",
- opts = {}, -- specify options here
- config = function(_, opts)
- local goUp = require("go-up")
- goUp.setup(opts)
- end,
- },
}
diff --git a/arch/nvim/.config/nvim/lua/plugins/extras.lua b/arch/nvim/.config/nvim/lua/plugins/extras.lua
index 0dd2d01..0194f45 100644
--- a/arch/nvim/.config/nvim/lua/plugins/extras.lua
+++ b/arch/nvim/.config/nvim/lua/plugins/extras.lua
@@ -34,4 +34,19 @@ return {
view_options = { show_hidden = true },
},
},
+ {
+ "nullromo/go-up.nvim",
+ opts = {
+ respectScrolloff = true,
+ }, -- specify options here
+ config = function(_, opts)
+ local goUp = require("go-up")
+ goUp.setup(opts)
+
+ -- Use <C-a> to center
+ vim.keymap.set({ "n", "v" }, "<C-a>", function()
+ require("go-up").centerScreen()
+ end, { desc = "center the screen" })
+ end,
+ },
}