Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
eaba3a8978 |
122
flake.lock
122
flake.lock
|
|
@ -2,19 +2,15 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"ags": {
|
"ags": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"astal": [
|
"astal": "astal",
|
||||||
"astal"
|
"nixpkgs": "nixpkgs"
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761391130,
|
"lastModified": 1744557573,
|
||||||
"narHash": "sha256-v7NoATfY4fnhkfvpSiznS8J6uV6Nyx7kbri/VSGxC3M=",
|
"narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"repo": "ags",
|
"repo": "ags",
|
||||||
"rev": "83f4895c64b93b4a0993c336be159a7c117406c9",
|
"rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -26,15 +22,16 @@
|
||||||
"astal": {
|
"astal": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"ags",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761246688,
|
"lastModified": 1742571008,
|
||||||
"narHash": "sha256-U2r3/DKgr9Fq1yqWLCbKMSqRf8a1JctD0kj/ftBClsg=",
|
"narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=",
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"repo": "astal",
|
"repo": "astal",
|
||||||
"rev": "189bf73016c26d7d32729a913d6436cd7b1a0885",
|
"rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -109,7 +106,7 @@
|
||||||
"fzgo": {
|
"fzgo": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737991358,
|
"lastModified": 1737991358,
|
||||||
|
|
@ -132,11 +129,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761584077,
|
"lastModified": 1750304462,
|
||||||
"narHash": "sha256-dISPEZahlfs5K6d58zR4akRRyogfE9P4WSyPPNT7HiE=",
|
"narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e82585308aef3d4cc2c36c7b6946051c8cdf24ef",
|
"rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -167,6 +164,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743583204,
|
||||||
|
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722421184,
|
"lastModified": 1722421184,
|
||||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||||
|
|
@ -182,39 +195,39 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1761373498,
|
|
||||||
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761373498,
|
"lastModified": 1750134718,
|
||||||
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
|
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
|
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750134718,
|
||||||
|
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730200266,
|
"lastModified": 1730200266,
|
||||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||||
|
|
@ -233,14 +246,15 @@
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761648580,
|
"lastModified": 1750323839,
|
||||||
"narHash": "sha256-+2PRxxFeLgCJSIh1w55S1hoSvX3gVpB6RgzT1rjCTb8=",
|
"narHash": "sha256-r2Izw07xe5JEWLjQLI4Y3C/Sw2VNBGNmnZTVWtOyzlg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "9f9f3ecd00acde2e95c088350351dff0dcd405de",
|
"rev": "7f1902da6a047ccffbbb809b98205d08cd5df509",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -252,19 +266,39 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"ags": "ags",
|
"ags": "ags",
|
||||||
"astal": "astal",
|
|
||||||
"fzgo": "fzgo",
|
"fzgo": "fzgo",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
|
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"worktimer": "worktimer"
|
"worktimer": "worktimer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nur",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733222881,
|
||||||
|
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"worktimer": {
|
"worktimer": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": "flake-parts_3",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739738223,
|
"lastModified": 1739738223,
|
||||||
|
|
|
||||||
17
flake.nix
17
flake.nix
|
|
@ -7,21 +7,12 @@
|
||||||
};
|
};
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||||
|
ags.url = "github:aylur/ags";
|
||||||
worktimer = {
|
worktimer = {
|
||||||
type = "git";
|
type = "git";
|
||||||
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
||||||
ref = "cli";
|
ref = "cli";
|
||||||
};
|
};
|
||||||
astal = {
|
|
||||||
url = "github:aylur/astal";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
ags = {
|
|
||||||
url = "github:aylur/ags";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
inputs.astal.follows = "astal";
|
|
||||||
};
|
|
||||||
nixos-06cb-009a-fingerprint-sensor = {
|
nixos-06cb-009a-fingerprint-sensor = {
|
||||||
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor?ref=24.11";
|
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor?ref=24.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -40,7 +31,7 @@
|
||||||
]; }
|
]; }
|
||||||
{
|
{
|
||||||
networking.hostName = host;
|
networking.hostName = host;
|
||||||
time.timeZone = "Asia/Bangkok";
|
time.timeZone = "Europe/Brussels";
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
|
|
@ -100,7 +91,5 @@
|
||||||
Asturia = { user = "user"; };
|
Asturia = { user = "user"; };
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
|
||||||
nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,13 @@ let
|
||||||
fzgo_paths = {
|
fzgo_paths = {
|
||||||
files = [
|
files = [
|
||||||
"/home/user/.dotfiles"
|
"/home/user/.dotfiles"
|
||||||
|
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||||
];
|
];
|
||||||
dirs = [
|
dirs = [
|
||||||
"/home/user/.dotfiles"
|
"/home/user/.dotfiles"
|
||||||
"/Storage/TrackBox"
|
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||||
|
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||||
|
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
@ -19,8 +22,7 @@ in
|
||||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";
|
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# jetbrains.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
zed-editor
|
|
||||||
distrobox
|
distrobox
|
||||||
gnome-disk-utility
|
gnome-disk-utility
|
||||||
moonlight-qt
|
moonlight-qt
|
||||||
|
|
@ -43,9 +45,9 @@ in
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
monitor = [
|
monitor = [
|
||||||
"eDP-1,2880x1800@120.00Hz,0x284,1.2,vrr,1"
|
"eDP-1,2880x1800@120.00Hz,0x0,1.2"
|
||||||
"DP-1,1920x1080,6240x500,1"
|
"DP-1,3840x2160@60.00Hz,0x-2160,1"
|
||||||
"HDMI-A-1,3840x2160@60.00Hz,2400x0,1"
|
"HDMI-A-1,3840x2160@60.00Hz,0x-2160,1"
|
||||||
];
|
];
|
||||||
bind = [
|
bind = [
|
||||||
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
|
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
|
||||||
|
|
@ -55,6 +57,6 @@ in
|
||||||
general.gaps_out = 1;
|
general.gaps_out = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.alacritty.settings.font.size = 13;
|
programs.alacritty.settings.font.size = 16;
|
||||||
programs.kitty.font.size = 13;
|
programs.kitty.font.size = 15;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,13 @@ let
|
||||||
fzgo_paths = {
|
fzgo_paths = {
|
||||||
files = [
|
files = [
|
||||||
"/home/user/.dotfiles"
|
"/home/user/.dotfiles"
|
||||||
|
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||||
];
|
];
|
||||||
dirs = [
|
dirs = [
|
||||||
"/home/user/.dotfiles"
|
"/home/user/.dotfiles"
|
||||||
"/Storage/TrackBox/"
|
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||||
|
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||||
|
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
@ -25,7 +28,7 @@ in
|
||||||
vscode
|
vscode
|
||||||
texliveFull
|
texliveFull
|
||||||
gnome-power-manager
|
gnome-power-manager
|
||||||
# jetbrains.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
discord
|
discord
|
||||||
smile
|
smile
|
||||||
];
|
];
|
||||||
|
|
@ -54,5 +57,4 @@ in
|
||||||
|
|
||||||
programs.alacritty.settings.font.size = 13;
|
programs.alacritty.settings.font.size = 13;
|
||||||
programs.kitty.font.size = 15;
|
programs.kitty.font.size = 15;
|
||||||
programs.foot.settings.main.font = pkgs.lib.mkForce "DejaVu Sans Mono:size=15";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,30 +23,30 @@ let
|
||||||
${pkgs.notmuch}/bin/notmuch new
|
${pkgs.notmuch}/bin/notmuch new
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
# sync_vault = {
|
sync_vault = {
|
||||||
# when = "*-*-* 02:00:00";
|
when = "*-*-* 02:00:00";
|
||||||
# script = toString (pkgs.writeShellScript "script" ''
|
script = toString (pkgs.writeShellScript "script" ''
|
||||||
# source $HOME/.secrets/Backup/env.sh
|
source $HOME/.secrets/Backup/env.sh
|
||||||
# for _ in {1..2}; do
|
for _ in {1..2}; do
|
||||||
# OUTPUT=$(echo "$ZFS_PASSPHRASE" | ssh 10.4.0.1 zfs load-key Vault/Thomas/Encrypted 2>&1);
|
OUTPUT=$(echo "$ZFS_PASSPHRASE" | ssh 10.4.0.1 zfs load-key Vault/Thomas/Encrypted 2>&1);
|
||||||
# if [ "$OUTPUT" == "Key load error: Key already loaded for 'Vault/Thomas/Encrypted'." ]; then
|
if [ "$OUTPUT" == "Key load error: Key already loaded for 'Vault/Thomas/Encrypted'." ]; then
|
||||||
# echo "Key successfully loaded, starting syncoid"
|
echo "Key successfully loaded, starting syncoid"
|
||||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas/Workspace 10.4.0.1:Vault/Thomas/Encrypted/Storage/Workspace
|
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas/Workspace 10.4.0.1:Vault/Thomas/Encrypted/Storage/Workspace
|
||||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas 10.4.0.1:Vault/Thomas/Encrypted/Storage/T
|
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas 10.4.0.1:Vault/Thomas/Encrypted/Storage/T
|
||||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Emily 10.4.0.1:Vault/Thomas/Encrypted/Storage/N
|
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Emily 10.4.0.1:Vault/Thomas/Encrypted/Storage/N
|
||||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Yolande 10.4.0.1:Vault/Thomas/Encrypted/Storage/Y
|
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Yolande 10.4.0.1:Vault/Thomas/Encrypted/Storage/Y
|
||||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Containers 10.4.0.1:Vault/Thomas/Encrypted/Containers
|
syncoid --no-privilege-elevation --no-sync-snap tank/Containers 10.4.0.1:Vault/Thomas/Encrypted/Containers
|
||||||
# ssh 10.4.0.1 zfs unload-key Vault/Thomas/Encrypted
|
ssh 10.4.0.1 zfs unload-key Vault/Thomas/Encrypted
|
||||||
# ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/s39pIIrB0R
|
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/s39pIIrB0R
|
||||||
# exit 0
|
exit 0
|
||||||
# fi
|
fi
|
||||||
# done
|
done
|
||||||
#
|
|
||||||
# echo "Found output instead: $OUTPUT"
|
echo "Found output instead: $OUTPUT"
|
||||||
# echo "Failed to load key: $OUTPUT" | sendmail
|
echo "Failed to load key: $OUTPUT" | sendmail
|
||||||
# exit 1
|
exit 1
|
||||||
# '');
|
'');
|
||||||
# };
|
};
|
||||||
backup = {
|
backup = {
|
||||||
when = "*-*-* 04:00:00";
|
when = "*-*-* 04:00:00";
|
||||||
script = toString (pkgs.writeShellScript "script" ''
|
script = toString (pkgs.writeShellScript "script" ''
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
# add the home manager module
|
# add the home manager module
|
||||||
imports = [ inputs.ags.homeManagerModules.default ];
|
imports = [ inputs.ags.homeManagerModules.default ];
|
||||||
|
|
||||||
programs.ags = {
|
programs.ags = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -10,7 +11,6 @@
|
||||||
extraPackages = with inputs.ags.packages.${pkgs.system}; [
|
extraPackages = with inputs.ags.packages.${pkgs.system}; [
|
||||||
pkgs.gtksourceview
|
pkgs.gtksourceview
|
||||||
pkgs.accountsservice
|
pkgs.accountsservice
|
||||||
pkgs.libadwaita
|
|
||||||
|
|
||||||
battery
|
battery
|
||||||
hyprland
|
hyprland
|
||||||
|
|
|
||||||
|
|
@ -1,53 +1,37 @@
|
||||||
import { Astal, Gdk, Gtk } from "ags/gtk4";
|
import { Astal, Gdk } from "ags/gtk4";
|
||||||
import app from "ags/gtk4/app";
|
import app from "ags/gtk4/app"
|
||||||
import { createBinding, createState, For, With, Accessor } from "ags";
|
import Gtk from "gi://Gtk?version=4.0"
|
||||||
import { createPoll } from "ags/time";
|
import { createBinding, createState } from "ags"
|
||||||
import Tray from "gi://AstalTray";
|
import Tray from "gi://AstalTray";
|
||||||
import { execAsync } from "ags/process";
|
import { execAsync } from "ags/process"
|
||||||
import Hyprland from "gi://AstalHyprland";
|
import Hyprland from "gi://AstalHyprland";
|
||||||
import { getIconName } from "./utils";
|
import { getIconName } from "./utils";
|
||||||
import Wp from "gi://AstalWp";
|
import Wp from "gi://AstalWp"
|
||||||
import Battery from "gi://AstalBattery";
|
import Battery from "gi://AstalBattery"
|
||||||
import GLib from "gi://GLib";
|
|
||||||
|
|
||||||
const battery = Battery.get_default();
|
const battery = Battery.get_default()
|
||||||
const sensorsAvailable = await execAsync(["sensors"])
|
const sensorsAvailable = await execAsync(['sensors']).then(() => true).catch(() => false);
|
||||||
.then(() => true)
|
|
||||||
.catch(() => false);
|
|
||||||
const wirePlumber = Wp.get_default();
|
const wirePlumber = Wp.get_default();
|
||||||
|
|
||||||
function SysTray(): JSX.Element {
|
function SysTray(): JSX.Element {
|
||||||
const tray = Tray.get_default();
|
const tray = Tray.get_default();
|
||||||
let items = createBinding(tray, "items");
|
|
||||||
|
|
||||||
const init = (btn: Gtk.MenuButton, item: Tray.TrayItem) => {
|
|
||||||
btn.menuModel = item.menuModel;
|
|
||||||
btn.insert_action_group("dbusmenu", item.actionGroup);
|
|
||||||
item.connect("notify::action-group", () => {
|
|
||||||
btn.insert_action_group("dbusmenu", item.actionGroup);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<box>
|
<box>
|
||||||
<For each={items}>
|
{createBinding(tray, "items").as((items) =>
|
||||||
{(item: Tray.TrayItem) => {
|
items.map((item) => {
|
||||||
if (item.iconThemePath) app.add_icons(item.iconThemePath);
|
if (item.iconThemePath) app.add_icons(item.iconThemePath);
|
||||||
return (
|
return (
|
||||||
<menubutton
|
<menubutton
|
||||||
$={(self) => init(self, item)}
|
|
||||||
class="systray"
|
class="systray"
|
||||||
tooltipMarkup={createBinding(item, "tooltipMarkup")}
|
tooltipMarkup={createBinding(item, "tooltipMarkup")}
|
||||||
menuModel={createBinding(item, "menuModel")}
|
usePopover={false}
|
||||||
>
|
actionGroup={createBinding(item, "actionGroup").as(ag => ["dbusmenu", ag])}
|
||||||
<image
|
menuModel={createBinding(item, "menuModel")}>
|
||||||
gicon={createBinding(item, "gicon")}
|
{/* <icon gicon={createBinding(item, "gicon")} class="systray-item" /> */}
|
||||||
class="systray-item"
|
|
||||||
/>
|
|
||||||
</menubutton>
|
</menubutton>
|
||||||
);
|
);
|
||||||
}}
|
}),
|
||||||
</For>
|
)}
|
||||||
</box>
|
</box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -69,75 +53,83 @@ function Center(): JSX.Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
function Date({ format = "%Y-%m-%d" }): JSX.Element {
|
function Date({ format = "%Y-%m-%d" }): JSX.Element {
|
||||||
const time = createPoll<string>(
|
const time = createState<string>("").poll(60000, () =>
|
||||||
"",
|
GLib.DateTime.new_now_local().format(format)!)
|
||||||
60000,
|
return <button
|
||||||
() => GLib.DateTime.new_now_local().format(format)!,
|
class="item"
|
||||||
);
|
onDestroy={() => time.drop()}
|
||||||
return (
|
label={time()}
|
||||||
<button
|
onClicked={() => execAsync(['gnome-calendar'])}
|
||||||
class="item"
|
/>
|
||||||
label={time}
|
|
||||||
onClicked={() => execAsync(["gnome-calendar"])}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Time({ format = "%H:%M:%S" }): JSX.Element {
|
function Time({ format = "%H:%M:%S" }): JSX.Element {
|
||||||
const time = createPoll<string>(
|
const time = createState<string>("").poll(1000, () =>
|
||||||
"",
|
GLib.DateTime.new_now_local().format(format)!)
|
||||||
1000,
|
return <label
|
||||||
() => GLib.DateTime.new_now_local().format(format)!,
|
class="item blue"
|
||||||
);
|
onDestroy={() => time.drop()}
|
||||||
return <label class="item blue" label={time} />;
|
label={time()}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
function Temp(): JSX.Element {
|
function Temp(): JSX.Element {
|
||||||
let [label, _setlabel] = createState<string>("N/A");
|
let label = createState<string>("N/A");
|
||||||
if (sensorsAvailable) {
|
if (sensorsAvailable) {
|
||||||
label = createPoll<string>("", 3000, "sensors", (out) => {
|
label = createState<string>("").poll(5000, 'sensors', out => {
|
||||||
const match = out
|
const match = out.split('\n').find(line => line.includes('Tctl') || line.includes('Package'))?.match(/[0-9.]*°C/);
|
||||||
.split("\n")
|
|
||||||
.find((line) => line.includes("Tctl") || line.includes("Package"))
|
|
||||||
?.match(/[0-9.]*°C/);
|
|
||||||
return match ? match[0] : "N/A";
|
return match ? match[0] : "N/A";
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
return <label class="item blue" label={label} />;
|
return <label
|
||||||
|
class="item blue"
|
||||||
|
onDestroy={() => label.drop()}
|
||||||
|
label={label()}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
function Memory(): JSX.Element {
|
function Memory(): JSX.Element {
|
||||||
const memory = createPoll<string>("", 2000, "free", (out) => {
|
const memory = createState<string>("").poll(2000, "free", out => {
|
||||||
const line = out.split("\n").find((line) => line.includes("Mem:"));
|
const line = out.split('\n').find(line => line.includes('Mem:'));
|
||||||
if (!line) return "N/A";
|
if (!line) return "N/A";
|
||||||
const split = line.split(/\s+/).map(Number);
|
const split = line.split(/\s+/).map(Number);
|
||||||
return (split[2] / 1000000).toFixed(2) + "GB";
|
return (split[2] / 1000000).toFixed(2) + "GB";
|
||||||
});
|
});
|
||||||
return <label class="item blue" label={memory} />;
|
return <label
|
||||||
|
class="item blue"
|
||||||
|
onDestroy={() => memory.drop()}
|
||||||
|
label={memory()}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClockSpeed(): JSX.Element {
|
function ClockSpeed(): JSX.Element {
|
||||||
const command =
|
const command = 'bash -c "cat /proc/cpuinfo | grep \\"MHz\\" | awk \'{print \\$4}\' | sort -n | tail -1 | awk \'{printf \\"%.2fGHz\\", \\$1/1000}\'"';
|
||||||
'bash -c "cat /proc/cpuinfo | grep \\"MHz\\" | awk \'{print \\$4}\' | sort -n | tail -1 | awk \'{printf \\"%.2fGHz\\", \\$1/1000}\'"';
|
const speed = createState<string>("").poll(5000, command)
|
||||||
const speed = createPoll<string>("", 1000, command, (out) => out);
|
return <label
|
||||||
return <label class="item" label={speed} />;
|
class="item"
|
||||||
|
onDestroy={() => speed.drop()}
|
||||||
|
label={speed()}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
function CPU(): JSX.Element {
|
function CPU(): JSX.Element {
|
||||||
const usage = createPoll<string>("", 2000, "top -b -n 1", (out) => {
|
const usage = createState<string>("").poll(2000, "top -b -n 1", out => {
|
||||||
const line = out.split("\n").find((line) => line.includes("Cpu(s)"));
|
const line = out.split("\n").find(line => line.includes('Cpu(s)'));
|
||||||
if (!line) return "N/A";
|
if (!line) return "N/A";
|
||||||
return line.split(/\s+/)[1].replace(",", ".").toString() + "%";
|
return line.split(/\s+/)[1].replace(',', '.').toString() + "%";
|
||||||
});
|
});
|
||||||
return (
|
return <box class="item">
|
||||||
<box class="item">
|
{/* <icon icon="speedometer" css="margin-right: 0.7em;" /> */}
|
||||||
<image iconName="speedometer" css="margin-right: 0.7em;" />
|
<label
|
||||||
<label label={usage} />
|
onDestroy={() => usage.drop()}
|
||||||
</box>
|
label={usage()}
|
||||||
);
|
/>
|
||||||
|
</box>
|
||||||
}
|
}
|
||||||
|
|
||||||
function Right() {
|
|
||||||
|
|
||||||
|
function Right(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<box class="right" hexpand halign={Gtk.Align.END} spacing={6}>
|
<box class="right" hexpand halign={Gtk.Align.END} spacing={6}>
|
||||||
<Icons />
|
<Icons />
|
||||||
|
|
@ -152,46 +144,31 @@ function Right() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BatteryIcon(): JSX.Element {
|
// function BatteryIcon(): JSX.Element {
|
||||||
if (battery.get_state() == 0) return <box />;
|
// if (battery.get_state() == 0) return <box />;
|
||||||
let batteryPercentage = createBinding(battery, "percentage");
|
// return <button class="battery-item" onClicked={() => execAsync(['gnome-power-statistics'])}>
|
||||||
return (
|
// <box>
|
||||||
<button
|
// {
|
||||||
class="battery-item"
|
// createBinding(battery, "percentage").as((percentage) => {
|
||||||
onClicked={() => execAsync(["gnome-power-statistics"])}
|
// const thresholds = [...Array(11).keys()].map(i => i * 10);
|
||||||
>
|
// const icon = thresholds.find(threshold => threshold >= percentage * 100)
|
||||||
<box>
|
// const charging_name = battery.percentage >= 0.99 ? "charged" : "charging"
|
||||||
<With value={batteryPercentage}>
|
// return <icon
|
||||||
{(percentage) => {
|
// icon={battery.charging ? `battery-level-${icon}-${charging_name}-symbolic` : `battery-level-${icon}-symbolic`}
|
||||||
const thresholds = [...Array(11).keys()].map((i) => i * 10);
|
// />
|
||||||
const icon = thresholds.find(
|
// })
|
||||||
(threshold) => threshold >= percentage * 100,
|
// }
|
||||||
);
|
// </box>
|
||||||
const charging_name =
|
// </button>
|
||||||
battery.percentage >= 0.99 ? "charged" : "charging";
|
// }
|
||||||
return (
|
|
||||||
<image
|
|
||||||
iconName={
|
|
||||||
battery.charging
|
|
||||||
? `battery-level-${icon}-${charging_name}-symbolic`
|
|
||||||
: `battery-level-${icon}-symbolic`
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</With>
|
|
||||||
</box>
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Icons() {
|
function Icons() {
|
||||||
return (
|
return (
|
||||||
<box class="item icon-group">
|
<box class="item icon-group">
|
||||||
<SysTray />
|
<SysTray />
|
||||||
<BatteryIcon />
|
{/* <BatteryIcon /> */}
|
||||||
</box>
|
</box>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function Volume(): JSX.Element {
|
function Volume(): JSX.Element {
|
||||||
|
|
@ -199,173 +176,120 @@ function Volume(): JSX.Element {
|
||||||
|
|
||||||
const audio = wirePlumber.audio;
|
const audio = wirePlumber.audio;
|
||||||
const icon = createBinding(audio.default_speaker, "volume").as((volume) => {
|
const icon = createBinding(audio.default_speaker, "volume").as((volume) => {
|
||||||
const vol = volume * 100;
|
const vol = volume * 100
|
||||||
const icon = [
|
const icon = [
|
||||||
[101, "overamplified"],
|
[101, 'overamplified'],
|
||||||
[67, "high"],
|
[67, 'high'],
|
||||||
[34, "medium"],
|
[34, 'medium'],
|
||||||
[1, "low"],
|
[1, 'low'],
|
||||||
[0, "muted"],
|
[0, 'muted'],
|
||||||
].find(([threshold]) => Number(threshold) <= vol)?.[1];
|
].find(([threshold]) => Number(threshold) <= vol)?.[1]
|
||||||
return `audio-volume-${icon}-symbolic`;
|
return `audio-volume-${icon}-symbolic`
|
||||||
});
|
});
|
||||||
const css = createBinding(audio.default_speaker, "mute").as((mute) => {
|
const css = createBinding(audio.default_speaker, "mute").as((mute) => {
|
||||||
return mute ? "margin-left:0;" : "margin-left: 0.7em;";
|
return mute ? "margin-left:0;" : "margin-left: 0.7em;"
|
||||||
});
|
});
|
||||||
let volume = createBinding(audio.default_speaker, "volume");
|
|
||||||
let mute = createBinding(audio.default_speaker, "mute");
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button class="item blue" onClicked={() => audio.default_speaker.mute = !audio.default_speaker.mute}>
|
||||||
class="item blue"
|
|
||||||
onClicked={() =>
|
|
||||||
(audio.default_speaker.mute = !audio.default_speaker.mute)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<box>
|
<box>
|
||||||
<image iconName={icon} />
|
{/* <icon icon={icon} /> */}
|
||||||
<With value={volume}>
|
{
|
||||||
{(vol) => (
|
createBinding(audio.default_speaker, "volume").as((volume) => <box>
|
||||||
<box>
|
{
|
||||||
<With value={mute}>
|
createBinding(audio.default_speaker, "mute").as((mute) => <box>
|
||||||
{(muted) => {
|
{
|
||||||
return (
|
<label label={mute ? "" : `${Math.floor(volume * 100)}%`} css={css} />
|
||||||
<label
|
}
|
||||||
label={muted ? "" : `${Math.floor(vol * 100)}%`}
|
</box>)
|
||||||
css={css}
|
}
|
||||||
/>
|
</box>)
|
||||||
);
|
}
|
||||||
}}
|
|
||||||
</With>
|
|
||||||
</box>
|
|
||||||
)}
|
|
||||||
</With>
|
|
||||||
</box>
|
</box>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function Workspaces(): JSX.Element {
|
function Workspaces(): JSX.Element {
|
||||||
const hyprland = Hyprland.get_default();
|
const hyprland = Hyprland.get_default();
|
||||||
let workspaces = createBinding(hyprland, "workspaces");
|
|
||||||
return (
|
return (
|
||||||
<box class="workspaces">
|
<box class="workspaces">
|
||||||
<With value={workspaces}>
|
{createBinding(hyprland, "workspaces").as((wss) =>
|
||||||
{(wss: Array<Hyprland.Workspace>) => (
|
<box>
|
||||||
<box>
|
{createBinding(hyprland, "focusedMonitor").as((fm) =>
|
||||||
<With value={createBinding(hyprland, "focusedMonitor")}>
|
wss.sort((a, b) => a.id - b.id)
|
||||||
{(fm: Hyprland.Monitor) => {
|
.filter(ws => ws && ws.get_monitor() && ws.get_monitor().get_id() === fm.get_id())
|
||||||
let filtered_wss = new Accessor(() =>
|
.map((ws) => (
|
||||||
wss
|
<button
|
||||||
.sort((a, b) => a.id - b.id)
|
class={createBinding(hyprland, "focusedWorkspace").as((fw) => ws === fw ? "focused" : "",)}
|
||||||
.filter(
|
onClicked={() => ws.focus()}
|
||||||
(ws) =>
|
>
|
||||||
ws &&
|
{`${ws.id}`.slice(-1)}
|
||||||
ws.get_monitor() &&
|
</button>
|
||||||
ws.get_monitor().get_id() === fm.get_id(),
|
)))}
|
||||||
),
|
</box>
|
||||||
);
|
)}
|
||||||
return (
|
|
||||||
<box>
|
|
||||||
<For each={filtered_wss}>
|
|
||||||
{(ws: Hyprland.Workspace, _index) => (
|
|
||||||
<button
|
|
||||||
class={createBinding(hyprland, "focusedWorkspace").as(
|
|
||||||
(fw) => (ws === fw ? "focused" : ""),
|
|
||||||
)}
|
|
||||||
onClicked={() => ws.focus()}
|
|
||||||
>
|
|
||||||
{`${ws.id}`.slice(-1)}
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</With>
|
|
||||||
</box>
|
|
||||||
)}
|
|
||||||
</With>
|
|
||||||
</box>
|
</box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function shorten(title: string) {
|
function shorten(title: string) {
|
||||||
return title.length > 40 ? title.slice(0, 20) + "..." : title;
|
return title.length > 40 ? title.slice(0, 20) + "..." : title
|
||||||
}
|
}
|
||||||
|
|
||||||
function Clients(): JSX.Element {
|
function Clients(): JSX.Element {
|
||||||
const hyprland = Hyprland.get_default();
|
const hyprland = Hyprland.get_default();
|
||||||
let clients = createBinding(hyprland, "clients");
|
|
||||||
return (
|
return (
|
||||||
<box>
|
<box>
|
||||||
<With value={createBinding(hyprland, "focusedWorkspace")}>
|
{
|
||||||
{(fw: Hyprland.Workspace) => (
|
createBinding(hyprland, "focusedWorkspace").as(fw => (
|
||||||
<box class="clients">
|
<box class="clients">
|
||||||
<With value={clients}>
|
{
|
||||||
{(cls: Array<Hyprland.Client>) => {
|
createBinding(hyprland, "clients").as(cls =>
|
||||||
let filtered_clients = new Accessor(() =>
|
cls
|
||||||
cls
|
.sort((a, b) => a.pid - b.pid)
|
||||||
.sort((a, b) => a.pid - b.pid)
|
.filter(cl => !cl.title.includes("rofi"))
|
||||||
.filter((cl) => !cl.title.includes("rofi"))
|
.filter(cl => fw && cl.get_workspace().get_id() === fw.get_id())
|
||||||
.filter(
|
.map(cl => (
|
||||||
(cl) => fw && cl.get_workspace().get_id() === fw.get_id(),
|
<box
|
||||||
),
|
class={createBinding(hyprland, "focusedClient").as(a => a && a.address === cl.address ? "focused" : "unfocused")}
|
||||||
);
|
>
|
||||||
|
{/* <icon */}
|
||||||
|
{/* icon={getIconName(cl)} */}
|
||||||
|
{/* class="app-icon" */}
|
||||||
|
{/* /> */}
|
||||||
|
<label label={createBinding(cl, 'title').as(title => shorten(title))} />
|
||||||
|
</box>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
}
|
||||||
<box>
|
|
||||||
<For each={filtered_clients}>
|
|
||||||
{(cl: Hyprland.Client, _index) => (
|
|
||||||
<box
|
|
||||||
class={createBinding(hyprland, "focusedClient").as(
|
|
||||||
(a) =>
|
|
||||||
a && a.address === cl.address
|
|
||||||
? "focused"
|
|
||||||
: "unfocused",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<image iconName={getIconName(cl)} class="app-icon" />
|
|
||||||
<label
|
|
||||||
label={createBinding(cl, "title").as((title) =>
|
|
||||||
shorten(title),
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</box>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</With>
|
|
||||||
</box>
|
</box>
|
||||||
)}
|
)
|
||||||
</With>
|
)
|
||||||
|
}
|
||||||
</box>
|
</box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Bar(gdkmonitor: Gdk.Monitor, scaleFactor: number = 1) {
|
export default function Bar(gdkmonitor: Gdk.Monitor, scaleFactor: number = 1): Gtk.Window {
|
||||||
console.log("Creating Bar on monitor:", gdkmonitor);
|
return new Gtk.Window({
|
||||||
return (
|
gdkmonitor,
|
||||||
<window
|
css: "font-size: " + scaleFactor + "em;",
|
||||||
visible
|
exclusivity: Astal.Exclusivity.EXCLUSIVE,
|
||||||
gdkmonitor={gdkmonitor}
|
anchor: Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT | Astal.WindowAnchor.RIGHT,
|
||||||
css={"font-size: " + scaleFactor + "em;"}
|
application: app,
|
||||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
class: "Bar",
|
||||||
anchor={
|
name: "top-bar",
|
||||||
Astal.WindowAnchor.TOP |
|
s: self => self.connect("destroy", () => {
|
||||||
Astal.WindowAnchor.LEFT |
|
print("Detroying bar");
|
||||||
Astal.WindowAnchor.RIGHT
|
app.remove_window(self);
|
||||||
}
|
}),
|
||||||
application={app}
|
child: <centerbox class="window-box">
|
||||||
class="Bar"
|
<Left />
|
||||||
name="top-bar"
|
<Center />
|
||||||
>
|
<Right />
|
||||||
<centerbox class="window-box">
|
</centerbox>
|
||||||
<Left $type="start" />
|
})
|
||||||
<Center $type="center" />
|
|
||||||
<Right $type="end" />
|
|
||||||
</centerbox>
|
|
||||||
</window>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,42 @@
|
||||||
import app from "ags/gtk4/app";
|
import app from "ags/gtk4/app"
|
||||||
import style from "./style.scss";
|
import style from "./style.scss"
|
||||||
import Bar from "./Bar";
|
import Bar from "./Bar"
|
||||||
import Hyprland from "gi://AstalHyprland";
|
import Hyprland from "gi://AstalHyprland";
|
||||||
import NotificationPopups from "./notifications/NotificationPopups";
|
import NotificationPopups from "./notifications/NotificationPopups"
|
||||||
|
import Gtk from "gi://Gtk?version=4.0";
|
||||||
|
import { Gdk } from "ags/gtk4";
|
||||||
|
|
||||||
const hyprland = Hyprland.get_default();
|
const hyprland = Hyprland.get_default();
|
||||||
|
|
||||||
function find_main_monitor(): Hyprland.Monitor {
|
function find_main_monitor(): Hyprland.Monitor {
|
||||||
let monitors = hyprland.get_monitors();
|
let monitors = hyprland.get_monitors()
|
||||||
for (let j = 0; j < monitors.length; j++) {
|
for (let j = 0; j < monitors.length; j++) {
|
||||||
for (const monitor of ["eDP", "DP", "HDMI-A"]) {
|
for (const monitor of ["eDP", "DP", "HDMI-A"]) {
|
||||||
for (let i = 0; i < monitors.length; i++) {
|
for (let i = 0; i < monitors.length; i++) {
|
||||||
console.log(
|
console.log("Checking monitor:", monitors[i].get_name(), "against", monitor + "-" + j)
|
||||||
"Checking monitor:",
|
|
||||||
monitors[i].get_name(),
|
|
||||||
"against",
|
|
||||||
monitor + "-" + j,
|
|
||||||
);
|
|
||||||
if (monitors[i].get_name() == monitor + "-" + j) {
|
if (monitors[i].get_name() == monitor + "-" + j) {
|
||||||
return monitors[i];
|
return monitors[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return monitors[0];
|
return monitors[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
function register_windows(monitor: Hyprland.Monitor) {
|
function register_windows(monitor: Hyprland.Monitor) {
|
||||||
let gtkMonitor = app.get_monitors()[0];
|
let gtkMonitors = app.get_monitors()[0].get_display().get_monitors()
|
||||||
let scale = monitor.get_width() >= 3000 ? 1.2 : 1;
|
let gtkMonitor = gtkMonitors.get_item(0)
|
||||||
Bar(gtkMonitor, scale);
|
if (!gtkMonitor) {
|
||||||
NotificationPopups();
|
console.error("No GTK monitor found for the Hyprland monitor:", monitor.get_name());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let scale = (monitor.get_width() >= 3000) ? 1.2 : 1
|
||||||
|
Bar(gtkMonitor, scale)
|
||||||
|
NotificationPopups(gtkMonitor)
|
||||||
}
|
}
|
||||||
|
|
||||||
function switch_to_best_monitor() {
|
function switch_to_best_monitor() {
|
||||||
let mainMonitor = find_main_monitor();
|
let mainMonitor = find_main_monitor()
|
||||||
for (var wd of app.get_windows()) {
|
for (var wd of app.get_windows()) {
|
||||||
wd.destroy();
|
wd.destroy();
|
||||||
}
|
}
|
||||||
|
|
@ -42,19 +44,17 @@ function switch_to_best_monitor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
hyprland.connect("monitor-added", (_, _monitor: Hyprland.Monitor) => {
|
hyprland.connect("monitor-added", (_, _monitor: Hyprland.Monitor) => {
|
||||||
switch_to_best_monitor();
|
switch_to_best_monitor()
|
||||||
});
|
})
|
||||||
|
|
||||||
hyprland.connect("monitor-removed", () => {
|
hyprland.connect("monitor-removed", () => {
|
||||||
switch_to_best_monitor();
|
switch_to_best_monitor()
|
||||||
});
|
})
|
||||||
|
|
||||||
console.log("Trying to find the best monitor");
|
|
||||||
|
|
||||||
app.start({
|
app.start({
|
||||||
css: style,
|
css: style,
|
||||||
iconTheme: "Papirus",
|
iconTheme: "Papirus",
|
||||||
main() {
|
main() {
|
||||||
switch_to_best_monitor();
|
switch_to_best_monitor()
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
declare const SRC: string
|
declare const SRC: string
|
||||||
|
|
||||||
declare module "inline:*" {
|
declare module "inline:*" {
|
||||||
const content: string
|
const content: string
|
||||||
export default content
|
export default content
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "*.scss" {
|
declare module "*.scss" {
|
||||||
const content: string
|
const content: string
|
||||||
export default content
|
export default content
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "*.blp" {
|
declare module "*.blp" {
|
||||||
const content: string
|
const content: string
|
||||||
export default content
|
export default content
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "*.css" {
|
declare module "*.css" {
|
||||||
const content: string
|
const content: string
|
||||||
export default content
|
export default content
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,110 +1,125 @@
|
||||||
@use "sass:string";
|
@use "sass:string";
|
||||||
|
|
||||||
@function gtkalpha($c, $a) {
|
@function gtkalpha($c, $a) {
|
||||||
@return string.unquote("alpha(#{$c},#{$a})");
|
@return string.unquote("alpha(#{$c},#{$a})");
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss
|
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss
|
||||||
$fg-color: #{"@theme_bg_color"};
|
$fg-color: #{"@theme_fg_color"};
|
||||||
$bg-color: #1f2430;
|
$bg-color: #1f2430;
|
||||||
$error: red;
|
$error: red;
|
||||||
|
|
||||||
window.NotificationPopups {
|
window.NotificationPopups {
|
||||||
all: unset;
|
all: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Notification {
|
eventbox.Notification {
|
||||||
border-radius: 13px;
|
|
||||||
background-color: $bg-color;
|
|
||||||
margin: 0.5rem 1rem 0.5rem 1rem;
|
|
||||||
box-shadow: 2px 3px 8px 0 gtkalpha(black, 0.4);
|
|
||||||
border: 1pt solid gtkalpha($fg-color, 0.03);
|
|
||||||
|
|
||||||
&.critical {
|
&:first-child>box {
|
||||||
border: 1pt solid gtkalpha($error, 0.4);
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child>box {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
// eventboxes can not take margins so we style its inner box instead
|
||||||
|
>box {
|
||||||
|
min-width: 400px;
|
||||||
|
border-radius: 13px;
|
||||||
|
background-color: #1f2430;
|
||||||
|
margin: .5rem 1rem .5rem 1rem;
|
||||||
|
box-shadow: 2px 3px 8px 0 gtkalpha(black, .4);
|
||||||
|
border: 1pt solid gtkalpha($fg-color, .03);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.critical>box {
|
||||||
|
border: 1pt solid gtkalpha($error, .4);
|
||||||
|
|
||||||
|
.header {
|
||||||
|
|
||||||
|
.app-name {
|
||||||
|
color: gtkalpha($error, .8);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-icon {
|
||||||
|
color: gtkalpha($error, .6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
.app-name {
|
padding: .5rem;
|
||||||
color: gtkalpha($error, 0.8);
|
color: gtkalpha($fg-color, 0.5);
|
||||||
}
|
|
||||||
|
|
||||||
.app-icon {
|
.app-icon {
|
||||||
color: gtkalpha($error, 0.6);
|
margin: 0 .4rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
.app-name {
|
||||||
padding: 0.5rem;
|
margin-right: .3rem;
|
||||||
color: gtkalpha($fg-color, 0.5);
|
font-weight: bold;
|
||||||
|
|
||||||
.app-icon {
|
&:first-child {
|
||||||
margin: 0 0.4rem;
|
margin-left: .4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
margin: 0 .4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: .2rem;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-name {
|
separator {
|
||||||
margin-right: 0.3rem;
|
margin: 0 .4rem;
|
||||||
font-weight: bold;
|
background-color: gtkalpha($fg-color, .1);
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-left: 0.4rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.content {
|
||||||
margin: 0 0.4rem;
|
margin: 1rem;
|
||||||
|
margin-top: .5rem;
|
||||||
|
|
||||||
|
.summary {
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: $fg-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
color: gtkalpha($fg-color, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
border: 1px solid gtkalpha($fg-color, .02);
|
||||||
|
margin-right: .5rem;
|
||||||
|
border-radius: 9px;
|
||||||
|
min-width: 100px;
|
||||||
|
min-height: 100px;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
.actions {
|
||||||
padding: 0.2rem;
|
margin: 1rem;
|
||||||
min-width: 0;
|
margin-top: 0;
|
||||||
min-height: 0;
|
|
||||||
|
button {
|
||||||
|
margin: 0 .3rem;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
separator {
|
|
||||||
margin: 0 0.4rem;
|
|
||||||
background-color: gtkalpha($fg-color, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
margin: 1rem;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
|
|
||||||
.summary {
|
|
||||||
font-size: 1.2em;
|
|
||||||
color: $fg-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
color: gtkalpha($fg-color, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
border: 1px solid gtkalpha($fg-color, 0.02);
|
|
||||||
margin-right: 0.5rem;
|
|
||||||
border-radius: 9px;
|
|
||||||
min-width: 100px;
|
|
||||||
min-height: 100px;
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.actions {
|
|
||||||
margin: 1rem;
|
|
||||||
margin-top: 0;
|
|
||||||
|
|
||||||
button {
|
|
||||||
margin: 0 0.3rem;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,126 +1,107 @@
|
||||||
import { Gtk, Gdk } from "ags/gtk4";
|
import { Gtk, Astal } from "ags/gtk4"
|
||||||
import Adw from "gi://Adw";
|
import { EventBox } from "ags"
|
||||||
import GLib from "gi://GLib";
|
import Notifd from "gi://AstalNotifd"
|
||||||
import AstalNotifd from "gi://AstalNotifd";
|
import GLib from "gi://GLib"
|
||||||
import Pango from "gi://Pango";
|
|
||||||
import { timeout } from "ags/time";
|
|
||||||
|
|
||||||
function isIcon(icon?: string | null) {
|
const isIcon = (icon: string) =>
|
||||||
const iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default()!);
|
!!Astal.Icon.lookup_icon(icon)
|
||||||
return icon && iconTheme.has_icon(icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fileExists(path: string) {
|
const fileExists = (path: string) =>
|
||||||
return GLib.file_test(path, GLib.FileTest.EXISTS);
|
GLib.file_test(path, GLib.FileTest.EXISTS)
|
||||||
}
|
|
||||||
|
|
||||||
function time(time: number, format = "%H:%M") {
|
const time = (time: number, format = "%H:%M") => GLib.DateTime
|
||||||
return GLib.DateTime.new_from_unix_local(time).format(format)!;
|
.new_from_unix_local(time)
|
||||||
}
|
.format(format)!
|
||||||
|
|
||||||
function urgency(n: AstalNotifd.Notification) {
|
const urgency = (n: Notifd.Notification) => {
|
||||||
const { LOW, NORMAL, CRITICAL } = AstalNotifd.Urgency;
|
const { LOW, NORMAL, CRITICAL } = Notifd.Urgency
|
||||||
|
// match operator when?
|
||||||
switch (n.urgency) {
|
switch (n.urgency) {
|
||||||
case LOW:
|
case LOW: return "low"
|
||||||
return "low";
|
case CRITICAL: return "critical"
|
||||||
case CRITICAL:
|
|
||||||
return "critical";
|
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
default:
|
default: return "normal"
|
||||||
return "normal";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Notification({
|
type Props = {
|
||||||
notification: n,
|
setup(self: EventBox): void
|
||||||
onHoverLost,
|
onHoverLost(self: EventBox): void
|
||||||
}: {
|
notification: Notifd.Notification
|
||||||
notification: AstalNotifd.Notification;
|
}
|
||||||
onHoverLost: () => void;
|
|
||||||
}) {
|
export default function Notification(props: Props) {
|
||||||
const timer = timeout(3000, () => {
|
const { notification: n, onHoverLost, setup } = props
|
||||||
onHoverLost();
|
const { START, CENTER, END } = Gtk.Align
|
||||||
});
|
|
||||||
return (
|
return <eventbox
|
||||||
<Adw.Clamp maximumSize={400}>
|
class={`Notification ${urgency(n)}`}
|
||||||
<box
|
setup={setup}
|
||||||
widthRequest={400}
|
onHoverLost={onHoverLost}>
|
||||||
class={`Notification ${urgency(n)}`}
|
<box vertical>
|
||||||
orientation={Gtk.Orientation.VERTICAL}
|
<box class="header">
|
||||||
>
|
{(n.appIcon || n.desktopEntry) && <icon
|
||||||
<Gtk.EventControllerMotion
|
class="app-icon"
|
||||||
onEnter={() => timer.cancel()}
|
visible={Boolean(n.appIcon || n.desktopEntry)}
|
||||||
onLeave={onHoverLost}
|
icon={n.appIcon || n.desktopEntry}
|
||||||
/>
|
/>}
|
||||||
<box class="header">
|
<label
|
||||||
{(n.appIcon || isIcon(n.desktopEntry)) && (
|
class="app-name"
|
||||||
<image
|
halign={START}
|
||||||
class="app-icon"
|
truncate
|
||||||
visible={Boolean(n.appIcon || n.desktopEntry)}
|
label={n.appName || "Unknown"}
|
||||||
iconName={n.appIcon || n.desktopEntry}
|
/>
|
||||||
/>
|
<label
|
||||||
)}
|
class="time"
|
||||||
<label
|
hexpand
|
||||||
class="app-name"
|
halign={END}
|
||||||
halign={Gtk.Align.START}
|
label={time(n.time)}
|
||||||
ellipsize={Pango.EllipsizeMode.END}
|
/>
|
||||||
label={n.appName || "Unknown"}
|
<button onClicked={() => n.dismiss()}>
|
||||||
/>
|
<icon icon="window-close-symbolic" />
|
||||||
<label
|
</button>
|
||||||
class="time"
|
</box>
|
||||||
hexpand
|
<Gtk.Separator visible />
|
||||||
halign={Gtk.Align.END}
|
<box class="content">
|
||||||
label={time(n.time)}
|
{n.image && fileExists(n.image) && <box
|
||||||
/>
|
valign={START}
|
||||||
<button onClicked={() => n.dismiss()}>
|
class="image"
|
||||||
<image iconName="window-close-symbolic" />
|
css={`background-image: url('${n.image}')`}
|
||||||
</button>
|
/>}
|
||||||
</box>
|
{n.image && isIcon(n.image) && <box
|
||||||
<Gtk.Separator visible />
|
expand={false}
|
||||||
<box class="content">
|
valign={START}
|
||||||
{n.image && fileExists(n.image) && (
|
class="icon-image">
|
||||||
<image valign={Gtk.Align.START} class="image" file={n.image} />
|
<icon icon={n.image} expand halign={CENTER} valign={CENTER} />
|
||||||
)}
|
</box>}
|
||||||
{n.image && isIcon(n.image) && (
|
<box vertical>
|
||||||
<box valign={Gtk.Align.START} class="icon-image">
|
<label
|
||||||
<image
|
class="summary"
|
||||||
iconName={n.image}
|
halign={START}
|
||||||
halign={Gtk.Align.CENTER}
|
xalign={0}
|
||||||
valign={Gtk.Align.CENTER}
|
label={n.summary}
|
||||||
/>
|
truncate
|
||||||
</box>
|
/>
|
||||||
)}
|
{n.body && <label
|
||||||
<box orientation={Gtk.Orientation.VERTICAL}>
|
class="body"
|
||||||
<label
|
wrap
|
||||||
class="summary"
|
useMarkup
|
||||||
halign={Gtk.Align.START}
|
halign={START}
|
||||||
xalign={0}
|
xalign={0}
|
||||||
label={n.summary}
|
justifyFill
|
||||||
ellipsize={Pango.EllipsizeMode.END}
|
label={n.body}
|
||||||
/>
|
/>}
|
||||||
{n.body && (
|
</box>
|
||||||
<label
|
</box>
|
||||||
class="body"
|
{n.get_actions().length > 0 && <box class="actions">
|
||||||
wrap
|
{n.get_actions().map(({ label, id }) => (
|
||||||
useMarkup
|
<button
|
||||||
halign={Gtk.Align.START}
|
hexpand
|
||||||
xalign={0}
|
onClicked={() => n.invoke(id)}>
|
||||||
justify={Gtk.Justification.FILL}
|
<label label={label} halign={CENTER} hexpand />
|
||||||
label={n.body}
|
</button>
|
||||||
/>
|
))}
|
||||||
)}
|
</box>}
|
||||||
</box>
|
</box>
|
||||||
</box>
|
</eventbox>
|
||||||
{n.actions.length > 0 && (
|
|
||||||
<box class="actions">
|
|
||||||
{n.actions.map(({ label, id }) => (
|
|
||||||
<button hexpand onClicked={() => n.invoke(id)}>
|
|
||||||
<label label={label} halign={Gtk.Align.CENTER} hexpand />
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</box>
|
|
||||||
)}
|
|
||||||
</box>
|
|
||||||
</Adw.Clamp>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,107 @@
|
||||||
import app from "ags/gtk4/app";
|
import { Astal, Gtk, Gdk } from "ags/gtk4"
|
||||||
import { Astal, Gtk } from "ags/gtk4";
|
import Notifd from "gi://AstalNotifd"
|
||||||
import AstalNotifd from "gi://AstalNotifd";
|
import Notification from "./Notification"
|
||||||
import Notification from "./Notification";
|
import { type Subscribable } from "astal/binding"
|
||||||
import { createBinding, For, createState, onCleanup } from "ags";
|
import { timeout } from "ags/time"
|
||||||
|
import { createBinding, createState } from "ags"
|
||||||
|
import GLib from "gi://GLib"
|
||||||
|
|
||||||
export default function NotificationPopups() {
|
// see comment below in constructor
|
||||||
const monitors = createBinding(app, "monitors");
|
const TIMEOUT_DELAY = 5000
|
||||||
|
|
||||||
const notifd = AstalNotifd.get_default();
|
// The purpose if this class is to replace Variable<Array<Widget>>
|
||||||
|
// with a Map<number, Widget> type in order to track notification widgets
|
||||||
|
// by their id, while making it conviniently bindable as an array
|
||||||
|
class NotifiationMap implements Subscribable {
|
||||||
|
// the underlying map to keep track of id widget pairs
|
||||||
|
private map: Map<number, Gtk.Widget> = new Map()
|
||||||
|
|
||||||
const [notifications, setNotifications] = createState(
|
// it makes sense to use a Variable under the hood and use its
|
||||||
new Array<AstalNotifd.Notification>(),
|
// reactivity implementation instead of keeping track of subscribers ourselves
|
||||||
);
|
private var: Array<Gtk.Widget> = createState([])
|
||||||
|
|
||||||
const notifiedHandler = notifd.connect("notified", (_, id, replaced) => {
|
// notify subscribers to rerender when state changes
|
||||||
const notification = notifd.get_notification(id);
|
private notifiy() {
|
||||||
|
this.var.set([...this.map.values()].reverse())
|
||||||
|
}
|
||||||
|
|
||||||
if (replaced && notifications.get().some((n) => n.id === id)) {
|
private constructor() {
|
||||||
setNotifications((ns) => ns.map((n) => (n.id === id ? notification : n)));
|
const notifd = Notifd.get_default()
|
||||||
} else {
|
|
||||||
setNotifications((ns) => [notification, ...ns]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const resolvedHandler = notifd.connect("resolved", (_, id) => {
|
/**
|
||||||
setNotifications((ns) => ns.filter((n) => n.id !== id));
|
* uncomment this if you want to
|
||||||
});
|
* ignore timeout by senders and enforce our own timeout
|
||||||
|
* note that if the notification has any actions
|
||||||
|
* they might not work, since the sender already treats them as resolved
|
||||||
|
*/
|
||||||
|
// notifd.ignoreTimeout = true
|
||||||
|
|
||||||
// technically, we don't need to cleanup because in this example this is a root component
|
notifd.connect("notified", (_, id) => {
|
||||||
// and this cleanup function is only called when the program exits, but exiting will cleanup either way
|
this.set(id, Notification({
|
||||||
// but it's here to remind you that you should not forget to cleanup signal connections
|
notification: notifd.get_notification(id)!,
|
||||||
onCleanup(() => {
|
|
||||||
notifd.disconnect(notifiedHandler);
|
|
||||||
notifd.disconnect(resolvedHandler);
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
// once hovering over the notification is done
|
||||||
<For each={monitors} cleanup={(win) => (win as Gtk.Window).destroy()}>
|
// destroy the widget without calling notification.dismiss()
|
||||||
{(monitor) => (
|
// so that it acts as a "popup" and we can still display it
|
||||||
<window
|
// in a notification center like widget
|
||||||
class="NotificationPopups"
|
// but clicking on the close button will close it
|
||||||
gdkmonitor={monitor}
|
onHoverLost: () => this.delete(id),
|
||||||
visible={notifications((ns) => ns.length > 0)}
|
|
||||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT}
|
// notifd by default does not close notifications
|
||||||
>
|
// until user input or the timeout specified by sender
|
||||||
<box orientation={Gtk.Orientation.VERTICAL}>
|
// which we set to ignore above
|
||||||
<For each={notifications}>
|
setup: () => timeout(TIMEOUT_DELAY, () => {
|
||||||
{(notification) => (
|
/**
|
||||||
<Notification
|
* uncomment this if you want to "hide" the notifications
|
||||||
notification={notification}
|
* after TIMEOUT_DELAY
|
||||||
onHoverLost={() =>
|
*/
|
||||||
setNotifications((ns) =>
|
this.delete(id)
|
||||||
ns.filter((n) => n.id !== notification.id),
|
})
|
||||||
)
|
}))
|
||||||
}
|
})
|
||||||
/>
|
|
||||||
)}
|
// notifications can be closed by the outside before
|
||||||
</For>
|
// any user input, which have to be handled too
|
||||||
</box>
|
notifd.connect("resolved", (_, id) => {
|
||||||
</window>
|
this.delete(id)
|
||||||
)}
|
})
|
||||||
</For>
|
}
|
||||||
);
|
|
||||||
|
private set(key: number, value: Gtk.Widget) {
|
||||||
|
// in case of replacecment destroy previous widget
|
||||||
|
this.map.get(key)?.destroy()
|
||||||
|
this.map.set(key, value)
|
||||||
|
this.notifiy()
|
||||||
|
}
|
||||||
|
|
||||||
|
private delete(key: number) {
|
||||||
|
this.map.get(key)?.destroy()
|
||||||
|
this.map.delete(key)
|
||||||
|
this.notifiy()
|
||||||
|
}
|
||||||
|
|
||||||
|
// needed by the Subscribable interface
|
||||||
|
get() {
|
||||||
|
return this.var.get()
|
||||||
|
}
|
||||||
|
|
||||||
|
// needed by the Subscribable interface
|
||||||
|
subscribe(callback: (list: Array<Gtk.Widget>) => void) {
|
||||||
|
return this.var.subscribe(callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function NotificationPopups(gdkmonitor: Gdk.Monitor) {
|
||||||
|
const { TOP, RIGHT } = Astal.WindowAnchor
|
||||||
|
const notifs = new NotifiationMap()
|
||||||
|
|
||||||
|
return <window
|
||||||
|
className="NotificationPopups"
|
||||||
|
gdkmonitor={gdkmonitor}
|
||||||
|
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||||
|
anchor={TOP | RIGHT}>
|
||||||
|
<box vertical>
|
||||||
|
{createBinding(notifs)}
|
||||||
|
</box>
|
||||||
|
</window>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ags": "*"
|
"ags": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ window.Bar {
|
||||||
margin-top: 0.2em;
|
margin-top: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clients box box {
|
.clients box {
|
||||||
margin-right: 0.3em;
|
margin-right: 0.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,13 +27,11 @@ window.Bar {
|
||||||
border-radius: 0.3em;
|
border-radius: 0.3em;
|
||||||
background: #1f2430;
|
background: #1f2430;
|
||||||
}
|
}
|
||||||
|
|
||||||
.battery-item:hover {
|
.battery-item:hover {
|
||||||
background: #023269;
|
background: #023269;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item,
|
.item, .clients box {
|
||||||
.clients box box {
|
|
||||||
background: #1f2430;
|
background: #1f2430;
|
||||||
padding-left: 0.7em;
|
padding-left: 0.7em;
|
||||||
padding-right: 0.7em;
|
padding-right: 0.7em;
|
||||||
|
|
@ -51,14 +49,12 @@ window.Bar {
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background: #1f2430;
|
background: #1f2430;
|
||||||
border: none;
|
border:none;
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
border-radius: 0.3em;
|
border-radius: 0.3em;
|
||||||
font-weight: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.focused,
|
.focused, .clients box.focused {
|
||||||
.clients box.focused {
|
|
||||||
background: #023269;
|
background: #023269;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,72 +1,40 @@
|
||||||
import Apps from "gi://AstalApps";
|
import Apps from "gi://AstalApps"
|
||||||
import AstalHyprland from "gi://AstalHyprland";
|
import AstalHyprland from "gi://AstalHyprland";
|
||||||
|
|
||||||
const app_icons = new Apps.Apps().list.reduce(
|
const app_icons = new Apps.Apps().list.reduce(
|
||||||
(acc, app) => {
|
(acc, app) => {
|
||||||
// keys from AstalApps entries are typically wm_class (snake_case) or name
|
if (app.icon_name) {
|
||||||
const key = app.wm_class ?? app.name;
|
acc.classOrNames[app.wm_class ?? app.name] = app.icon_name;
|
||||||
if (key) {
|
|
||||||
acc.classOrNames[key] = app.icon_name;
|
|
||||||
}
|
|
||||||
if (app.executable) {
|
|
||||||
acc.executables[app.executable] = app.icon_name;
|
acc.executables[app.executable] = app.icon_name;
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
{ classOrNames: {} as Record<string, string>, executables: {} as Record<string, string> },
|
{ classOrNames: {}, executables: {} },
|
||||||
);
|
);
|
||||||
|
|
||||||
export function getIconName(client: AstalHyprland.Client | null | undefined) {
|
export function getIconName(client: AstalHyprland.Client) {
|
||||||
if (!client) return "";
|
if (!client) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// try a bunch of fields (snake_case and camelCase variants)
|
let icon = app_icons.classOrNames[client.class];
|
||||||
const possibleKeys = [
|
if (!icon) {
|
||||||
// common client properties (snake_case)
|
const icon_key = Object.keys(app_icons.classOrNames).find(
|
||||||
(client as any).wm_class,
|
(key) =>
|
||||||
(client as any).initial_class,
|
key.includes(client.title) ||
|
||||||
(client as any).executable,
|
key.includes(client.initialTitle) ||
|
||||||
// camelCase variants (some bindings expose these)
|
key.includes(client.initialClass) ||
|
||||||
(client as any).class,
|
key.includes(client.class),
|
||||||
(client as any).initialClass,
|
);
|
||||||
(client as any).initialTitle,
|
if (icon_key) {
|
||||||
(client as any).title,
|
icon = app_icons.classOrNames[icon_key];
|
||||||
(client as any).name,
|
app_icons.classOrNames[client.class] = icon;
|
||||||
].filter(Boolean) as string[];
|
|
||||||
|
|
||||||
// 1) direct exact match
|
|
||||||
for (const k of possibleKeys) {
|
|
||||||
const icon = app_icons.classOrNames[k] ?? app_icons.executables[k];
|
|
||||||
if (icon) {
|
|
||||||
// cache the mapping for this client's canonical class (prefer wm_class or class)
|
|
||||||
const cacheKey = (client as any).wm_class ?? (client as any).class ?? (client as any).name ?? k;
|
|
||||||
app_icons.classOrNames[cacheKey] = icon;
|
|
||||||
return icon;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) fuzzy match: see if any stored key includes any of the client strings (title, name, etc.)
|
if (!icon) {
|
||||||
const searchStrings = [
|
app_icons.classOrNames[client.class] = "";
|
||||||
(client as any).title,
|
|
||||||
(client as any).initialTitle,
|
|
||||||
(client as any).initial_class,
|
|
||||||
(client as any).initialClass,
|
|
||||||
(client as any).wm_class,
|
|
||||||
(client as any).class,
|
|
||||||
(client as any).name,
|
|
||||||
].filter(Boolean) as string[];
|
|
||||||
|
|
||||||
for (const s of searchStrings) {
|
|
||||||
const matchKey = Object.keys(app_icons.classOrNames).find((key) => key.includes(s));
|
|
||||||
if (matchKey) {
|
|
||||||
const icon = app_icons.classOrNames[matchKey];
|
|
||||||
const cacheKey = (client as any).wm_class ?? (client as any).class ?? (client as any).name ?? s;
|
|
||||||
app_icons.classOrNames[cacheKey] = icon;
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// nothing found — cache empty string so we don't repeat work
|
return icon;
|
||||||
const cacheKey = (client as any).wm_class ?? (client as any).class ?? (client as any).name ?? "";
|
|
||||||
if (cacheKey) app_icons.classOrNames[cacheKey] = "";
|
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,27 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
size = pkgs.lib.mkDefault 13;
|
size = pkgs.lib.mkDefault 15;
|
||||||
normal.family = "DejaVu Sans Mono";
|
bold = {
|
||||||
|
family = "ZedMono Nerd Font";
|
||||||
|
style = "Extended Bold";
|
||||||
|
features = "+ss05";
|
||||||
|
};
|
||||||
|
bold_italic = {
|
||||||
|
family = "ZedMono Nerd Font";
|
||||||
|
style = "Extended Bold Italic";
|
||||||
|
features = "+ss05";
|
||||||
|
};
|
||||||
|
italic = {
|
||||||
|
family = "ZedMono Nerd Font";
|
||||||
|
style = "Extended Italic";
|
||||||
|
features = "+ss05";
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
family = "ZedMono Nerd Font";
|
||||||
|
style = "Extended Light";
|
||||||
|
features = "+ss05";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
keyboard.bindings = [
|
keyboard.bindings = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -83,20 +83,20 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = {
|
||||||
# "application/json" = [ "firefox.desktop" ];
|
"application/json" = [ "firefox.desktop" ];
|
||||||
# "application/x-extension-htm" = [ "firefox.desktop" ];
|
"application/x-extension-htm" = [ "firefox.desktop" ];
|
||||||
# "application/x-extension-html" = [ "firefox.desktop" ];
|
"application/x-extension-html" = [ "firefox.desktop" ];
|
||||||
# "application/x-extension-shtml" = [ "firefox.desktop" ];
|
"application/x-extension-shtml" = [ "firefox.desktop" ];
|
||||||
# "application/x-extension-xhtml" = [ "firefox.desktop" ];
|
"application/x-extension-xhtml" = [ "firefox.desktop" ];
|
||||||
# "application/x-extension-xht" = [ "firefox.desktop" ];
|
"application/x-extension-xht" = [ "firefox.desktop" ];
|
||||||
# "application/xhtml+xml" = [ "firefox.desktop" ];
|
"application/xhtml+xml" = [ "firefox.desktop" ];
|
||||||
# "text/html" = [ "firefox.desktop" ];
|
"text/html" = [ "firefox.desktop" ];
|
||||||
# "text/xml" = [ "firefox.desktop" ];
|
"text/xml" = [ "firefox.desktop" ];
|
||||||
# "x-scheme-handler/about" = [ "firefox.desktop" ];
|
"x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||||
# "x-scheme-handler/ftp" = [ "firefox.desktop" ];
|
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
|
||||||
# "x-scheme-handler/http" = [ "firefox.desktop" ];
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||||
# "x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||||
# "x-scheme-handler/https" = [ "firefox.desktop" ];
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||||
# };
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -5,14 +5,12 @@
|
||||||
server.enable = true;
|
server.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
font = "DejaVu Sans Mono:size=13";
|
font = "Iosevka:size=14:style=Extended:fontfeatures=+ss05";
|
||||||
term = "xterm-256color";
|
term = "xterm-256color";
|
||||||
line-height = "18";
|
|
||||||
};
|
};
|
||||||
tweak = {
|
tweak = {
|
||||||
sixel = "yes";
|
sixel = "yes";
|
||||||
};
|
};
|
||||||
scrollback.lines = 100000;
|
|
||||||
colors = {
|
colors = {
|
||||||
background = "000010";
|
background = "000010";
|
||||||
foreground = "F8F8F2";
|
foreground = "F8F8F2";
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,18 @@
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
userName = "Thomas Avé";
|
||||||
|
userEmail = "email@thomasave.be";
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
aliases = {
|
aliases = {
|
||||||
s = "status";
|
s = "status";
|
||||||
a = "add";
|
a = "add";
|
||||||
};
|
};
|
||||||
settings = {
|
ignores = [
|
||||||
user = {
|
"*.direnv/"
|
||||||
name = "Thomas Avé";
|
".dmypy.json"
|
||||||
email = "email@thomasave.be";
|
];
|
||||||
};
|
extraConfig = {
|
||||||
credentials.helper = "store";
|
credentials.helper = "store";
|
||||||
pull.rebase = false;
|
pull.rebase = false;
|
||||||
push.autoSetupRemove = true;
|
push.autoSetupRemove = true;
|
||||||
|
|
@ -26,17 +28,12 @@
|
||||||
};
|
};
|
||||||
rerere.enabled = true;
|
rerere.enabled = true;
|
||||||
};
|
};
|
||||||
ignores = [
|
|
||||||
"*.direnv/"
|
|
||||||
".dmypy.json"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
os = {
|
os = {
|
||||||
editPreset = "nvim";
|
editPreset = "nvim";
|
||||||
autoStageResolvedConflicts = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
(pkgs.appimageTools.wrapType2 {
|
|
||||||
pname = "Helium";
|
|
||||||
version = "0.4.7.1";
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/imputnet/helium-linux/releases/download/0.5.8.1/helium-0.5.8.1-x86_64.AppImage";
|
|
||||||
sha256 = "sha256-d8kwLEU6qgEgp7nlEwdfRevB1JrbEKHRe8+GhGpGUig=";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
xdg.desktopEntries = {
|
|
||||||
helium = {
|
|
||||||
name = "Helium";
|
|
||||||
genericName = "Web Browser";
|
|
||||||
comment = "Access the Internet";
|
|
||||||
exec = "Helium --enable-features=TouchpadOverscrollHistoryNavigation %U";
|
|
||||||
startupNotify = true;
|
|
||||||
terminal = false;
|
|
||||||
icon = "chromium";
|
|
||||||
type = "Application";
|
|
||||||
categories = [ "Network" "WebBrowser" ];
|
|
||||||
mimeType = [
|
|
||||||
"x-scheme-handler/webcal"
|
|
||||||
"application/pdf"
|
|
||||||
"application/rdf+xml"
|
|
||||||
"application/rss+xml"
|
|
||||||
"application/xhtml+xml"
|
|
||||||
"application/xhtml_xml"
|
|
||||||
"application/xml"
|
|
||||||
"image/gif"
|
|
||||||
"image/jpeg"
|
|
||||||
"image/png"
|
|
||||||
"image/webp"
|
|
||||||
"text/html"
|
|
||||||
"text/xml"
|
|
||||||
"x-scheme-handler/http"
|
|
||||||
"x-scheme-handler/https"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.mimeApps.defaultApplications = {
|
|
||||||
"application/json" = [ "helium.desktop" ];
|
|
||||||
"application/x-extension-htm" = [ "helium.desktop" ];
|
|
||||||
"application/x-extension-html" = [ "helium.desktop" ];
|
|
||||||
"application/x-extension-shtml" = [ "helium.desktop" ];
|
|
||||||
"application/x-extension-xhtml" = [ "helium.desktop" ];
|
|
||||||
"application/x-extension-xht" = [ "helium.desktop" ];
|
|
||||||
"application/xhtml+xml" = [ "helium.desktop" ];
|
|
||||||
"text/html" = [ "helium.desktop" ];
|
|
||||||
"text/xml" = [ "helium.desktop" ];
|
|
||||||
"x-scheme-handler/about" = [ "helium.desktop" ];
|
|
||||||
"x-scheme-handler/ftp" = [ "helium.desktop" ];
|
|
||||||
"x-scheme-handler/http" = [ "helium.desktop" ];
|
|
||||||
"x-scheme-handler/unknown" = [ "helium.desktop" ];
|
|
||||||
"x-scheme-handler/https" = [ "helium.desktop" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
{ pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
let
|
let
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||||
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
|
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
|
||||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||||
terminal-name = "foot";
|
terminal-name = ".kitty-wrapped";
|
||||||
terminal = "${pkgs.foot}/bin/footclient";
|
terminal = "${pkgs.kitty}/bin/kitty -1";
|
||||||
rofi = "${pkgs.rofi}/bin/rofi";
|
rofi = "${pkgs.rofi-wayland}/bin/rofi";
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
rofi-ykman = pkgs.writeShellScriptBin "rofi-ykman" ''
|
rofi-ykman = pkgs.writeShellScriptBin "rofi-ykman" ''
|
||||||
accounts=$(${pkgs.yubikey-manager}/bin/ykman oath accounts list)
|
accounts=$(${pkgs.yubikey-manager}/bin/ykman oath accounts list)
|
||||||
|
|
@ -21,12 +21,12 @@ let
|
||||||
# workspace_command_prefix = "split-";
|
# workspace_command_prefix = "split-";
|
||||||
# hyprland_plugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ];
|
# hyprland_plugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ];
|
||||||
|
|
||||||
# workspace_command_prefix = "split:";
|
workspace_command_prefix = "split:";
|
||||||
# hyprland_plugins = [ pkgs.hyprlandPlugins.hyprsplit ];
|
hyprland_plugins = [ pkgs.hyprlandPlugins.hyprsplit ];
|
||||||
|
|
||||||
# Disable split-monitor-workspaces
|
# Disable split-monitor-workspaces
|
||||||
workspace_command_prefix = "";
|
# workspace_command_prefix = "";
|
||||||
hyprland_plugins = [];
|
# hyprland_plugins = [];
|
||||||
|
|
||||||
launch_terminal = pkgs.writeShellScriptBin "launch_terminal" ''
|
launch_terminal = pkgs.writeShellScriptBin "launch_terminal" ''
|
||||||
function find_leaf_pid(){
|
function find_leaf_pid(){
|
||||||
|
|
@ -134,7 +134,6 @@ in {
|
||||||
"$altMod" = pkgs.lib.mkDefault "ALT_L";
|
"$altMod" = pkgs.lib.mkDefault "ALT_L";
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"hyprpaper"
|
"hyprpaper"
|
||||||
"foot --server"
|
|
||||||
"hyprctl dispatch exec ags run"
|
"hyprctl dispatch exec ags run"
|
||||||
"${wl-paste} --type text --watch cliphist store"
|
"${wl-paste} --type text --watch cliphist store"
|
||||||
"${wl-paste} --type image --watch cliphist store"
|
"${wl-paste} --type image --watch cliphist store"
|
||||||
|
|
@ -146,16 +145,13 @@ in {
|
||||||
"WLR_RENDERER_ALLOW_SOFTWARE,1"
|
"WLR_RENDERER_ALLOW_SOFTWARE,1"
|
||||||
];
|
];
|
||||||
debug = { disable_logs = false; };
|
debug = { disable_logs = false; };
|
||||||
windowrule = [
|
windowrulev2 = [
|
||||||
"float, title:^(rofi)(.*)$"
|
"float, title:^(rofi)(.*)$"
|
||||||
"center, title:^(rofi)(.*)$"
|
"center, title:^(rofi)(.*)$"
|
||||||
"noborder, title:^(rofi)(.*)$"
|
"noborder, title:^(rofi)(.*)$"
|
||||||
"stayfocused, title:^()$,class:^(steam)$"
|
"stayfocused, title:^()$,class:^(steam)$"
|
||||||
"minsize 1 1, title:^()$,class:^(steam)$"
|
"minsize 1 1, title:^()$,class:^(steam)$"
|
||||||
"stayfocused, title:^()$,class:^(steam)$"
|
"stayfocused, title:^()$,class:^(steam)$"
|
||||||
"workspace 8, class:thunderbird"
|
|
||||||
"workspace 9, class:spotify"
|
|
||||||
"workspace 10, class:Slack"
|
|
||||||
"bordersize 0, floating:0, onworkspace:w[tv1]"
|
"bordersize 0, floating:0, onworkspace:w[tv1]"
|
||||||
"rounding 0, floating:0, onworkspace:w[tv1]"
|
"rounding 0, floating:0, onworkspace:w[tv1]"
|
||||||
"bordersize 0, floating:0, onworkspace:f[1]"
|
"bordersize 0, floating:0, onworkspace:f[1]"
|
||||||
|
|
@ -202,10 +198,8 @@ in {
|
||||||
preserve_split = "yes";
|
preserve_split = "yes";
|
||||||
force_split = 2;
|
force_split = 2;
|
||||||
};
|
};
|
||||||
gesture = [
|
|
||||||
"3, horizontal, workspace"
|
|
||||||
];
|
|
||||||
gestures = {
|
gestures = {
|
||||||
|
workspace_swipe = "on";
|
||||||
workspace_swipe_invert = false;
|
workspace_swipe_invert = false;
|
||||||
};
|
};
|
||||||
device = [
|
device = [
|
||||||
|
|
@ -241,7 +235,7 @@ in {
|
||||||
"$mainMod, Q, killactive,"
|
"$mainMod, Q, killactive,"
|
||||||
"$mainMod, A, exec, ${nautilus}"
|
"$mainMod, A, exec, ${nautilus}"
|
||||||
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"
|
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"
|
||||||
"$mainMod, B, exec, Helium"
|
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
|
||||||
"$mainMod, M, fullscreen, 1"
|
"$mainMod, M, fullscreen, 1"
|
||||||
"$mainMod, F11, fullscreen"
|
"$mainMod, F11, fullscreen"
|
||||||
"$mainMod, F, togglefloating,"
|
"$mainMod, F, togglefloating,"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
shellIntegration.enableZshIntegration = true;
|
shellIntegration.enableZshIntegration = true;
|
||||||
font = {
|
font = {
|
||||||
name = "'ZedMono Nerd Font' style='Extended Light' features=+ss05";
|
name = "'ZedMono Nerd Font' style='Extended Light' features=+ss05";
|
||||||
size = lib.mkDefault 13;
|
size = lib.mkDefault 14;
|
||||||
|
|
||||||
};
|
};
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"kitty_mod+h" = "kitty_scrollback_nvim";
|
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||||
|
|
@ -14,11 +15,8 @@
|
||||||
"kitty_mod+enter" = "nop";
|
"kitty_mod+enter" = "nop";
|
||||||
"kitty_mod+equal" = "change_font_size current +1.0";
|
"kitty_mod+equal" = "change_font_size current +1.0";
|
||||||
"kitty_mod+minus" = "change_font_size current -1.0";
|
"kitty_mod+minus" = "change_font_size current -1.0";
|
||||||
"ctrl+shift+c" = "copy_to_clipboard";
|
|
||||||
"ctrl+shift+v" = "paste_from_clipboard";
|
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
kitty_mod= "ctrl+alt";
|
|
||||||
cursor_shape = "block";
|
cursor_shape = "block";
|
||||||
cursor_beam_thickness = 1;
|
cursor_beam_thickness = 1;
|
||||||
scrollback_lines = 100000;
|
scrollback_lines = 100000;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ video-sync=display-resample
|
||||||
interpolation
|
interpolation
|
||||||
tscale=oversample
|
tscale=oversample
|
||||||
vo=gpu-next
|
vo=gpu-next
|
||||||
hwdec=auto
|
gpu-api=opengl
|
||||||
force-window=yes
|
force-window=yes
|
||||||
keep-open=yes
|
keep-open=yes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
bash-language-server
|
bash-language-server
|
||||||
docker-compose-language-service
|
docker-compose-language-service
|
||||||
dockerfile-language-server
|
dockerfile-language-server-nodejs
|
||||||
lua-language-server
|
lua-language-server
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
gopls
|
gopls
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,8 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filetypes = {
|
filetypes = {
|
||||||
["*"] = true, -- Enable for all filetypes by default
|
markdown = true,
|
||||||
["dap-repl"] = false,
|
tex = true,
|
||||||
["dapui_scopes"] = false,
|
|
||||||
["dapui_stacks"] = false,
|
|
||||||
["dapui_watches"] = false,
|
|
||||||
["dapui_breakpoints"] = false,
|
|
||||||
["TelescopePrompt"] = false,
|
|
||||||
["Trouble"] = false,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require('blink.cmp').setup(opts)
|
require('blink.cmp').setup(opts)
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
local filetypes = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex",
|
local filetypes = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex",
|
||||||
"quarto", "rmd", "context", "html", "xhtml", "typst", "mail" }
|
"quarto", "rmd", "context", "html", "xhtml", "typst", "mail" }
|
||||||
local lsp_opts = {
|
local lsp_opts = {
|
||||||
|
|
@ -195,8 +196,7 @@ return {
|
||||||
}
|
}
|
||||||
for server, config in pairs(lsp_opts.servers) do
|
for server, config in pairs(lsp_opts.servers) do
|
||||||
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
|
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
|
||||||
vim.lsp.enable(server)
|
lspconfig[server].setup(config)
|
||||||
vim.lsp.config(server, config)
|
|
||||||
end
|
end
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false
|
virtual_text = false
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.rofi;
|
package = pkgs.rofi-wayland;
|
||||||
font = "SF Pro Rounded 13";
|
font = "SF Pro Rounded 13";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
show-icons = true;
|
show-icons = true;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ echo -e '\n\n\n'
|
||||||
echo "Running git.thomasave.be Backups"
|
echo "Running git.thomasave.be Backups"
|
||||||
borg create -s --progress \
|
borg create -s --progress \
|
||||||
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/sessions \
|
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/sessions \
|
||||||
--exclude /home/server/Containers/git.thomasave.be/runner-data/.cache \
|
|
||||||
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/jwt \
|
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/jwt \
|
||||||
--exclude /home/server/Containers/git.thomasave.be/gitea/ssh \
|
--exclude /home/server/Containers/git.thomasave.be/gitea/ssh \
|
||||||
10.4.0.1:Storage/Thomas/Borg/Containers/git.thomasave.be::'{hostname}-{now}' \
|
10.4.0.1:Storage/Thomas/Borg/Containers/git.thomasave.be::'{hostname}-{now}' \
|
||||||
|
|
@ -93,7 +92,6 @@ borg create -s --progress \
|
||||||
echo -e '\n\n\n'
|
echo -e '\n\n\n'
|
||||||
echo "Running Workspace Backups"
|
echo "Running Workspace Backups"
|
||||||
borg create -s --progress \
|
borg create -s --progress \
|
||||||
--exclude /home/server/Workspace/TrackBox/Resources \
|
|
||||||
10.4.0.1:Storage/Thomas/Borg/Workspace::'{hostname}-{now}' \
|
10.4.0.1:Storage/Thomas/Borg/Workspace::'{hostname}-{now}' \
|
||||||
/home/server/Workspace/
|
/home/server/Workspace/
|
||||||
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly -1 --save-space 10.4.0.1:Storage/Thomas/Borg/Workspace
|
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly -1 --save-space 10.4.0.1:Storage/Thomas/Borg/Workspace
|
||||||
|
|
@ -135,6 +133,23 @@ borg create -s --progress \
|
||||||
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly -1 --save-space 10.4.0.1:Storage/Thomas/Borg/Thomas
|
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly -1 --save-space 10.4.0.1:Storage/Thomas/Borg/Thomas
|
||||||
borg compact 10.4.0.1:Storage/Thomas/Borg/Thomas
|
borg compact 10.4.0.1:Storage/Thomas/Borg/Thomas
|
||||||
|
|
||||||
|
|
||||||
|
echo -e '\n\n\n'
|
||||||
|
echo "Running Niels Backups"
|
||||||
|
borg create -s --progress \
|
||||||
|
--exclude /home/server/Storage/Niels/Backups \
|
||||||
|
10.4.0.1:Storage/Thomas/Borg/Niels::'{now:%Y-%m-%d}' \
|
||||||
|
/home/server/Storage/Niels/
|
||||||
|
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --save-space 10.4.0.1:Storage/Thomas/Borg/Niels
|
||||||
|
borg compact 10.4.0.1:Storage/Thomas/Borg/Niels
|
||||||
|
|
||||||
|
|
||||||
|
# echo -e '\n\n\n'
|
||||||
|
# echo "Running Experiment Backups"
|
||||||
|
# borg create -s --progress \
|
||||||
|
# 10.4.0.1:Storage/Thomas/Borg/Containers/exp.thomasave.be::'{hostname}-{now}' \
|
||||||
|
# /home/server/Workspace/Experiments/Backend/data/
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# Perpare Cloud Backup #
|
# Perpare Cloud Backup #
|
||||||
##########################################
|
##########################################
|
||||||
|
|
@ -172,7 +187,7 @@ ssh vault /home/server/Storage/Thomas/Scripts/Mount/borg_lock.sh
|
||||||
# Backups to Oracle Cloud #
|
# Backups to Oracle Cloud #
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
echo "Running Oracle Cloud Backup, containing Vaultwarden, robbertave.com, git.thomasave.be, Boaty, Stats, and Caddy."
|
echo "Running Oracle Cloud Backup, containing Vaultwarden, robbertave.com, git.thomasave.be, Boaty, Stats, Caddy, and Niels."
|
||||||
|
|
||||||
borg create -s --progress \
|
borg create -s --progress \
|
||||||
--exclude /home/server/Containers/pw.thomasave.be/data/icon_cache \
|
--exclude /home/server/Containers/pw.thomasave.be/data/icon_cache \
|
||||||
|
|
@ -182,6 +197,7 @@ borg create -s --progress \
|
||||||
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/jwt \
|
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/jwt \
|
||||||
--exclude /home/server/Containers/stats.thomasave.be/logs \
|
--exclude /home/server/Containers/stats.thomasave.be/logs \
|
||||||
--exclude /home/server/Containers/Caddy/Data\
|
--exclude /home/server/Containers/Caddy/Data\
|
||||||
|
--exclude /home/server/Storage/Niels/Backups \
|
||||||
ubuntu@10.0.0.6:~/Backups/Borg::'{hostname}-{now}' \
|
ubuntu@10.0.0.6:~/Backups/Borg::'{hostname}-{now}' \
|
||||||
/home/server/Containers/pw.thomasave.be\
|
/home/server/Containers/pw.thomasave.be\
|
||||||
/home/server/Containers/robbertave.com\
|
/home/server/Containers/robbertave.com\
|
||||||
|
|
@ -191,3 +207,4 @@ borg create -s --progress \
|
||||||
/home/server/Containers/Caddy \
|
/home/server/Containers/Caddy \
|
||||||
/home/server/Containers/cal.thomasave.be\
|
/home/server/Containers/cal.thomasave.be\
|
||||||
/home/server/Containers/stats.thomasave.be \
|
/home/server/Containers/stats.thomasave.be \
|
||||||
|
/home/server/Storage/Niels \
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
|
||||||
includes = [ "gpulab_hosts_config" ];
|
includes = [ "gpulab_hosts_config" ];
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
"*" = {
|
"*" = {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
../lf
|
../lf
|
||||||
../tmux
|
../tmux
|
||||||
../yazi
|
../yazi
|
||||||
../zellij
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
|
|
@ -18,14 +17,16 @@
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
htop
|
htop
|
||||||
ghostscript
|
|
||||||
waypipe
|
waypipe
|
||||||
inputs.worktimer.packages.${pkgs.system}.default
|
inputs.worktimer.packages.${pkgs.system}.default
|
||||||
usbutils
|
usbutils
|
||||||
gocryptfs
|
|
||||||
sshfs
|
|
||||||
ncdu
|
|
||||||
];
|
];
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
clean.enable = true;
|
||||||
|
flake = "/home/user/.dotfiles";
|
||||||
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||||
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
|
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
../alacritty
|
../alacritty
|
||||||
../foot
|
../foot
|
||||||
../kitty
|
../kitty
|
||||||
|
../ghostty
|
||||||
../firefox
|
../firefox
|
||||||
../helium
|
|
||||||
../ssh
|
../ssh
|
||||||
../mpv
|
../mpv
|
||||||
];
|
];
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
spotify
|
spotify
|
||||||
slack
|
slack
|
||||||
eid-mw
|
eid-mw
|
||||||
onlyoffice-desktopeditors
|
onlyoffice-bin
|
||||||
libreoffice
|
libreoffice
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
signal-desktop
|
signal-desktop
|
||||||
|
|
@ -35,6 +35,8 @@
|
||||||
zip
|
zip
|
||||||
heroic
|
heroic
|
||||||
cmake
|
cmake
|
||||||
|
jellyfin-media-player
|
||||||
|
chromium
|
||||||
nmap
|
nmap
|
||||||
arp-scan
|
arp-scan
|
||||||
virt-manager
|
virt-manager
|
||||||
|
|
@ -45,7 +47,6 @@
|
||||||
yubioath-flutter
|
yubioath-flutter
|
||||||
obsidian
|
obsidian
|
||||||
nautilus
|
nautilus
|
||||||
appimage-run
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
|
|
@ -87,7 +88,6 @@
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
||||||
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
||||||
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
|
||||||
"message/rfc822" = "userapp-Thunderbird-7GETV2.desktop";
|
"message/rfc822" = "userapp-Thunderbird-7GETV2.desktop";
|
||||||
"application/pdf" = "org.gnome.Evince.desktop";
|
"application/pdf" = "org.gnome.Evince.desktop";
|
||||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||||
|
|
@ -100,11 +100,8 @@
|
||||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
||||||
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
||||||
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
|
||||||
"image/jpeg" = "org.gnome.Loupe.desktop";
|
"image/jpeg" = "org.gnome.Loupe.desktop";
|
||||||
"image/png" = "org.gnome.Loupe.desktop";
|
"image/png" = "org.gnome.Loupe.desktop";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,13 @@
|
||||||
{...}:
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
settings = {
|
settings = {
|
||||||
mgr = {
|
mgr = {
|
||||||
sort_by = "natural";
|
sort_by = "natural";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
keymap = {
|
|
||||||
mgr.normal = [
|
|
||||||
{ on = [ "j" ]; run = "down"; desc = "Move cursor down"; }
|
|
||||||
{ on = [ "k" ]; run = "up"; desc = "Move cursor up"; }
|
|
||||||
{ on = [ "h" ]; run = "back"; desc = "Go back to parent directory"; }
|
|
||||||
{ on = [ "l" ]; run = "forward"; desc = "Enter directory / open file"; }
|
|
||||||
{ on = [ "q" ]; run = "quit"; desc = "Quit yazi"; }
|
|
||||||
{ on = [ " " ]; run = "select"; desc = "Select the current file"; }
|
|
||||||
{ on = [ "v" ]; run = "visual_mode"; desc = "Enter visual mode"; }
|
|
||||||
{ on = [ "y" ]; run = "yank"; desc = "Yank selection"; }
|
|
||||||
{ on = [ "p" ]; run = "paste"; desc = "Paste files"; }
|
|
||||||
{ on = [ "d" ]; run = "remove --permanently"; desc = "Delete permanently"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
programs.zellij = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
home.file."${config.xdg.configHome}/zellij" = {
|
|
||||||
source = ./files;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,451 +0,0 @@
|
||||||
ui {
|
|
||||||
pane_frames {
|
|
||||||
hide_session_name true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
keybinds clear-defaults=true {
|
|
||||||
locked {
|
|
||||||
bind "Ctrl a" { SwitchToMode "normal"; }
|
|
||||||
bind "Ctrl H" { MoveFocus "left"; }
|
|
||||||
bind "Ctrl J" { MoveFocus "down"; }
|
|
||||||
bind "Ctrl K" { MoveFocus "up"; }
|
|
||||||
bind "Ctrl L" { MoveFocus "right"; }
|
|
||||||
}
|
|
||||||
normal {
|
|
||||||
bind "-" { NewPane "down"; SwitchToMode "locked"; }
|
|
||||||
bind "|" { NewPane "right"; SwitchToMode "locked"; }
|
|
||||||
bind "c" { NewTab; SwitchToMode "locked"; }
|
|
||||||
bind "d" { Detach; }
|
|
||||||
bind "n" { GoToNextTab; SwitchToMode "locked"; }
|
|
||||||
}
|
|
||||||
pane {
|
|
||||||
bind "left" { MoveFocus "left"; }
|
|
||||||
bind "down" { MoveFocus "down"; }
|
|
||||||
bind "up" { MoveFocus "up"; }
|
|
||||||
bind "right" { MoveFocus "right"; }
|
|
||||||
bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
|
|
||||||
bind "d" { NewPane "down"; SwitchToMode "locked"; }
|
|
||||||
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "locked"; }
|
|
||||||
bind "f" { ToggleFocusFullscreen; SwitchToMode "locked"; }
|
|
||||||
bind "h" { MoveFocus "left"; }
|
|
||||||
bind "i" { TogglePanePinned; SwitchToMode "locked"; }
|
|
||||||
bind "j" { MoveFocus "down"; }
|
|
||||||
bind "k" { MoveFocus "up"; }
|
|
||||||
bind "l" { MoveFocus "right"; }
|
|
||||||
bind "n" { NewPane; SwitchToMode "locked"; }
|
|
||||||
bind "p" { SwitchToMode "normal"; }
|
|
||||||
bind "r" { NewPane "right"; SwitchToMode "locked"; }
|
|
||||||
bind "w" { ToggleFloatingPanes; SwitchToMode "locked"; }
|
|
||||||
bind "x" { CloseFocus; SwitchToMode "locked"; }
|
|
||||||
bind "z" { TogglePaneFrames; SwitchToMode "locked"; }
|
|
||||||
bind "tab" { SwitchFocus; }
|
|
||||||
}
|
|
||||||
tab {
|
|
||||||
bind "left" { GoToPreviousTab; }
|
|
||||||
bind "down" { GoToNextTab; }
|
|
||||||
bind "up" { GoToPreviousTab; }
|
|
||||||
bind "right" { GoToNextTab; }
|
|
||||||
bind "1" { GoToTab 1; SwitchToMode "locked"; }
|
|
||||||
bind "2" { GoToTab 2; SwitchToMode "locked"; }
|
|
||||||
bind "3" { GoToTab 3; SwitchToMode "locked"; }
|
|
||||||
bind "4" { GoToTab 4; SwitchToMode "locked"; }
|
|
||||||
bind "5" { GoToTab 5; SwitchToMode "locked"; }
|
|
||||||
bind "6" { GoToTab 6; SwitchToMode "locked"; }
|
|
||||||
bind "7" { GoToTab 7; SwitchToMode "locked"; }
|
|
||||||
bind "8" { GoToTab 8; SwitchToMode "locked"; }
|
|
||||||
bind "9" { GoToTab 9; SwitchToMode "locked"; }
|
|
||||||
bind "[" { BreakPaneLeft; SwitchToMode "locked"; }
|
|
||||||
bind "]" { BreakPaneRight; SwitchToMode "locked"; }
|
|
||||||
bind "b" { BreakPane; SwitchToMode "locked"; }
|
|
||||||
bind "h" { GoToPreviousTab; }
|
|
||||||
bind "j" { GoToNextTab; }
|
|
||||||
bind "k" { GoToPreviousTab; }
|
|
||||||
bind "l" { GoToNextTab; }
|
|
||||||
bind "n" { NewTab; SwitchToMode "locked"; }
|
|
||||||
bind "r" { SwitchToMode "renametab"; TabNameInput 0; }
|
|
||||||
bind "s" { ToggleActiveSyncTab; SwitchToMode "locked"; }
|
|
||||||
bind "t" { SwitchToMode "normal"; }
|
|
||||||
bind "x" { CloseTab; SwitchToMode "locked"; }
|
|
||||||
bind "tab" { ToggleTab; }
|
|
||||||
}
|
|
||||||
resize {
|
|
||||||
bind "left" { Resize "Increase left"; }
|
|
||||||
bind "down" { Resize "Increase down"; }
|
|
||||||
bind "up" { Resize "Increase up"; }
|
|
||||||
bind "right" { Resize "Increase right"; }
|
|
||||||
bind "+" { Resize "Increase"; }
|
|
||||||
bind "-" { Resize "Decrease"; }
|
|
||||||
bind "=" { Resize "Increase"; }
|
|
||||||
bind "H" { Resize "Decrease left"; }
|
|
||||||
bind "J" { Resize "Decrease down"; }
|
|
||||||
bind "K" { Resize "Decrease up"; }
|
|
||||||
bind "L" { Resize "Decrease right"; }
|
|
||||||
bind "h" { Resize "Increase left"; }
|
|
||||||
bind "j" { Resize "Increase down"; }
|
|
||||||
bind "k" { Resize "Increase up"; }
|
|
||||||
bind "l" { Resize "Increase right"; }
|
|
||||||
bind "r" { SwitchToMode "normal"; }
|
|
||||||
}
|
|
||||||
move {
|
|
||||||
bind "left" { MovePane "left"; }
|
|
||||||
bind "down" { MovePane "down"; }
|
|
||||||
bind "up" { MovePane "up"; }
|
|
||||||
bind "right" { MovePane "right"; }
|
|
||||||
bind "h" { MovePane "left"; }
|
|
||||||
bind "j" { MovePane "down"; }
|
|
||||||
bind "k" { MovePane "up"; }
|
|
||||||
bind "l" { MovePane "right"; }
|
|
||||||
bind "m" { SwitchToMode "normal"; }
|
|
||||||
bind "n" { MovePane; }
|
|
||||||
bind "p" { MovePaneBackwards; }
|
|
||||||
bind "tab" { MovePane; }
|
|
||||||
}
|
|
||||||
scroll {
|
|
||||||
bind "Alt left" { MoveFocusOrTab "left"; SwitchToMode "locked"; }
|
|
||||||
bind "Alt down" { MoveFocus "down"; SwitchToMode "locked"; }
|
|
||||||
bind "Alt up" { MoveFocus "up"; SwitchToMode "locked"; }
|
|
||||||
bind "Alt right" { MoveFocusOrTab "right"; SwitchToMode "locked"; }
|
|
||||||
bind "e" { EditScrollback; SwitchToMode "locked"; }
|
|
||||||
bind "f" { SwitchToMode "entersearch"; SearchInput 0; }
|
|
||||||
bind "Alt h" { MoveFocusOrTab "left"; SwitchToMode "locked"; }
|
|
||||||
bind "Alt j" { MoveFocus "down"; SwitchToMode "locked"; }
|
|
||||||
bind "Alt k" { MoveFocus "up"; SwitchToMode "locked"; }
|
|
||||||
bind "Alt l" { MoveFocusOrTab "right"; SwitchToMode "locked"; }
|
|
||||||
bind "s" { SwitchToMode "normal"; }
|
|
||||||
}
|
|
||||||
search {
|
|
||||||
bind "c" { SearchToggleOption "CaseSensitivity"; }
|
|
||||||
bind "n" { Search "down"; }
|
|
||||||
bind "o" { SearchToggleOption "WholeWord"; }
|
|
||||||
bind "p" { Search "up"; }
|
|
||||||
bind "w" { SearchToggleOption "Wrap"; }
|
|
||||||
}
|
|
||||||
session {
|
|
||||||
bind "a" {
|
|
||||||
LaunchOrFocusPlugin "zellij:about" {
|
|
||||||
floating true
|
|
||||||
move_to_focused_tab true
|
|
||||||
}
|
|
||||||
SwitchToMode "locked"
|
|
||||||
}
|
|
||||||
bind "c" {
|
|
||||||
LaunchOrFocusPlugin "configuration" {
|
|
||||||
floating true
|
|
||||||
move_to_focused_tab true
|
|
||||||
}
|
|
||||||
SwitchToMode "locked"
|
|
||||||
}
|
|
||||||
bind "d" { Detach; }
|
|
||||||
bind "o" { SwitchToMode "normal"; }
|
|
||||||
bind "p" {
|
|
||||||
LaunchOrFocusPlugin "plugin-manager" {
|
|
||||||
floating true
|
|
||||||
move_to_focused_tab true
|
|
||||||
}
|
|
||||||
SwitchToMode "locked"
|
|
||||||
}
|
|
||||||
bind "w" {
|
|
||||||
LaunchOrFocusPlugin "session-manager" {
|
|
||||||
floating true
|
|
||||||
move_to_focused_tab true
|
|
||||||
}
|
|
||||||
SwitchToMode "locked"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
shared_among "normal" "locked" {
|
|
||||||
bind "Alt left" { MoveFocusOrTab "left"; }
|
|
||||||
bind "Alt down" { MoveFocus "down"; }
|
|
||||||
bind "Alt up" { MoveFocus "up"; }
|
|
||||||
bind "Alt right" { MoveFocusOrTab "right"; }
|
|
||||||
bind "Alt +" { Resize "Increase"; }
|
|
||||||
bind "Alt -" { Resize "Decrease"; }
|
|
||||||
bind "Alt =" { Resize "Increase"; }
|
|
||||||
bind "Alt [" { PreviousSwapLayout; }
|
|
||||||
bind "Alt ]" { NextSwapLayout; }
|
|
||||||
bind "Alt f" { ToggleFloatingPanes; }
|
|
||||||
bind "Alt h" { MoveFocusOrTab "left"; }
|
|
||||||
bind "Alt i" { MoveTab "left"; }
|
|
||||||
bind "Alt j" { MoveFocus "down"; }
|
|
||||||
bind "Alt k" { MoveFocus "up"; }
|
|
||||||
bind "Alt l" { MoveFocusOrTab "right"; }
|
|
||||||
bind "Alt n" { NewPane; }
|
|
||||||
bind "Alt o" { MoveTab "right"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "renametab" "renamepane" {
|
|
||||||
bind "Ctrl g" { SwitchToMode "locked"; }
|
|
||||||
bind "Ctrl q" { Quit; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "entersearch" {
|
|
||||||
bind "enter" { SwitchToMode "locked"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "entersearch" "renametab" "renamepane" {
|
|
||||||
bind "esc" { SwitchToMode "locked"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "entersearch" "renametab" "renamepane" "move" {
|
|
||||||
bind "m" { SwitchToMode "move"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "entersearch" "search" "renametab" "renamepane" "session" {
|
|
||||||
bind "o" { SwitchToMode "session"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "tab" "entersearch" "renametab" "renamepane" {
|
|
||||||
bind "t" { SwitchToMode "tab"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "tab" "scroll" "entersearch" "renametab" "renamepane" {
|
|
||||||
bind "s" { SwitchToMode "scroll"; }
|
|
||||||
}
|
|
||||||
shared_among "normal" "resize" "tab" "scroll" "prompt" "tmux" {
|
|
||||||
bind "p" { SwitchToMode "pane"; }
|
|
||||||
}
|
|
||||||
shared_except "locked" "resize" "pane" "tab" "entersearch" "renametab" "renamepane" {
|
|
||||||
bind "r" { SwitchToMode "resize"; }
|
|
||||||
}
|
|
||||||
shared_among "scroll" "search" {
|
|
||||||
bind "PageDown" { PageScrollDown; }
|
|
||||||
bind "PageUp" { PageScrollUp; }
|
|
||||||
bind "left" { PageScrollUp; }
|
|
||||||
bind "down" { ScrollDown; }
|
|
||||||
bind "up" { ScrollUp; }
|
|
||||||
bind "right" { PageScrollDown; }
|
|
||||||
bind "Ctrl b" { PageScrollUp; }
|
|
||||||
bind "Ctrl c" { ScrollToBottom; SwitchToMode "locked"; }
|
|
||||||
bind "d" { HalfPageScrollDown; }
|
|
||||||
bind "Ctrl f" { PageScrollDown; }
|
|
||||||
bind "h" { PageScrollUp; }
|
|
||||||
bind "j" { ScrollDown; }
|
|
||||||
bind "k" { ScrollUp; }
|
|
||||||
bind "l" { PageScrollDown; }
|
|
||||||
bind "u" { HalfPageScrollUp; }
|
|
||||||
}
|
|
||||||
entersearch {
|
|
||||||
bind "Ctrl c" { SwitchToMode "scroll"; }
|
|
||||||
bind "esc" { SwitchToMode "scroll"; }
|
|
||||||
bind "enter" { SwitchToMode "search"; }
|
|
||||||
}
|
|
||||||
renametab {
|
|
||||||
bind "esc" { UndoRenameTab; SwitchToMode "tab"; }
|
|
||||||
}
|
|
||||||
shared_among "renametab" "renamepane" {
|
|
||||||
bind "Ctrl c" { SwitchToMode "locked"; }
|
|
||||||
}
|
|
||||||
renamepane {
|
|
||||||
bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Plugin aliases - can be used to change the implementation of Zellij
|
|
||||||
// changing these requires a restart to take effect
|
|
||||||
plugins {
|
|
||||||
about location="zellij:about"
|
|
||||||
compact-bar location="zellij:compact-bar"
|
|
||||||
configuration location="zellij:configuration"
|
|
||||||
filepicker location="zellij:strider" {
|
|
||||||
cwd "/"
|
|
||||||
}
|
|
||||||
plugin-manager location="zellij:plugin-manager"
|
|
||||||
session-manager location="zellij:session-manager"
|
|
||||||
status-bar location="zellij:status-bar"
|
|
||||||
strider location="zellij:strider"
|
|
||||||
tab-bar location="zellij:tab-bar"
|
|
||||||
welcome-screen location="zellij:session-manager" {
|
|
||||||
welcome_screen true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Plugins to load in the background when a new session starts
|
|
||||||
// eg. "file:/path/to/my-plugin.wasm"
|
|
||||||
// eg. "https://example.com/my-plugin.wasm"
|
|
||||||
load_plugins {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use a simplified UI without special fonts (arrow glyphs)
|
|
||||||
// Options:
|
|
||||||
// - true
|
|
||||||
// - false (Default)
|
|
||||||
//
|
|
||||||
// simplified_ui true
|
|
||||||
|
|
||||||
// Choose the theme that is specified in the themes section.
|
|
||||||
// Default: default
|
|
||||||
//
|
|
||||||
theme "tokyo-night-dark"
|
|
||||||
|
|
||||||
// Choose the base input mode of zellij.
|
|
||||||
// Default: normal
|
|
||||||
//
|
|
||||||
default_mode "locked"
|
|
||||||
|
|
||||||
// Choose the path to the default shell that zellij will use for opening new panes
|
|
||||||
// Default: $SHELL
|
|
||||||
//
|
|
||||||
// default_shell "fish"
|
|
||||||
|
|
||||||
// Choose the path to override cwd that zellij will use for opening new panes
|
|
||||||
//
|
|
||||||
// default_cwd "/tmp"
|
|
||||||
|
|
||||||
// The name of the default layout to load on startup
|
|
||||||
// Default: "default"
|
|
||||||
//
|
|
||||||
default_layout "compact"
|
|
||||||
|
|
||||||
// The folder in which Zellij will look for layouts
|
|
||||||
// (Requires restart)
|
|
||||||
//
|
|
||||||
// layout_dir "/tmp"
|
|
||||||
|
|
||||||
// The folder in which Zellij will look for themes
|
|
||||||
// (Requires restart)
|
|
||||||
//
|
|
||||||
// theme_dir "/tmp"
|
|
||||||
|
|
||||||
// Toggle enabling the mouse mode.
|
|
||||||
// On certain configurations, or terminals this could
|
|
||||||
// potentially interfere with copying text.
|
|
||||||
// Options:
|
|
||||||
// - true (default)
|
|
||||||
// - false
|
|
||||||
//
|
|
||||||
mouse_mode true
|
|
||||||
|
|
||||||
// Toggle having pane frames around the panes
|
|
||||||
// Options:
|
|
||||||
// - true (default, enabled)
|
|
||||||
// - false
|
|
||||||
//
|
|
||||||
pane_frames false
|
|
||||||
|
|
||||||
// When attaching to an existing session with other users,
|
|
||||||
// should the session be mirrored (true)
|
|
||||||
// or should each user have their own cursor (false)
|
|
||||||
// (Requires restart)
|
|
||||||
// Default: false
|
|
||||||
//
|
|
||||||
// mirror_session true
|
|
||||||
|
|
||||||
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
|
||||||
// eg. when terminal window with an active zellij session is closed
|
|
||||||
// (Requires restart)
|
|
||||||
// Options:
|
|
||||||
// - detach (Default)
|
|
||||||
// - quit
|
|
||||||
//
|
|
||||||
// on_force_close "quit"
|
|
||||||
|
|
||||||
// Configure the scroll back buffer size
|
|
||||||
// This is the number of lines zellij stores for each pane in the scroll back
|
|
||||||
// buffer. Excess number of lines are discarded in a FIFO fashion.
|
|
||||||
// (Requires restart)
|
|
||||||
// Valid values: positive integers
|
|
||||||
// Default value: 10000
|
|
||||||
//
|
|
||||||
// scroll_buffer_size 10000
|
|
||||||
|
|
||||||
// Provide a command to execute when copying text. The text will be piped to
|
|
||||||
// the stdin of the program to perform the copy. This can be used with
|
|
||||||
// terminal emulators which do not support the OSC 52 ANSI control sequence
|
|
||||||
// that will be used by default if this option is not set.
|
|
||||||
// Examples:
|
|
||||||
//
|
|
||||||
// copy_command "xclip -selection clipboard" // x11
|
|
||||||
copy_command "wl-copy" // wayland
|
|
||||||
// copy_command "pbcopy" // osx
|
|
||||||
//
|
|
||||||
// copy_command "pbcopy"
|
|
||||||
|
|
||||||
// Choose the destination for copied text
|
|
||||||
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
|
||||||
// Does not apply when using copy_command.
|
|
||||||
// Options:
|
|
||||||
// - system (default)
|
|
||||||
// - primary
|
|
||||||
//
|
|
||||||
// copy_clipboard "primary"
|
|
||||||
|
|
||||||
// Enable automatic copying (and clearing) of selection when releasing mouse
|
|
||||||
// Default: true
|
|
||||||
//
|
|
||||||
// copy_on_select true
|
|
||||||
|
|
||||||
// Path to the default editor to use to edit pane scrollbuffer
|
|
||||||
// Default: $EDITOR or $VISUAL
|
|
||||||
// scrollback_editor "/usr/bin/vim"
|
|
||||||
|
|
||||||
// A fixed name to always give the Zellij session.
|
|
||||||
// Consider also setting `attach_to_session true,`
|
|
||||||
// otherwise this will error if such a session exists.
|
|
||||||
// Default: <RANDOM>
|
|
||||||
//
|
|
||||||
// session_name "My singleton session"
|
|
||||||
|
|
||||||
// When `session_name` is provided, attaches to that session
|
|
||||||
// if it is already running or creates it otherwise.
|
|
||||||
// Default: false
|
|
||||||
//
|
|
||||||
// attach_to_session true
|
|
||||||
|
|
||||||
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
|
|
||||||
// Options:
|
|
||||||
// - true (default)
|
|
||||||
// - false
|
|
||||||
//
|
|
||||||
// auto_layout false
|
|
||||||
|
|
||||||
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
|
|
||||||
// Options:
|
|
||||||
// - true (default)
|
|
||||||
// - false
|
|
||||||
//
|
|
||||||
// session_serialization false
|
|
||||||
|
|
||||||
// Whether pane viewports are serialized along with the session, default is false
|
|
||||||
// Options:
|
|
||||||
// - true
|
|
||||||
// - false (default)
|
|
||||||
//
|
|
||||||
// serialize_pane_viewport false
|
|
||||||
|
|
||||||
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
|
|
||||||
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
|
|
||||||
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
|
|
||||||
//
|
|
||||||
// scrollback_lines_to_serialize 10000
|
|
||||||
|
|
||||||
// Enable or disable the rendering of styled and colored underlines (undercurl).
|
|
||||||
// May need to be disabled for certain unsupported terminals
|
|
||||||
// (Requires restart)
|
|
||||||
// Default: true
|
|
||||||
//
|
|
||||||
// styled_underlines false
|
|
||||||
|
|
||||||
// How often in seconds sessions are serialized
|
|
||||||
//
|
|
||||||
// serialization_interval 10000
|
|
||||||
|
|
||||||
// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
|
|
||||||
// metadata info on this session)
|
|
||||||
// (Requires restart)
|
|
||||||
// Default: false
|
|
||||||
//
|
|
||||||
// disable_session_metadata false
|
|
||||||
|
|
||||||
// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
|
|
||||||
// (Requires restart)
|
|
||||||
// Default: true (if the host terminal supports it)
|
|
||||||
//
|
|
||||||
support_kitty_keyboard_protocol true
|
|
||||||
|
|
||||||
// Whether to stack panes when resizing beyond a certain size
|
|
||||||
// Default: true
|
|
||||||
//
|
|
||||||
// stacked_resize false
|
|
||||||
|
|
||||||
// Whether to show tips on startup
|
|
||||||
// Default: true
|
|
||||||
//
|
|
||||||
show_startup_tips false
|
|
||||||
|
|
||||||
// Whether to show release notes on first version run
|
|
||||||
// Default: true
|
|
||||||
//
|
|
||||||
// show_release_notes false
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
inputs.fzgo.packages.${pkgs.system}.default
|
inputs.fzgo.packages.${pkgs.system}.default
|
||||||
];
|
];
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
BROWSER = "Helium";
|
BROWSER = "firefox";
|
||||||
PDF_VIEWER = "evince";
|
PDF_VIEWER = "evince";
|
||||||
GPULAB_CERT = "${config.xdg.configHome}/../.secrets/GPULab/certificate.pem";
|
GPULAB_CERT = "${config.xdg.configHome}/../.secrets/GPULab/certificate.pem";
|
||||||
GPULAB_DEV = "False";
|
GPULAB_DEV = "False";
|
||||||
|
|
@ -78,9 +78,6 @@
|
||||||
function o() {
|
function o() {
|
||||||
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown
|
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown
|
||||||
}
|
}
|
||||||
precmd() {
|
|
||||||
print -Pn "\e]133;A\e\\"
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,7 @@ in {
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
services.logind.settings.Login = {
|
services.logind.extraConfig = ''HandlePowerKey=ignore'';
|
||||||
HandlePowerKey = "suspend";
|
|
||||||
};
|
|
||||||
services.throttled.enable = true;
|
services.throttled.enable = true;
|
||||||
services.thinkfan.enable = true;
|
services.thinkfan.enable = true;
|
||||||
|
|
||||||
|
|
@ -33,7 +31,7 @@ in {
|
||||||
networking.wireless.iwd.enable = true;
|
networking.wireless.iwd.enable = true;
|
||||||
networking.wireless.iwd.settings = {
|
networking.wireless.iwd.settings = {
|
||||||
IPv6 = {
|
IPv6 = {
|
||||||
Enabled = false;
|
Enabled = true;
|
||||||
};
|
};
|
||||||
Settings = {
|
Settings = {
|
||||||
AutoConnect = true;
|
AutoConnect = true;
|
||||||
|
|
@ -54,6 +52,7 @@ in {
|
||||||
|
|
||||||
# virtualisation
|
# virtualisation
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
virtualisation.libvirtd.qemu.ovmf.enable = true;
|
||||||
virtualisation.spiceUSBRedirection.enable = true;
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
users.users.user.extraGroups = [ "libvirtd" ];
|
users.users.user.extraGroups = [ "libvirtd" ];
|
||||||
|
|
@ -77,7 +76,7 @@ in {
|
||||||
|
|
||||||
networking.wg-quick.interfaces = {
|
networking.wg-quick.interfaces = {
|
||||||
Tunnel = {
|
Tunnel = {
|
||||||
address = [ "10.0.0.5/24" ];
|
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
|
||||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
autostart = false;
|
autostart = false;
|
||||||
|
|
@ -91,7 +90,7 @@ in {
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
OPNsense = {
|
OPNsense = {
|
||||||
address = [ "10.0.0.5/24" ];
|
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
|
||||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
autostart = true;
|
autostart = true;
|
||||||
|
|
@ -104,19 +103,6 @@ in {
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
GCP = {
|
|
||||||
address = [ "10.5.0.5/24" ];
|
|
||||||
privateKeyFile = "/home/user/.secrets/Wireguard/GCP.key";
|
|
||||||
listenPort = 51820;
|
|
||||||
autostart = false;
|
|
||||||
postUp = "resolvectl dns GCP 1.1.1.1;resolvectl dns wlan0 1.1.1.1;";
|
|
||||||
peers = [{
|
|
||||||
publicKey = "NEBNE4Czf2MkZF2X5aVhmofENH1uXjDpvXjIMJvfMFA=";
|
|
||||||
allowedIPs = [ "0.0.0.0/0" ];
|
|
||||||
endpoint = "35.201.231.151:443";
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
systemd.services."wg-quick-OPNsense" = {
|
systemd.services."wg-quick-OPNsense" = {
|
||||||
serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; };
|
serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; };
|
||||||
|
|
|
||||||
|
|
@ -45,16 +45,13 @@
|
||||||
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
|
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
|
||||||
hardware.ipu6.enable = true;
|
hardware.ipu6.enable = true;
|
||||||
hardware.ipu6.platform = "ipu6ep";
|
hardware.ipu6.platform = "ipu6ep";
|
||||||
# nixpkgs.config.packageOverrides = pkgs: {
|
|
||||||
# zfs = pkgs.zfs_unstable;
|
|
||||||
# };
|
|
||||||
# boot.kernelPackages = pkgs.linuxPackages_latest.extend ( self: super: {
|
# boot.kernelPackages = pkgs.linuxPackages_latest.extend ( self: super: {
|
||||||
# ipu6-drivers = super.ipu6-drivers.overrideAttrs (
|
# ipu6-drivers = super.ipu6-drivers.overrideAttrs (
|
||||||
# final: previous: rec {
|
# final: previous: rec {
|
||||||
# src = builtins.fetchGit {
|
# src = builtins.fetchGit {
|
||||||
# url = "https://github.com/intel/ipu6-drivers.git";
|
# url = "https://github.com/intel/ipu6-drivers.git";
|
||||||
# ref = "master";
|
# ref = "master";
|
||||||
# rev = "4bb5b4d8128fbf7f4730cd364a8f7fc13a0ef65b";
|
# rev = "b4ba63df5922150ec14ef7f202b3589896e0301a";
|
||||||
# };
|
# };
|
||||||
# patches = [
|
# patches = [
|
||||||
# "${src}/patches/0001-v6.10-IPU6-headers-used-by-PSYS.patch"
|
# "${src}/patches/0001-v6.10-IPU6-headers-used-by-PSYS.patch"
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,7 @@ in {
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
services.thermald.enable = true;
|
services.thermald.enable = true;
|
||||||
services.logind.settings.Login = {
|
services.logind.extraConfig = ''HandlePowerKey=ignore'';
|
||||||
HandlePowerKey = "suspend";
|
|
||||||
};
|
|
||||||
services.throttled = {
|
services.throttled = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -42,7 +40,6 @@ in {
|
||||||
};
|
};
|
||||||
Settings = {
|
Settings = {
|
||||||
AutoConnect = true;
|
AutoConnect = true;
|
||||||
Country = "ES";
|
|
||||||
};
|
};
|
||||||
General = {
|
General = {
|
||||||
EnableNetworkConfiguration = true;
|
EnableNetworkConfiguration = true;
|
||||||
|
|
@ -60,6 +57,7 @@ in {
|
||||||
|
|
||||||
# virtualisation
|
# virtualisation
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
virtualisation.libvirtd.qemu.ovmf.enable = true;
|
||||||
virtualisation.spiceUSBRedirection.enable = true;
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
users.users.user.extraGroups = [ "libvirtd" ];
|
users.users.user.extraGroups = [ "libvirtd" ];
|
||||||
|
|
@ -121,5 +119,4 @@ in {
|
||||||
];
|
];
|
||||||
fonts.fontDir.enable = true;
|
fonts.fontDir.enable = true;
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,7 @@
|
||||||
{
|
{
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
users.users.user.extraGroups = ["adbusers"];
|
users.users.user.extraGroups = ["adbusers"];
|
||||||
|
services.udev.packages = [
|
||||||
|
pkgs.android-udev-rules
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,7 @@
|
||||||
boot.loader.systemd-boot.netbootxyz.enable = true;
|
boot.loader.systemd-boot.netbootxyz.enable = true;
|
||||||
boot.loader.timeout = 1;
|
boot.loader.timeout = 1;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
systemd.settings.Manager.DefaultTimeoutStopSec = "10s";
|
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
systemd.settings.Manager.DefaultTimeoutStartSec = "10s";
|
|
||||||
systemd.settings.Manager.DefaultTimeoutAbortSec = "10s";
|
|
||||||
systemd.settings.Manager.DefaultDeviceTimeoutSec = "10s";
|
|
||||||
systemd.services.systemd-user-sessions.enable = false;
|
systemd.services.systemd-user-sessions.enable = false;
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
|
|
@ -78,8 +75,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
enable = pkgs.lib.mkDefault true;
|
enable = true;
|
||||||
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
|
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
};
|
};
|
||||||
networking.nameservers = pkgs.lib.mkDefault ["1.1.1.1" "1.0.0.1"];
|
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{ inputs, pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
programs.appimage.enable = true;
|
|
||||||
programs.appimage.binfmt = true;
|
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ let
|
||||||
"soft"
|
"soft"
|
||||||
"bg"
|
"bg"
|
||||||
"intr"
|
"intr"
|
||||||
# "x-systemd.automount"
|
"x-systemd.automount"
|
||||||
"x-systemd.idle-timeout=600"
|
"x-systemd.idle-timeout=600"
|
||||||
"x-systemd.device-timeout=2s"
|
"x-systemd.device-timeout=2s"
|
||||||
"x-systemd.mount-timeout=2s"
|
"x-systemd.mount-timeout=2s"
|
||||||
|
|
@ -61,4 +61,10 @@ in {
|
||||||
device = "/home/server/Storage/Thomas/Videos";
|
device = "/home/server/Storage/Thomas/Videos";
|
||||||
options = bind_options;
|
options = bind_options;
|
||||||
};
|
};
|
||||||
|
systemd.extraConfig = ''
|
||||||
|
DefaultTimeoutStartSec=15s
|
||||||
|
DefaultTimeoutStopSec=15s
|
||||||
|
DefaultTimeoutAbortSec=15s
|
||||||
|
DefaultDeviceTimeoutSec=15s
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ inputs, config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
boot.initrd.supportedFilesystems = [ "zfs" ];
|
boot.initrd.supportedFilesystems = [ "zfs" ];
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
|
@ -18,17 +18,6 @@
|
||||||
autoprune = true;
|
autoprune = true;
|
||||||
autosnap = true;
|
autosnap = true;
|
||||||
};
|
};
|
||||||
"rpool/storage" = {
|
|
||||||
frequently = 8;
|
|
||||||
yearly = 0;
|
|
||||||
monthly = 0;
|
|
||||||
weekly = 0;
|
|
||||||
daily = 0;
|
|
||||||
hourly = 0;
|
|
||||||
frequent_period = 15;
|
|
||||||
autoprune = true;
|
|
||||||
autosnap = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,7 @@ in {
|
||||||
acceleration = "rocm";
|
acceleration = "rocm";
|
||||||
};
|
};
|
||||||
# nixpkgs.config.cudaSupport = true;
|
# nixpkgs.config.cudaSupport = true;
|
||||||
services.logind.settings.Login = {
|
services.logind.extraConfig = ''HandlePowerKey=suspend'';
|
||||||
HandlePowerKey = "suspend";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Virtualization
|
# Virtualization
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753181343,
|
"lastModified": 1740208222,
|
||||||
"narHash": "sha256-CLQfNtUqirNVSYoW/kYbvL4PeeNasmZonaPnjO3+1YQ=",
|
"narHash": "sha256-FqgPcK5BK+Mc4cGBCGz555UsVd/TQK9FvmuamBWu+ZY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0cdfcdbb525b77b951c889b6131047bc374f48fe",
|
"rev": "f4a07823a298deff0efb0db30f9318511de7c232",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -99,11 +99,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752950548,
|
"lastModified": 1739866667,
|
||||||
"narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=",
|
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c87b95e25065c028d31a94f06a62927d18763fdf",
|
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,4 @@
|
||||||
device = "/home/server/Workspace";
|
device = "/home/server/Workspace";
|
||||||
options = ["bind"];
|
options = ["bind"];
|
||||||
};
|
};
|
||||||
services.resolved = {
|
|
||||||
enable = false;
|
|
||||||
};
|
|
||||||
networking.nameservers = ["192.168.1.2"];
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
gamescopeSession.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue