Merge branch 'main' of codeberg.org:ficcdaf/dotfiles

This commit is contained in:
Daniel Fichtinger 2025-03-03 14:43:41 -05:00
commit 84617dbf84
19 changed files with 297 additions and 65 deletions

View file

@ -78,8 +78,8 @@ label-letters=tnserigmdhcao
[cursor] [cursor]
style=beam style=beam
blink=yes # blink=yes
blink-rate=600 # blink-rate=600
beam-thickness=0.5 beam-thickness=0.5
# underline-thickness=<font underline thickness> # underline-thickness=<font underline thickness>
# color=121212 f5f5f5 # color=121212 f5f5f5

View file

@ -1 +1 @@
config##hostname.dpad config##hostname.dbox

View file

@ -1,3 +0,0 @@
CSE
ADHD
HackerRank

View file

@ -32,7 +32,7 @@ tabpad = " "
[editor.cursor-shape] [editor.cursor-shape]
insert = "bar" insert = "bar"
normal = "block" normal = "block"
select = "underline" # select = "underline"
[editor.statusline] [editor.statusline]
mode.normal = "NRM" mode.normal = "NRM"
@ -76,6 +76,7 @@ A-i = "select_next_sibling"
"A-{" = "rotate_selection_contents_backward" "A-{" = "rotate_selection_contents_backward"
"A-}" = "rotate_selection_contents_forward" "A-}" = "rotate_selection_contents_forward"
C-f = "jump_forward"
a = "append_mode_same_line" a = "append_mode_same_line"
tab = "trim_selections" tab = "trim_selections"
C-k = "signature_help" C-k = "signature_help"

View file

@ -97,12 +97,13 @@ language-servers = ["harper-ls"]
[[grammar]] [[grammar]]
name = "ini" name = "ini"
source.path = "/home/fic/dev/tree-sitter-ini"
[[language]]
scope = "source.ini" scope = "source.ini"
injection-regex = "ini" injection-regex = "ini"
comment-token = "#" comment-token = "#"
indent = { tab-width = 4, unit = "\t" } indent = { tab-width = 4, unit = "\t" }
source.path = "/home/fic/dev/tree-sitter-ini"
[[language]]
name = "ini" name = "ini"
file-types = [ file-types = [
"ini", "ini",
@ -131,7 +132,7 @@ file-types = [
"conf", "conf",
"properties", "properties",
"cfg", "cfg",
"directory" "directory",
] ]
# [[grammar]] # [[grammar]]
# name = "mail" # name = "mail"
@ -170,7 +171,7 @@ source = { git = "https://github.com/ficcdaf/tree-sitter-mail", rev = "8e60f38ef
[[language]] [[language]]
name = "python" name = "python"
language-servers = [ "basedpyright" ] language-servers = ["basedpyright"]
[[language]] [[language]]
name = "kdl" name = "kdl"

View file

@ -1 +1 @@
/home/fic/dev/ashen/monorepo/helix/ashen.toml ../../../dev/ashen/monorepo/helix/ashen.toml

View file

@ -1 +1 @@
kitty.conf##hostname.dpad kitty.conf##hostname.dbox

1
.config/ncspot/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
userstate.cbor

View file

@ -0,0 +1,29 @@
# [MODIFIER+]<CHAR|NAMED_KEY>
# where:
# MODIFIER: Shift|Alt|Ctrl
# CHAR: Any printable character
# NAMED_KEY: Enter|Space|Tab|Backspace|Esc|Left|Right|Up|Down
# |Ins|Del|Home|End|PageUp|PageDown|PauseBreak|NumpadCenter
# |F0|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12
# "Shift+i" = "seek +10s"
[keybindings]
"m" = "move left"
"n" = "move down"
"e" = "move up"
"i" = "move right"
"Ctrl+q" = "quit"
"Ctrl+u" = "move up 5"
"Ctrl+d" = "move down 5"
"Shift+n" = "shift down"
"Shift+e" = "shift up"
"Shift+m" = "seek +10s"
"Shift+i" = "seek -10s"
"Ctrl+n" = "voldown 1"
"Ctrl+e" = "volup 1"
"Shift+q" = "queue; move down 1"
"q" = "focus queue"
# "s" = "focus search"
"l" = "focus library"
"space" = "playpause"
"Shift+r" = "similar current"

View file

@ -1,3 +1,6 @@
workspace "music" {
open-on-output "Dell"
}
// This config is in the KDL format: https://kdl.dev // This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node. // "/-" comments out the following node.
// Check the wiki for a full description of the configuration: // Check the wiki for a full description of the configuration:
@ -59,6 +62,9 @@ output "HDMI-A-1" {
// Settings that influence how windows are positioned and sized. // Settings that influence how windows are positioned and sized.
// Find more information on the wiki: // Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout // https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout { layout {
// Set gaps around windows in logical pixels. // Set gaps around windows in logical pixels.
gaps 16 gaps 16
@ -69,6 +75,7 @@ layout {
// - "on-overflow", focusing a column will center it if it doesn't fit // - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column. // together with the previously focused column.
center-focused-column "never" center-focused-column "never"
// /-always-center-single-column
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths { preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account. // Proportion sets the width as a fraction of the output width, taking gaps into account.
@ -160,6 +167,7 @@ layout {
// See the binds section below for more spawn examples. // See the binds section below for more spawn examples.
// spawn-at-startup "alacritty" "-e" "fish" // spawn-at-startup "alacritty" "-e" "fish"
spawn-at-startup "dunst" "&" spawn-at-startup "dunst" "&"
spawn-at-startup "xwayland-satellite"
// Uncomment this line to ask the clients to omit their client-side decorations if possible. // Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored. // If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners. // Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
@ -187,6 +195,10 @@ animations {
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules // https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug // Work around WezTerm's initial configure bug
// by setting an empty default-column-width. // by setting an empty default-column-width.
window-rule {
match app-id="^spotify$"
open-on-workspace "music"
}
window-rule { window-rule {
// This regular expression is intentionally made as specific as possible, // This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives. // since this is the default config, and we want no false positives.
@ -197,7 +209,7 @@ window-rule {
} }
} }
window-rule { window-rule {
match app-id="thunderbird$" match app-id="thunderbird$|Betterbird$"
default-column-width { default-column-width {
proportion 0.75 proportion 0.75
} }
@ -233,15 +245,22 @@ window-rule {
// Use this instead if you want them visible on third-party screenshot tools. // Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast" // block-out-from "screencast"
} }
// Example: enable rounded corners for all windows. layer-rule {
// (This example rule is commented out with a "/-" in front.) match namespace="^launcher$"
shadow {
on
}
// Fuzzel defaults to 10 px rounded corners.
// geometry-corner-radius 10
}
// Example: enable rounded corners for all windows.// (This example rule is commented out with a "/-" in front.)
/-window-rule { /-window-rule {
geometry-corner-radius 12 geometry-corner-radius 12
clip-to-geometry true clip-to-geometry true
} }
environment { environment {
QT_QPA_PLATFORM "wayland" QT_QPA_PLATFORM "wayland"
DISPLAY null DISPLAY ":0"
ELECTRON_OZONE_PLATFORM_HINT "auto" ELECTRON_OZONE_PLATFORM_HINT "auto"
OZONE_PLATFORM "wayland" OZONE_PLATFORM "wayland"
QT_QPA_PLATFORM "wayland" QT_QPA_PLATFORM "wayland"
@ -252,6 +271,9 @@ environment {
cursor { cursor {
hide-when-typing hide-when-typing
} }
hotkey-overlay {
skip-at-startup
}
binds { binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name // Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program // in the end. To find an XKB name for a particular key, you may use a program
@ -321,12 +343,12 @@ binds {
focus-column-right focus-column-right
} }
Mod+M { Mod+M {
focus-column-left focus-column-or-monitor-left
} }
// Mod+N { focus-window-down; } // Mod+N { focus-window-down; }
// Mod+E { focus-window-up; } // Mod+E { focus-window-up; }
Mod+I { Mod+I {
focus-column-right focus-column-or-monitor-right
} }
Mod+Shift+Left { Mod+Shift+Left {
move-column-left move-column-left
@ -376,11 +398,11 @@ binds {
} }
// don't love these honestly // don't love these honestly
// TODO: Change smart-mouse to LGUI on keyboard? // TODO: Change smart-mouse to LGUI on keyboard?
Mod+Ctrl+Left { Mod+Comma {
focus-monitor-left focus-monitor-left
} }
Mod+Ctrl+Down { Mod+Period {
focus-monitor-down focus-monitor-right
} }
Mod+Ctrl+Up { Mod+Ctrl+Up {
focus-monitor-up focus-monitor-up
@ -409,10 +431,10 @@ binds {
Mod+Shift+Ctrl+Up { Mod+Shift+Ctrl+Up {
move-column-to-monitor-up move-column-to-monitor-up
} }
Mod+Shift+Ctrl+Right { Mod+Shift+Period {
move-column-to-monitor-right move-column-to-monitor-right
} }
Mod+Shift+Ctrl+M { Mod+Shift+Comma {
move-column-to-monitor-left move-column-to-monitor-left
} }
Mod+Shift+Ctrl+N { Mod+Shift+Ctrl+N {
@ -437,10 +459,16 @@ binds {
focus-workspace-up focus-workspace-up
} }
Mod+L { Mod+L {
focus-workspace-down move-workspace-down
} }
Mod+U { Mod+U {
focus-workspace-up move-workspace-up
}
Mod+J {
move-workspace-to-monitor-left
}
Mod+Y {
move-workspace-to-monitor-right
} }
Mod+Ctrl+Page_Down { Mod+Ctrl+Page_Down {
move-column-to-workspace-down move-column-to-workspace-down
@ -475,6 +503,12 @@ binds {
// To avoid scrolling through workspaces really fast, you can use // To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value. // the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel. // You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+MouseForward {
focus-column-right
}
Mod+MouseBack {
focus-column-left
}
Mod+WheelScrollDown cooldown-ms=150 { Mod+WheelScrollDown cooldown-ms=150 {
focus-workspace-down focus-workspace-down
} }
@ -586,7 +620,7 @@ binds {
// Alternatively, there are commands to move just a single window: // Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; } // Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace. // Switches focus between the current and the previous workspace.
Mod+Shift+Tab { Alt+Tab {
focus-workspace-previous focus-workspace-previous
} }
// Adapt the sway-window-switcher and bind it here // Adapt the sway-window-switcher and bind it here
@ -600,11 +634,11 @@ binds {
consume-or-expel-window-right consume-or-expel-window-right
} }
// Consume one window from the right to the bottom of the focused column. // Consume one window from the right to the bottom of the focused column.
Mod+Comma { Mod+BraceLeft {
consume-window-into-column consume-window-into-column
} }
// Expel the bottom window from the focused column to the right. // Expel the bottom window from the focused column to the right.
Mod+Period { Mod+BraceRight {
expel-window-from-column expel-window-from-column
} }
Mod+R { Mod+R {
@ -671,6 +705,10 @@ binds {
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri). // since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; } // Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; } // Mod+Shift+Space { switch-layout "prev"; }
// reload waybar
Mod+Shift+W {
spawn "systemctl" "--user" "restart" "waybar"
}
Mod+S { Mod+S {
screenshot screenshot
} }
@ -681,7 +719,13 @@ binds {
screenshot-window screenshot-window
} }
Mod+Alt+S { Mod+Alt+S {
spawn "~/scripts/recorder.sh" spawn "~/scripts/recorder.sh" "screen"
}
Mod+Shift+Alt+S {
spawn "~/scripts/recorder.sh" "region"
}
Mod+Tab {
spawn "~/scripts/niri/window-picker.py"
} }
// Applications such as remote-desktop clients and software KVM switches may // Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here // request that niri stops processing the keyboard shortcuts defined here

View file

@ -1 +1 @@
config##hostname.dpad config##hostname.dbox

View file

@ -8,28 +8,70 @@
"niri/window" "niri/window"
], ],
"modules-right": [ "modules-right": [
"cava",
"cpu", "cpu",
"memory", "memory",
"pulseaudio", "pulseaudio",
"battery", "battery",
"custom/recorder",
"tray", "tray",
"clock" "clock"
], ],
"niri/window": { "niri/window": {
"max-length": 50 "max-length": 50,
"separate-outputs": true
},
"custom/recorder": {
"exec": "~/dev/niri-recorder/recorder.py",
"return-type": "json",
"restart-interval": "never",
"on-click": "~/dev/niri-recorder/recorder.sh screen",
"on-click-right": "~/dev/niri-recorder/recorder.sh region"
},
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/cava.conf",
// "framerate": 30,
// "autosens": 1,
// "sensitivity": 100,
// "bars": 14,
// "lower_cutoff_freq": 50,
// "higher_cutoff_freq": 10000,
// "method": "pulse",
// "source": "auto",
// "stereo": true,
// "reverse": false,
// "bar_delimiter": 0,
// "monstercat": false,
// "waves": false,
// "noise_reduction": 0.77,
// "input_delay": 2,
"format-icons": [
"▁",
"▂",
"▃",
"▄",
"▅",
"▆",
"▇",
"█"
],
"actions": {
"on-click-right": "mode"
}
}, },
"niri/workspaces": { "niri/workspaces": {
// "format": "{icon}", "format": "{icon}",
// "format-icons": { "format-icons": {
// // Named workspaces // Named workspaces
// // (you need to configure them in niri) // (you need to configure them in niri)
// "browser": "", // "browser": "",
// "discord": "", // "discord": "",
// "chat": "<b></b>", // "chat": "<b></b>",
// // Icons by state // Icons by state
// "active": "", "music": "󰎇",
// "default": "" "active": "",
// } "default": ""
}
}, },
// "sway/workspaces": { // "sway/workspaces": {
// "disable-scroll" : false, // "disable-scroll" : false,

View file

@ -0,0 +1,93 @@
#!/bin/env python
import os
import socket
import json
import asyncio
def p(obj):
print(json.dumps(obj), flush=True)
SOCKET = "/tmp/recorder-sock.sock"
DEF_TT = "Click to record screen. Right-click to record region."
DEF_TEXT = "rec"
# Remove if already exists
try:
os.unlink(SOCKET)
except OSError:
# doesn't exist, we're good
pass
delayed_task = None
async def delayed_msg(delay, message):
# print(f"[DEBUG] Starting delayed message task, waiting {delay} seconds...", flush=True)
try:
await asyncio.sleep(delay)
# print(f"[DEBUG] Delayed message task executed! Sending message: {message}", flush=True)
p(message)
except asyncio.CancelledError:
# print("[DEBUG] Delayed message task was cancelled!", flush=True)
pass
def handle_message(data: str, loop):
global delayed_task
if delayed_task:
delayed_task.cancel()
out = {}
out_s = ""
out_t = ""
if data:
if data == "REC":
out_s = "on"
out_t = "Recording in progress. Click to stop."
elif data == "CMP":
out_s = "compressing"
out_t = "Recording is being compressed."
elif data == "CPD":
out_s = "copied"
out_t = "Recording has been copied to clipboard."
elif data == "STP":
out_s = "done"
out_t = "Recording has been stopped."
elif data == "ERR":
out_s = "error"
out_t = "Recording has encountered an error."
else:
# print("this runs a", flush=True)
out_s = ""
out_t = ""
else:
# print("this runs b", flush=True)
out_s = ""
out_t = ""
out["text"] = f"rec: {out_s}" if out_s != "" else DEF_TEXT
out["tooltip"] = out_t if out_t != "" else DEF_TT
p(out)
if data in ["ERR", "CPD", "STP"]:
if delayed_task:
# print("canceled delayed task", flush=True)
delayed_task.cancel()
delayed_out = {"text": DEF_TEXT, "tooltip": DEF_TT}
# print("debug: creating delayed task", flush=True)
delayed_task = loop.create_task(delayed_msg(5, delayed_out))
async def server():
loop = asyncio.get_running_loop()
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as server:
server.bind(SOCKET)
server.setblocking(False)
server.listen(1)
while True:
conn, _ = await loop.sock_accept(server)
with conn:
data = (await loop.sock_recv(conn, 1024)).decode().strip()
handle_message(data, loop)
async def main():
p({"text": DEF_TEXT, "tooltip": DEF_TT})
await server()
asyncio.run(main())

14
.config/waybar/custom/test.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/env bash
echo "REC" | socat - UNIX-CONNECT:/tmp/recorder-sock.sock; \
sleep 2; \
echo "ERR" | socat - UNIX-CONNECT:/tmp/recorder-sock.sock; \
sleep 2; \
echo "REC" | socat - UNIX-CONNECT:/tmp/recorder-sock.sock; \
sleep 2; \
echo "STP" | socat - UNIX-CONNECT:/tmp/recorder-sock.sock; \
sleep 2; \
echo "CMP" | socat - UNIX-CONNECT:/tmp/recorder-sock.sock; \
sleep 2; \
echo "CPD" | socat - UNIX-CONNECT:/tmp/recorder-sock.sock; \
sleep 2;

View file

@ -6,6 +6,15 @@ I use Arch btw.
The root of this repo is equivalent to my $HOME directory. The root of this repo is equivalent to my $HOME directory.
## Note on this repository
**Important**: I'm migrating this repository from GitHub to [Codeberg](https://codeberg.org/ficcdaf/dotfiles). If you're reading this on GitHub, the repo is likely out-of-date and will be removed sometime in the future.
I use this repository to sync and backup my dotfiles. This is done automatically on a timer. Therefore, these configs are:
- Always up-to-date.
- Potentially broken on any given commit.
## Note On Keybindings ## Note On Keybindings
A note on keybindings: I use Colemak-DH, which is a non-qwerty keyboard layout. I use either `MNEI` or the arrow keys (which is a mod key + `MNEI` on my keyboard) for navigation, depending on a few different factors. A note on keybindings: I use Colemak-DH, which is a non-qwerty keyboard layout. I use either `MNEI` or the arrow keys (which is a mod key + `MNEI` on my keyboard) for navigation, depending on a few different factors.

View file

@ -41,3 +41,4 @@
.config/niri .config/niri
.config/fish .config/fish
.config/yadm/tracked .config/yadm/tracked
.config/ncspot

View file

@ -10,8 +10,8 @@ hash = "43019cca17a4d7b41746c2e0a6b8f33f"
[[plugin.deps]] [[plugin.deps]]
use = "Reledia/glow" use = "Reledia/glow"
rev = "5ce76dc" rev = "c76bf4f"
hash = "52e5f5c602962e7cbf874da28f52ba45" hash = "a6b78bf9af5390e3a85a6951fbb7b93"
[[plugin.deps]] [[plugin.deps]]
use = "Reledia/miller" use = "Reledia/miller"
@ -20,12 +20,12 @@ hash = "2d6d77583162aaf0a599e7a3091b5878"
[[plugin.deps]] [[plugin.deps]]
use = "Reledia/hexyl" use = "Reledia/hexyl"
rev = "39d3d4e" rev = "228a9ef"
hash = "dd624cbaff94af65f39fd86bc57b340" hash = "cdc65cfe4e60e1bf5afe5769d074fa9c"
[[plugin.deps]] [[plugin.deps]]
use = "Sonico98/exifaudio" use = "Sonico98/exifaudio"
rev = "d794614" rev = "4379fcf"
hash = "a8e15d3c21c02a5af41d46ed04778a02" hash = "a8e15d3c21c02a5af41d46ed04778a02"
[[plugin.deps]] [[plugin.deps]]
@ -50,5 +50,5 @@ hash = "ada10d1213f2117878e0fd90df708619"
[[flavor.deps]] [[flavor.deps]]
use = "ashen-org/ashen:ashen" use = "ashen-org/ashen:ashen"
rev = "42ed408" rev = "ee0708d"
hash = "a6f097910912721681300869a94d1fd8" hash = "a6f097910912721681300869a94d1fd8"

32
.zshrc
View file

@ -130,21 +130,21 @@ function cat() {
} }
# . /opt/asdf-vm/asdf.sh # . /opt/asdf-vm/asdf.sh
# Need this to fix the cursor in tmux # Need this to fix the cursor in tmux
print -n '\033[5 q' # print -n '\033[5 q'
function zle-keymap-select zle-line-init zle-line-finish # function zle-keymap-select zle-line-init zle-line-finish
{ # {
case $KEYMAP in # case $KEYMAP in
vicmd) print -n '\033[1 q' ;; # block cursor # vicmd) print -n '\033[1 q' ;; # block cursor
viins | main) print -n '\033[5 q' ;; # line cursor # viins | main) print -n '\033[5 q' ;; # line cursor
esac # esac
} # }
# DISABLE_AUTO_TITLE="true" # DISABLE_AUTO_TITLE="true"
function set_win_title() { # function set_win_title() {
echo -ne "\033]0; ${PWD/#$HOME/~} \007" # echo -ne "\033]0; ${PWD/#$HOME/~} \007"
} # }
function viewport_osc() { # function viewport_osc() {
print -Pn "\e]133;A\e\\" # print -Pn "\e]133;A\e\\"
} # }
function mksh() { function mksh() {
local filepath="$1.sh" local filepath="$1.sh"
@ -162,7 +162,7 @@ function mksh() {
} }
# precmd_functions+=(set_win_title viewport_osc) # precmd_functions+=(set_win_title viewport_osc)
precmd_functions+=(viewport_osc) # precmd_functions+=(viewport_osc)
zle -N zle-line-init zle -N zle-line-init
zle -N zle-line-finish zle -N zle-line-finish
zle -N zle-keymap-select zle -N zle-keymap-select
@ -177,4 +177,4 @@ export GPG_TTY=$(tty)
# gpg-connect-agent /bye > /dev/null # gpg-connect-agent /bye > /dev/null
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
# colorscript -e 36 # colorscript -e 36
source ~/scripts/obsidian-bridge.sh # source ~/scripts/obsidian-bridge.sh