From cbc98722ae39f5c1157d474fdef945578eca5254 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 15 May 2023 12:40:09 -0500 Subject: [PATCH 1/5] Add lock bind --- os/linux/hypr/hyprland.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os/linux/hypr/hyprland.conf b/os/linux/hypr/hyprland.conf index 4595174..1ecad10 100644 --- a/os/linux/hypr/hyprland.conf +++ b/os/linux/hypr/hyprland.conf @@ -202,6 +202,9 @@ 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 + From 4068fdf409058190178985ac259ef6fdb1596e4c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 17 May 2023 09:53:26 -0500 Subject: [PATCH 2/5] Cleanup good morning script --- common/bin/field | 1 - common/bin/good-morning | 21 +++++++++++++++++++++ common/bin/maybe-good-morning | 21 +++++++++++++++++++++ os/linux/hypr/hyprland.conf | 5 ++++- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100755 common/bin/good-morning create mode 100755 common/bin/maybe-good-morning diff --git a/common/bin/field b/common/bin/field index 45bbb7a..d2bf241 100755 --- a/common/bin/field +++ b/common/bin/field @@ -2,6 +2,5 @@ has_command gawk || { echo "No gawk." >&2 ; exit 1; } index="${1:-1}" -echo "$#" >&2 [ "$#" -lt 1 ] || shift gawk "$@" '{print $'"${index}"'}' diff --git a/common/bin/good-morning b/common/bin/good-morning new file mode 100755 index 0000000..f3b1704 --- /dev/null +++ b/common/bin/good-morning @@ -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 diff --git a/common/bin/maybe-good-morning b/common/bin/maybe-good-morning new file mode 100755 index 0000000..6909def --- /dev/null +++ b/common/bin/maybe-good-morning @@ -0,0 +1,21 @@ +#!/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) to run the script. Dismiss (Super+Ctrl+Space) to ignore." \ + --action=default=Activate \ + | rg default + +if test $status -eq 0 + hyprctl dispatch exec [float] wezterm start good-morning +end diff --git a/os/linux/hypr/hyprland.conf b/os/linux/hypr/hyprland.conf index 6f3be3e..3c326f4 100644 --- a/os/linux/hypr/hyprland.conf +++ b/os/linux/hypr/hyprland.conf @@ -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' resume 'maybe-good-morning' before-sleep 'swaylock -f' exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP env = XCURSOR_SIZE,24 @@ -208,3 +208,6 @@ bind = CTRL SHIFT $mainMod, L, exec, swaylock 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 From 5a42bed8d8d7770b14e284b63442828f5bcf348b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 17 May 2023 10:12:41 -0500 Subject: [PATCH 3/5] Cleanup --- common/bin/good-morning | 4 ++-- common/bin/maybe-good-morning | 21 --------------------- common/helix/languages.toml | 7 ++++++- os/linux/bin/maybe-good-morning | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 24 deletions(-) delete mode 100755 common/bin/maybe-good-morning create mode 100755 os/linux/bin/maybe-good-morning diff --git a/common/bin/good-morning b/common/bin/good-morning index f3b1704..6ba0b5d 100755 --- a/common/bin/good-morning +++ b/common/bin/good-morning @@ -5,8 +5,8 @@ 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 + # run scripts for any linked environments with a hooked script + source $f $message_file end diff --git a/common/bin/maybe-good-morning b/common/bin/maybe-good-morning deleted file mode 100755 index 6909def..0000000 --- a/common/bin/maybe-good-morning +++ /dev/null @@ -1,21 +0,0 @@ -#!/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) to run the script. Dismiss (Super+Ctrl+Space) to ignore." \ - --action=default=Activate \ - | rg default - -if test $status -eq 0 - hyprctl dispatch exec [float] wezterm start good-morning -end diff --git a/common/helix/languages.toml b/common/helix/languages.toml index c4545f2..a58c8e3 100644 --- a/common/helix/languages.toml +++ b/common/helix/languages.toml @@ -83,4 +83,9 @@ auto-format = false [[grammar]] name = "nim" -source = { git = "https://github.com/aMOPel/tree-sitter-nim", rev = "8ce3627827e45a5835004391ff5ffcfe029ae6cf" } \ No newline at end of file +source = { git = "https://github.com/aMOPel/tree-sitter-nim", rev = "8ce3627827e45a5835004391ff5ffcfe029ae6cf" } + +[[language]] +name = "fish" +auto-format = true +indent = { tab-width = 2, unit = "\t" } diff --git a/os/linux/bin/maybe-good-morning b/os/linux/bin/maybe-good-morning new file mode 100755 index 0000000..28d1e2c --- /dev/null +++ b/os/linux/bin/maybe-good-morning @@ -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 From 0e8356965eeec449360fefda6a04598fadb792a3 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 19 May 2023 14:36:25 -0500 Subject: [PATCH 4/5] Cleanup --- common/helix/config.toml | 3 +- common/helix/languages.toml | 142 ++++++++++++++++-------------------- os/linux/hypr/hyprland.conf | 2 +- 3 files changed, 65 insertions(+), 82 deletions(-) diff --git a/common/helix/config.toml b/common/helix/config.toml index 3116317..22a010f 100644 --- a/common/helix/config.toml +++ b/common/helix/config.toml @@ -43,5 +43,4 @@ C = ":bc" [keys.select] space = { q = ":reflow 80", Q = ":reflow 120" } -"L" = "repeat_last_motion" - +"L" = "repeat_last_motion" \ No newline at end of file diff --git a/common/helix/languages.toml b/common/helix/languages.toml index a58c8e3..833ad21 100644 --- a/common/helix/languages.toml +++ b/common/helix/languages.toml @@ -1,91 +1,75 @@ -[[language]] -name = "javascript" -scope = "source.js" -injection-regex = "^(js|javascript)$" -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 = " " } -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 = "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 = "fish" auto-format = true indent = { tab-width = 2, unit = "\t" } + +# [[language]] +# name = "javascript" +# scope = "source.js" +# injection-regex = "^(js|javascript)$" +# 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 = " " } +# 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 = "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 diff --git a/os/linux/hypr/hyprland.conf b/os/linux/hypr/hyprland.conf index 3c326f4..9da796f 100644 --- a/os/linux/hypr/hyprland.conf +++ b/os/linux/hypr/hyprland.conf @@ -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' resume 'maybe-good-morning' 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 From 4338c85a18bb983dac516d6942f1dca5c3a92811 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 24 May 2023 15:27:31 -0500 Subject: [PATCH 5/5] More --- common/helix/languages.toml | 22 +++++++++---------- common/wezterm/wezterm.lua | 10 +++++++++ .../provision.d/60-AS_ROOT-vt-colors.bash | 3 +++ os/linux/eww/eww.yuck | 8 ++++++- os/linux/hypr/hyprland.conf | 2 ++ 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/common/helix/languages.toml b/common/helix/languages.toml index 833ad21..c93d18b 100644 --- a/common/helix/languages.toml +++ b/common/helix/languages.toml @@ -11,18 +11,18 @@ name = "fish" auto-format = true indent = { tab-width = 2, unit = "\t" } -# [[language]] -# name = "javascript" -# scope = "source.js" -# injection-regex = "^(js|javascript)$" -# file-types = ["js", "jsx", "mjs"] -# shebangs = ["deno", "node"] -# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"] -# comment-token = "//" +[[language]] +name = "javascript" +scope = "source.js" +injection-regex = "^(js|javascript)$" +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 = " " } -# auto-format = true +# language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" } +indent = { tab-width = 2, unit = "\t" } +auto-format = true # [[language]] # name = "jsx" diff --git a/common/wezterm/wezterm.lua b/common/wezterm/wezterm.lua index 442f417..abb2222 100644 --- a/common/wezterm/wezterm.lua +++ b/common/wezterm/wezterm.lua @@ -39,6 +39,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', diff --git a/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash b/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash index 573348f..37c809d 100755 --- a/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash +++ b/os/linux/arch/provision.d/60-AS_ROOT-vt-colors.bash @@ -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" diff --git a/os/linux/eww/eww.yuck b/os/linux/eww/eww.yuck index 46ec928..152c9e5 100644 --- a/os/linux/eww/eww.yuck +++ b/os/linux/eww/eww.yuck @@ -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") diff --git a/os/linux/hypr/hyprland.conf b/os/linux/hypr/hyprland.conf index 9da796f..bdb67ea 100644 --- a/os/linux/hypr/hyprland.conf +++ b/os/linux/hypr/hyprland.conf @@ -211,3 +211,5 @@ 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