Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
6ed1f8dd76
9 changed files with 131 additions and 78 deletions
|
@ -2,6 +2,5 @@
|
|||
|
||||
has_command gawk || { echo "No gawk." >&2 ; exit 1; }
|
||||
index="${1:-1}"
|
||||
echo "$#" >&2
|
||||
[ "$#" -lt 1 ] || shift
|
||||
gawk "$@" '{print $'"${index}"'}'
|
||||
|
|
21
common/bin/good-morning
Executable file
21
common/bin/good-morning
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
# create a messages file for subscripts to write to or manipulate for ending
|
||||
# output
|
||||
set message_file (mktemp)
|
||||
|
||||
for f in (fd good-morning.d.fish $HOME/.config/lytedev-env --max-depth 2)
|
||||
# run scripts for any linked environments with a hooked script
|
||||
source $f $message_file
|
||||
end
|
||||
|
||||
|
||||
# output the messages file's contents
|
||||
echo
|
||||
cat $message_file
|
||||
echo
|
||||
|
||||
# since this script almost always runs in its own window which dies after
|
||||
# finishing, give the user a chance to read the output
|
||||
echo "When you're ready, hit enter to finish!"
|
||||
read
|
|
@ -44,4 +44,3 @@ C = ":bc"
|
|||
[keys.select]
|
||||
space = { q = ":reflow 80", Q = ":reflow 120" }
|
||||
"L" = "repeat_last_motion"
|
||||
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
[[language]]
|
||||
name = "elixir"
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "html"
|
||||
auto-format = false
|
||||
|
||||
[[language]]
|
||||
name = "fish"
|
||||
auto-format = true
|
||||
indent = { tab-width = 2, unit = "\t" }
|
||||
|
||||
[[language]]
|
||||
name = "javascript"
|
||||
scope = "source.js"
|
||||
|
@ -6,81 +19,57 @@ file-types = ["js", "jsx", "mjs"]
|
|||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
comment-token = "//"
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "javascript" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
|
||||
indent = { tab-width = 2, unit = "\t" }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "jsx"
|
||||
scope = "source.jsx"
|
||||
injection-regex = "jsx"
|
||||
file-types = ["jsx"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
comment-token = "//"
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "javascriptreact" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
grammar = "javascript"
|
||||
auto-format = true
|
||||
# [[language]]
|
||||
# name = "jsx"
|
||||
# scope = "source.jsx"
|
||||
# injection-regex = "jsx"
|
||||
# file-types = ["jsx"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# comment-token = "//"
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "javascriptreact" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# grammar = "javascript"
|
||||
# auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "typescript"
|
||||
scope = "source.ts"
|
||||
injection-regex = "^(ts|typescript)$"
|
||||
file-types = ["ts"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "typescript" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
auto-format = true
|
||||
# [[language]]
|
||||
# name = "typescript"
|
||||
# scope = "source.ts"
|
||||
# injection-regex = "^(ts|typescript)$"
|
||||
# file-types = ["ts"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "typescript" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "tsx"
|
||||
scope = "source.tsx"
|
||||
injection-regex = "^(tsx)$" # |typescript
|
||||
file-types = ["tsx"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "typescriptreact" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
auto-format = true
|
||||
# [[language]]
|
||||
# name = "tsx"
|
||||
# scope = "source.tsx"
|
||||
# injection-regex = "^(tsx)$" # |typescript
|
||||
# file-types = ["tsx"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "typescriptreact" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "jsonc"
|
||||
scope = "source.jsonc"
|
||||
injection-regex = "^(jsonc)$"
|
||||
file-types = ["jsonc"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "jsonc" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "elixir"
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "nim"
|
||||
scope = "source.nim"
|
||||
injection-regex = "nim"
|
||||
file-types = ["nim","nims"]
|
||||
shebangs = ["nim"]
|
||||
roots = []
|
||||
comment-token = "#"
|
||||
language-server = { command = "nimlangserver" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "html"
|
||||
auto-format = false
|
||||
|
||||
[[grammar]]
|
||||
name = "nim"
|
||||
source = { git = "https://github.com/aMOPel/tree-sitter-nim", rev = "8ce3627827e45a5835004391ff5ffcfe029ae6cf" }
|
||||
# [[language]]
|
||||
# name = "jsonc"
|
||||
# scope = "source.jsonc"
|
||||
# injection-regex = "^(jsonc)$"
|
||||
# file-types = ["jsonc"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "jsonc" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# auto-format = true
|
||||
|
|
|
@ -58,6 +58,16 @@ config.keys = {
|
|||
mods = 'CTRL',
|
||||
action = wezterm.action.ActivatePaneDirection'Down'
|
||||
},
|
||||
{
|
||||
key = 'Insert',
|
||||
mods = 'SHIFT',
|
||||
action = wezterm.action.PasteFrom'Clipboard'
|
||||
},
|
||||
{
|
||||
key = 'v',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.PasteFrom'PrimarySelection'
|
||||
},
|
||||
{
|
||||
key = 'h',
|
||||
mods = 'CTRL',
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
test -d /boot/loader/entries || { echo "no known bootloader"; exit 1; }
|
||||
|
||||
# TODO: see catppuccin-tty for possible alternate implementation?
|
||||
# TODO: possibly just setup catppuccin-tty?
|
||||
|
||||
inject_red="vt.default_red=0x11,0xf9,0xa6,0xf4,0x66,0xae,0xa1,0xf8,0x75,0xf9,0xa6,0xf4,0x66,0xae,0xa1,0xf9"
|
||||
inject_green="vt.default_grn=0x11,0x26,0xe2,0xbf,0xd9,0x81,0xef,0xf8,0x71,0x26,0xe2,0xbf,0xd9,0x81,0xef,0xf8"
|
||||
inject_blue="vt.default_blu=0x11,0x72,0x2e,0x75,0xef,0xff,0xe4,0xf2,0x5e,0x72,0x2e,0x75,0xef,0xff,0xe4,0xf5"
|
||||
|
|
18
os/linux/bin/maybe-good-morning
Executable file
18
os/linux/bin/maybe-good-morning
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
# TODO: some kind of better time-based or last-awakened heuristic to determine
|
||||
# whether or not this shows
|
||||
|
||||
set -l hours 08 09 10
|
||||
if ! contains (date +%H) $hours
|
||||
echo "Not sending notification since it isn't the morning" >>&2
|
||||
exit 1
|
||||
end
|
||||
|
||||
notify-send \
|
||||
--urgency critical \
|
||||
"Good morning!" \
|
||||
"Activate this notification (click it or Super+Shift+Space) to run the script. Dismiss (Super+Ctrl+Space) to ignore." \
|
||||
--action=default=Activate \
|
||||
| rg default \
|
||||
&& hyprctl dispatch exec [float] wezterm start good-morning
|
|
@ -22,7 +22,10 @@
|
|||
time
|
||||
; TODO: idle inhibitor?
|
||||
; TODO: get these to align properly?
|
||||
(box :class "mic" (box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "}))
|
||||
(box :class "mic" (
|
||||
box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "}
|
||||
) {micVolume + "%"}
|
||||
)
|
||||
{" " + volume + "%"}
|
||||
{" " + round(EWW_CPU["avg"], 0) + "%"}
|
||||
{" " + round(EWW_RAM["used_mem_perc"], 0) + "%"}
|
||||
|
@ -43,6 +46,9 @@
|
|||
(deflisten volume :initial "0"
|
||||
"pamixer --get-volume; pactl subscribe | grep sink --line-buffered | while read i; do pamixer --get-volume; done")
|
||||
|
||||
(deflisten micVolume :initial "0"
|
||||
"pamixer --default-source --get-volume; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-volume; done")
|
||||
|
||||
(deflisten micMuted :initial "false"
|
||||
"pamixer --default-source --get-mute; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-mute; done")
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ monitor=,preferred,auto,auto
|
|||
|
||||
# Execute your favorite apps at launch
|
||||
exec-once = firefox & wezterm & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1 & eww daemon & eww open-many bar
|
||||
exec-once = swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f'
|
||||
exec-once = swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f'
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
|
@ -202,6 +202,14 @@ bind = $mainMod SHIFT, S, exec, clipshot
|
|||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
bind = CTRL SHIFT $mainMod, L, exec, swaylock
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
bind = $mainMod CTRL, space, exec, makoctl dismiss
|
||||
bind = $mainMod SHIFT CTRL, space, exec, makoctl restore
|
||||
bind = $mainMod SHIFT, space, exec, makoctl invoke
|
||||
|
||||
bind = $mainMod, E, exec, thunar
|
||||
|
|
Reference in a new issue