update biri on laptop, link biri-related scripts to its config
This commit is contained in:
5 files changed
+67
-31
No files matched your search
@@ -31,8 +31,8 @@ overview { zoom 0.5; }
|
||||
layout {
|
||||
gaps 12
|
||||
struts {
|
||||
left 8
|
||||
right 8
|
||||
left 12
|
||||
right 12
|
||||
top -4
|
||||
bottom 6
|
||||
}
|
||||
@@ -82,6 +82,7 @@ binds {
|
||||
Mod+V hotkey-overlay-title="Show clipboard helper" { spawn "noctalia" "msg" "panel-toggle" "clipboard"; }
|
||||
Mod+P hotkey-overlay-title="Show power info" { spawn "noctalia" "msg" "panel-toggle" "control-center" "power"; }
|
||||
Ctrl+Shift+Escape { spawn "noctalia" "msg" "panel-toggle" "control-center" "system"; }
|
||||
Mod+Comma { spawn "noctalia" "msg" "panel-toggle" "dunarand/bookmarks:panel" "search"; }
|
||||
|
||||
Mod+TouchpadScrollUp cooldown-ms=250 { focus-workspace-up; }
|
||||
Mod+TouchpadScrollDown cooldown-ms=250 { focus-workspace-down; }
|
||||
@@ -110,11 +111,19 @@ binds {
|
||||
XF86WLAN { spawn-sh "rfkill toggle 0 || rfkill toggle 1"; }
|
||||
XF86NotificationCenter { spawn "noctalia" "msg" "panel-toggle" "control-center" "notifications"; }
|
||||
XF86Display { toggle-overview; }
|
||||
XF86Favorites { spawn-sh "niri msg action toggle-dwt && noctalia msg notification-show \"Touchpad DWT toggled\""; }
|
||||
XF86Favorites { spawn "niri-toggle-dwt"; }
|
||||
Print { screenshot; }
|
||||
Shift+Print { screenshot-window; }
|
||||
|
||||
Mod+Slash { spawn "niri-scratch-workspace-toggle"; }
|
||||
Mod+Shift+Slash { move-window-to-workspace "x" focus=false; }
|
||||
}
|
||||
workspace "x" {
|
||||
hidden true
|
||||
}
|
||||
spawn-at-startup "noctalia"
|
||||
spawn-at-startup "niri-listen-for-scratch-workspace-change"
|
||||
spawn-at-startup "niri-clear-state"
|
||||
window-rule {
|
||||
draw-border-with-background false
|
||||
geometry-corner-radius 2
|
||||
|
||||
@@ -36,5 +36,53 @@
|
||||
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl";
|
||||
});
|
||||
};
|
||||
|
||||
features.applications.shellScripts = {
|
||||
niri-scratch-workspace-toggle = ''
|
||||
if niri msg --json workspaces-with-hidden | jq -e '.[] | select(.name=="x") | .is_hidden' >/dev/null; then
|
||||
niri msg action unhide-workspace --focus=false "x"
|
||||
OUTPUT=$(niri msg --json focused-output | jq '.name' | sed 's/"//g')
|
||||
niri msg action move-workspace-to-monitor --reference "x" "$OUTPUT"
|
||||
niri msg action focus-workspace "x"
|
||||
else
|
||||
niri msg action hide-workspace "x"
|
||||
fi
|
||||
'';
|
||||
|
||||
niri-listen-for-scratch-workspace-change = ''
|
||||
niri msg --json event-stream | while read -r event; do
|
||||
if echo $event | jq -e '.WorkspaceActivated.focused' >/dev/null; then
|
||||
if niri msg --json workspaces | jq -e '.[] | select(.name=="x") | .is_active==false' >/dev/null; then
|
||||
niri msg action hide-workspace "x"
|
||||
fi
|
||||
elif echo $event | jq -e '.WorkspacesChanged.workspaces.[] | select(.name=="x") | .is_active==false' >/dev/null; then
|
||||
niri msg action hide-workspace "x"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
niri-toggle-dwt = ''
|
||||
niri msg action toggle-dwt
|
||||
cd ${config.xdg.stateHome}
|
||||
if [ -f ./niri.json ]; then
|
||||
if jq -e '.dwt' niri.json >/dev/null; then
|
||||
NEW_JSON=$(jq '.dwt = false' niri.json)
|
||||
echo "$NEW_JSON" > niri.json
|
||||
else
|
||||
NEW_JSON=$(jq '.dwt = true' niri.json)
|
||||
echo "$NEW_JSON" > niri.json
|
||||
fi
|
||||
else
|
||||
echo '{"dwt": false}' | jq '.' > niri.json
|
||||
fi
|
||||
NEW_STATE=$(jq '.dwt' niri.json)
|
||||
noctalia msg notification-show "Touchpad DWT toggled $NEW_STATE"
|
||||
'';
|
||||
|
||||
niri-clear-state = ''
|
||||
cd ${config.xdg.stateHome}
|
||||
rm niri.json
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
+5
-1
@@ -139,10 +139,14 @@ in {
|
||||
};
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
virtualisation.oci-containers = lib.mkIf (config.features.documentation.enable && !config.features.nixos.home-manager.enable) {
|
||||
config = (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.${config.info.userName}.features.documentation = lib.mkDefault config.features.documentation;
|
||||
} {
|
||||
virtualisation.oci-containers = lib.mkIf (config.features.documentation.enable) {
|
||||
backend = "docker";
|
||||
containers.flake-docs-nginx = containerAttrs { inherit (config.features.documentation) port; inherit pkgs; };
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||
|
||||
@@ -117,31 +117,6 @@
|
||||
increase-brightness = mkBrightnessScript "+";
|
||||
|
||||
decrease-brightness = mkBrightnessScript "-";
|
||||
|
||||
niri-scratch-workspace-toggle = ''
|
||||
if niri msg --json workspaces-with-hidden | jq -e '.[] | select(.name=="x") | .is_hidden' >/dev/null; then
|
||||
niri msg action unhide-workspace --focus=false "x"
|
||||
OUTPUT=$(niri msg --json focused-output | jq '.name' | sed 's/"//g')
|
||||
echo "OUTPUT=$OUTPUT"
|
||||
niri msg action move-workspace-to-monitor --reference "x" "$OUTPUT"
|
||||
echo "moved scratch workspace: $(niri msg --json workspaces | jq '.[] | select(.name=="x") | .output')"
|
||||
niri msg action focus-workspace "x"
|
||||
else
|
||||
niri msg action hide-workspace "x"
|
||||
fi
|
||||
'';
|
||||
|
||||
niri-listen-for-scratch-workspace-change = ''
|
||||
niri msg --json event-stream | while read -r event; do
|
||||
if echo $event | jq -e '.WorkspaceActivated.focused' >/dev/null; then
|
||||
if niri msg --json workspaces | jq -e '.[] | select(.name=="x") | .is_active==false' >/dev/null; then
|
||||
niri msg action hide-workspace "x"
|
||||
fi
|
||||
elif echo $event | jq -e '.WorkspacesChanged.workspaces.[] | select(.name=="x") | .is_active==false' >/dev/null; then
|
||||
niri msg action hide-workspace "x"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "barrulus";
|
||||
repo = finalAttrs.pname;
|
||||
rev = "82efb3c0fb688a0c738d15517a2e6a44ed7ca703";
|
||||
hash = "sha256-Gg4UHnugGnVZifxfKRUnxt3T+DSPgUvHEfE9tflA5zM=";
|
||||
rev = "59584af41f34eccc8afdfc05a40b9a7a17bc9c2d";
|
||||
hash = "sha256-9vr2VJvDDZP7zfST5TBvVCzOZivdQ+A0cmdURMMD/5w=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-aNovCzrTtmqTO33YtZap47npdN73zXC1bap5q5dZvZk=";
|
||||
|
||||
Reference in new issue
Block a user