summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-05-25 14:26:32 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-05-25 14:26:32 +0200
commitbc8e5d8c78c6997eca3258b7c4c20c727e7f0063 (patch)
tree8523d34867f341c7bb02994baa0710aa54e54e42 /accounts/gkleen@sif
parent15b3cfbf4a4ed2c85cfd8eea3e67da87c0c37db6 (diff)
downloadnixos-bc8e5d8c78c6997eca3258b7c4c20c727e7f0063.tar
nixos-bc8e5d8c78c6997eca3258b7c4c20c727e7f0063.tar.gz
nixos-bc8e5d8c78c6997eca3258b7c4c20c727e7f0063.tar.bz2
nixos-bc8e5d8c78c6997eca3258b7c4c20c727e7f0063.tar.xz
nixos-bc8e5d8c78c6997eca3258b7c4c20c727e7f0063.zip
worktime-ui
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r--accounts/gkleen@sif/default.nix2
-rw-r--r--accounts/gkleen@sif/niri/default.nix30
2 files changed, 21 insertions, 11 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index ac520249..041ffa9e 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -344,7 +344,7 @@ in {
344 font = "Fira Sans"; 344 font = "Fira Sans";
345 }; 345 };
346 colors = { 346 colors = {
347 background = "000000aa"; 347 background = "000000cc";
348 text = "cdd6f4ff"; 348 text = "cdd6f4ff";
349 match = "94e2d5ff"; 349 match = "94e2d5ff";
350 selection = "585b70ff"; 350 selection = "585b70ff";
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
index bc4e24c8..9bd6eafd 100644
--- a/accounts/gkleen@sif/niri/default.nix
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -134,7 +134,7 @@ let
134 134
135 windows_json="$(niri msg -j windows)" 135 windows_json="$(niri msg -j windows)"
136 active_workspace="$(jq -r '.[] | select(.is_focused) | .workspace_id' <<<"$windows_json")" 136 active_workspace="$(jq -r '.[] | select(.is_focused) | .workspace_id' <<<"$windows_json")"
137 window_ix="$(gojq -r --arg active_workspace "$active_workspace" '.[] | select('"$window_select"') | "\(.title)\u0000icon\u001f\(.app_id)"' <<<"$windows_json" | fuzzel --log-level=warning --dmenu --index)" 137 window_ix="$(gojq -r --arg active_workspace "$active_workspace" '.[] | select('"$window_select"') | "\(.title)\u0000icon\u001f\(.app_id)"' <<<"$windows_json" | fuzzel --width=60 --log-level=warning --dmenu --index)"
138 # shellcheck disable=SC2016 138 # shellcheck disable=SC2016
139 window_json="$(gojq -rc --arg active_workspace "$active_workspace" --arg window_ix "$window_ix" 'map(select('"$window_select"')) | .[($window_ix | tonumber)]' <<<"$windows_json")" 139 window_json="$(gojq -rc --arg active_workspace "$active_workspace" --arg window_ix "$window_ix" 'map(select('"$window_select"')) | .[($window_ix | tonumber)]' <<<"$windows_json")"
140 140
@@ -449,7 +449,7 @@ in {
449 { title = "^Access Request.*"; } 449 { title = "^Access Request.*"; }
450 { title = ".*Passkey credentials$"; } 450 { title = ".*Passkey credentials$"; }
451 ]; 451 ];
452 windowRuleExtra = [ 452 windowRuleExtra = with kdl; [
453 (kdl.leaf "open-focused" false) 453 (kdl.leaf "open-focused" false)
454 ]; 454 ];
455 key = "Mod+Control+P"; 455 key = "Mod+Control+P";
@@ -477,6 +477,20 @@ in {
477 app-id = "com.github.wwmm.easyeffects"; 477 app-id = "com.github.wwmm.easyeffects";
478 spawn = [ "easyeffects" ]; 478 spawn = [ "easyeffects" ];
479 } 479 }
480 { name = "time";
481 key = "Mod+Control+K";
482 app-id = "chrome-kimai.yggdrasil.li__-Default";
483 spawn = [ (toString (pkgs.resholve.writeScript "kimai" {
484 interpreter = pkgs.runtimeShell;
485 inputs = [ pkgs.dex ];
486 execer = [ "cannot:${lib.getExe pkgs.dex}" ];
487 } ''
488 exec dex $HOME/.local/state/nix/profile/share/applications/kimai.desktop
489 '')) ];
490 windowRuleExtra = with kdl; [
491 (leaf "block-out-from" "screencast")
492 ];
493 }
480 ]; 494 ];
481 programs.niri.config = 495 programs.niri.config =
482 let 496 let
@@ -683,12 +697,6 @@ in {
683 (leaf "open-on-workspace" "comm") 697 (leaf "open-on-workspace" "comm")
684 ]) 698 ])
685 (plain "window-rule" [ 699 (plain "window-rule" [
686 (leaf "match" { app-id = "^chrome-kimai\.yggdrasil\.li__-Default$"; })
687 (leaf "open-on-workspace" "comm")
688 (leaf "open-fullscreen" false)
689 (plain "default-column-width" [(leaf "proportion" (2. / 3.))])
690 ])
691 (plain "window-rule" [
692 (leaf "match" { app-id = "^firefox$"; }) 700 (leaf "match" { app-id = "^firefox$"; })
693 (leaf "open-on-workspace" "web") 701 (leaf "open-on-workspace" "web")
694 (leaf "open-maximized" true) 702 (leaf "open-maximized" true)
@@ -803,7 +811,7 @@ in {
803 done < <(export LC_ALL=C.UTF-8; echo; find "$RESULTS_DIR" -type f -printf $'%T@ %p\n' | sort -n | cut -d' ' -f2- | xargs -r cat) 811 done < <(export LC_ALL=C.UTF-8; echo; find "$RESULTS_DIR" -type f -printf $'%T@ %p\n' | sort -n | cut -d' ' -f2- | xargs -r cat)
804 $FOUND || echo 812 $FOUND || echo
805 } 813 }
806 FUZZEL_RES=$(prev | fuzzel --dmenu --prompt "qalc> ") || exit $? 814 FUZZEL_RES=$(prev | fuzzel --dmenu --prompt "qalc> " --width=60) || exit $?
807 if [[ "$FUZZEL_RES" =~ .*\ =\ .* ]]; then 815 if [[ "$FUZZEL_RES" =~ .*\ =\ .* ]]; then
808 QALC_RES="$FUZZEL_RES" 816 QALC_RES="$FUZZEL_RES"
809 QALC_RET=0 817 QALC_RET=0
@@ -832,7 +840,7 @@ in {
832 name = "emoji-fuzzel"; 840 name = "emoji-fuzzel";
833 runtimeInputs = with pkgs; [ config.programs.fuzzel.package wtype wl-clipboard-rs ]; 841 runtimeInputs = with pkgs; [ config.programs.fuzzel.package wtype wl-clipboard-rs ];
834 text = '' 842 text = ''
835 FUZZEL_RES=$(fuzzel --dmenu --prompt "emoji> " <"$HOME"/.local/share/emoji-data/list.txt) || exit $? 843 FUZZEL_RES=$(fuzzel --dmenu --prompt "emoji> " --cache "$HOME"/.cache/fuzzel-emoji --width=60 <"$HOME"/.local/share/emoji-data/list.txt) || exit $?
836 [[ -n "$FUZZEL_RES" ]] || exit 1 844 [[ -n "$FUZZEL_RES" ]] || exit 1
837 wl-copy "$(cut -d ':' -f 1 <<<"$FUZZEL_RES" | tr -d '\n')" && wtype -k XF86Paste 845 wl-copy "$(cut -d ':' -f 1 <<<"$FUZZEL_RES" | tr -d '\n')" && wtype -k XF86Paste
838 ''; 846 '';
@@ -973,6 +981,8 @@ in {
973 981
974 "Mod+D".action = with-urgent-window-action "{\"Action\":{\"FocusWindow\":{\"id\": .id}}}"; 982 "Mod+D".action = with-urgent-window-action "{\"Action\":{\"FocusWindow\":{\"id\": .id}}}";
975 "Mod+Shift+D".action = with-focused-window-action "{\"Action\":{\"UnsetUrgent\":{\"id\": .id}}}"; 983 "Mod+Shift+D".action = with-focused-window-action "{\"Action\":{\"UnsetUrgent\":{\"id\": .id}}}";
984
985 "Mod+K".action = spawn (lib.getExe' pkgs.worktime "worktime-ui");
976 })) 986 }))
977 (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces) 987 (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces)
978 (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces) 988 (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces)