summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xarch/eww/.config/eww/scripts/day-with-suffix6
-rwxr-xr-xarch/eww/.config/eww/scripts/weather-fetch11
-rwxr-xr-xarch/eww/.config/eww/scripts/weather-notify11
-rw-r--r--arch/hyprland/.config/hypr/hyprland.conf3
-rw-r--r--arch/nvim/.config/nvim/lazy-lock.json3
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/fzf.lua1
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/treesitter.lua4
-rwxr-xr-xarch/scripts/.local/bin/copythe30
8 files changed, 55 insertions, 14 deletions
diff --git a/arch/eww/.config/eww/scripts/day-with-suffix b/arch/eww/.config/eww/scripts/day-with-suffix
index f7c2243..111bd37 100755
--- a/arch/eww/.config/eww/scripts/day-with-suffix
+++ b/arch/eww/.config/eww/scripts/day-with-suffix
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/usr/bin/env bash
DaySuffix() {
- case `date +%d` in
+ case `date +%-d` in
1|21|31) echo "st";;
2|22) echo "nd";;
3|23) echo "rd";;
*) echo "th";;
esac
}
-echo $(date +%d)`DaySuffix`
+echo $(date +%-d)`DaySuffix`
diff --git a/arch/eww/.config/eww/scripts/weather-fetch b/arch/eww/.config/eww/scripts/weather-fetch
index 8fa53ac..9191edd 100755
--- a/arch/eww/.config/eww/scripts/weather-fetch
+++ b/arch/eww/.config/eww/scripts/weather-fetch
@@ -12,12 +12,15 @@ temp=$(echo "$data" | jq -r '.current_condition[0].temp_F')
code=$(echo "$data" | jq -r '.current_condition[0].weatherCode')
# ── Night check ────────────────────────────────────────────────────────────
-sunset_raw=$(echo "$data" | jq -r '.weather[0].astronomy[0].sunset')
-sunset_epoch=$(date -d "today $sunset_raw" +%s 2>/dev/null)
+sunrise_raw=$(echo "$data" | jq -r '.weather[0].astronomy[0].sunrise')
+sunset_raw=$(echo "$data" | jq -r '.weather[0].astronomy[0].sunset')
+
+sunrise_epoch=$(date -d "today $sunrise_raw" +%s)
+sunset_epoch=$(date -d "today $sunset_raw" +%s)
now_epoch=$(date +%s)
-is_night=false
-[[ $now_epoch -ge $sunset_epoch ]] && is_night=true
+is_night=false
+[[ $now_epoch -ge $sunset_epoch || $now_epoch -lt $sunrise_epoch ]] && is_night=true
# ── Moon phase ─────────────────────────────────────────────────────────────
moon_icon() {
local ref; ref=$(date -d "2000-01-06" +%s) # known new moon
diff --git a/arch/eww/.config/eww/scripts/weather-notify b/arch/eww/.config/eww/scripts/weather-notify
index fc95df0..9710ad4 100755
--- a/arch/eww/.config/eww/scripts/weather-notify
+++ b/arch/eww/.config/eww/scripts/weather-notify
@@ -15,10 +15,15 @@ high=$(echo "$data" | jq -r '.weather[0].maxtempF')
low=$(echo "$data" | jq -r '.weather[0].mintempF')
# ── Night / moon ───────────────────────────────────────────────────────────
-sunset_raw=$(echo "$data" | jq -r '.weather[0].astronomy[0].sunset')
-sunset_epoch=$(date -d "today $sunset_raw" +%s 2>/dev/null)
+sunrise_raw=$(echo "$data" | jq -r '.weather[0].astronomy[0].sunrise')
+sunset_raw=$(echo "$data" | jq -r '.weather[0].astronomy[0].sunset')
+
+sunrise_epoch=$(date -d "today $sunrise_raw" +%s)
+sunset_epoch=$(date -d "today $sunset_raw" +%s)
+now_epoch=$(date +%s)
+
is_night=false
-[[ $(date +%s) -ge $sunset_epoch ]] && is_night=true
+[[ $now_epoch -ge $sunset_epoch || $now_epoch -lt $sunrise_epoch ]] && is_night=true
moon_phase() {
local ref; ref=$(date -d "2000-01-06" +%s)
diff --git a/arch/hyprland/.config/hypr/hyprland.conf b/arch/hyprland/.config/hypr/hyprland.conf
index ac541da..02e60f1 100644
--- a/arch/hyprland/.config/hypr/hyprland.conf
+++ b/arch/hyprland/.config/hypr/hyprland.conf
@@ -85,4 +85,5 @@ exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = eww open bar
exec-once = bash -c 'sleep 0.5; [ -f ~/.cache/wallust/last-wallpaper ] && ~/.local/bin/set-wallpaper "$(cat ~/.cache/wallust/last-wallpaper)"'
exec-once = spicetify watch -s
-exec-once = wl-paste --watch cliphist
+exec-once = wl-paste --type text --watch cliphist store
+exec-once = wl-paste --type image --watch cliphist store
diff --git a/arch/nvim/.config/nvim/lazy-lock.json b/arch/nvim/.config/nvim/lazy-lock.json
index 4d993a2..3a33ce2 100644
--- a/arch/nvim/.config/nvim/lazy-lock.json
+++ b/arch/nvim/.config/nvim/lazy-lock.json
@@ -19,8 +19,9 @@
"nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" },
"nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" },
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
- "nvim-treesitter": { "branch": "main", "commit": "cfc6f2c117aaaa82f19bcce44deec2c194d900ab" },
+ "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
+ "nvim-web-devicons": { "branch": "master", "commit": "4fc505ac7bd7692824a142e96e5f529c133862f8" },
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
diff --git a/arch/nvim/.config/nvim/lua/plugins/fzf.lua b/arch/nvim/.config/nvim/lua/plugins/fzf.lua
index 14b9407..9a34c9a 100644
--- a/arch/nvim/.config/nvim/lua/plugins/fzf.lua
+++ b/arch/nvim/.config/nvim/lua/plugins/fzf.lua
@@ -1,5 +1,6 @@
return {
"ibhagwan/fzf-lua",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
cmd = "FzfLua",
keys = {
{ "<leader>ff", "<cmd>FzfLua files<CR>", desc = "Find files" },
diff --git a/arch/nvim/.config/nvim/lua/plugins/treesitter.lua b/arch/nvim/.config/nvim/lua/plugins/treesitter.lua
index 3716860..348eaba 100644
--- a/arch/nvim/.config/nvim/lua/plugins/treesitter.lua
+++ b/arch/nvim/.config/nvim/lua/plugins/treesitter.lua
@@ -1,7 +1,6 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
- tag = "v0.9.3",
event = { "BufReadPre", "BufNewFile" },
opts = {
ensure_installed = {
@@ -26,6 +25,7 @@ return {
auto_install = false,
},
config = function(_, opts)
- require("nvim-treesitter.configs").setup(opts)
+ -- new API, configs module is gone
+ require("nvim-treesitter").setup(opts)
end,
}
diff --git a/arch/scripts/.local/bin/copythe b/arch/scripts/.local/bin/copythe
new file mode 100755
index 0000000..0ba1cc2
--- /dev/null
+++ b/arch/scripts/.local/bin/copythe
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+set -eo pipefail
+
+declare -A sources
+sources[date]="date"
+sources[ip]="ip"
+
+tocopy=""
+
+case "$1" in
+ ${sources[date]} )
+ tocopy=$(date --rfc-3339 date)
+ ;;
+ ${sources[ip]} )
+ tocopy=$(curl --silent ifconfig.me)
+ ;;
+ *)
+ args=""
+ for val in "${sources[@]}"; do
+ args+="|${val}"
+ done
+
+ echo "usage: $0 (${args#|})"
+ exit
+ ;;
+
+esac
+
+echo "Copying: ${tocopy:0:50}"
+wl-copy ${tocopy}