mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-03-19 15:50:30 +01:00
Compare commits
No commits in common. "159ab77ef4b40a0c58a5097980a317076ce504cc" and "008c697c5039046dc4a07cce231594e44de57eee" have entirely different histories.
159ab77ef4
...
008c697c50
14 changed files with 63 additions and 354 deletions
253
flake.lock
generated
253
flake.lock
generated
|
|
@ -83,7 +83,7 @@
|
|||
"nam-shub-of-enki",
|
||||
"pre-commit-hooks"
|
||||
],
|
||||
"systems": "systems_5",
|
||||
"systems": "systems_3",
|
||||
"treefmt-nix": [
|
||||
"nixocaine",
|
||||
"nam-shub-of-enki",
|
||||
|
|
@ -257,43 +257,7 @@
|
|||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_7"
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
|
|
@ -791,27 +755,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"iamb": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724218012,
|
||||
"narHash": "sha256-cjBSWUBgfwdLnpneJ5XW2TdOFkNc+Rc/wyUp9arZzwg=",
|
||||
"owner": "ulyssa",
|
||||
"repo": "iamb",
|
||||
"rev": "2e6376ff866a17eb4727af039b6a8e801da252e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ulyssa",
|
||||
"ref": "latest",
|
||||
"repo": "iamb",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"iocaine-stable": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -822,7 +765,7 @@
|
|||
"nixocaine",
|
||||
"pre-commit-hooks"
|
||||
],
|
||||
"systems": "systems_4",
|
||||
"systems": "systems_2",
|
||||
"treefmt-nix": [
|
||||
"nixocaine",
|
||||
"treefmt-nix"
|
||||
|
|
@ -945,9 +888,9 @@
|
|||
"inputs": {
|
||||
"iocaine-stable": "iocaine-stable",
|
||||
"nam-shub-of-enki": "nam-shub-of-enki",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||
"systems": "systems_6",
|
||||
"systems": "systems_4",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -1025,38 +968,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1771369470,
|
||||
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_11": {
|
||||
"locked": {
|
||||
"lastModified": 1769433173,
|
||||
"narHash": "sha256-Gf1dFYgD344WZ3q0LPlRoWaNdNQq8kSBDLEWulRQSEs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "13b0f9e6ac78abbbb736c635d87845c4f4bee51b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_12": {
|
||||
"locked": {
|
||||
"lastModified": 1770843696,
|
||||
"narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=",
|
||||
|
|
@ -1072,7 +983,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_13": {
|
||||
"nixpkgs_11": {
|
||||
"locked": {
|
||||
"lastModified": 1770197578,
|
||||
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||
|
|
@ -1121,38 +1032,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1709703039,
|
||||
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1706487304,
|
||||
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1766201043,
|
||||
"narHash": "sha256-eplAP+rorKKd0gNjV3rA6+0WMzb1X1i16F5m5pASnjA=",
|
||||
|
|
@ -1168,7 +1047,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1771419570,
|
||||
"narHash": "sha256-bxAlQgre3pcQcaRUm/8A0v/X8d2nhfraWSFqVmMcBcU=",
|
||||
|
|
@ -1184,7 +1063,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1743315132,
|
||||
"narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=",
|
||||
|
|
@ -1200,7 +1079,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1742800061,
|
||||
"narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=",
|
||||
|
|
@ -1216,10 +1095,42 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1771369470,
|
||||
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1769433173,
|
||||
"narHash": "sha256-Gf1dFYgD344WZ3q0LPlRoWaNdNQq8kSBDLEWulRQSEs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "13b0f9e6ac78abbbb736c635d87845c4f4bee51b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixvim": "nixvim_2"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -1239,7 +1150,7 @@
|
|||
"nixvim_2": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nuschtosSearch": "nuschtosSearch"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -1259,7 +1170,7 @@
|
|||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": "nixpkgs_10"
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771581385,
|
||||
|
|
@ -1277,7 +1188,7 @@
|
|||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
|
|
@ -1368,12 +1279,11 @@
|
|||
"hypr-contrib": "hypr-contrib",
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-plugins": "hyprland-plugins",
|
||||
"iamb": "iamb",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nixocaine": "nixocaine",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"oisd": "oisd",
|
||||
|
|
@ -1399,28 +1309,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709863839,
|
||||
"narHash": "sha256-QpEL5FmZNi2By3sKZY55wGniFXc4wEn9PQczlE8TG0o=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "e5ab9ee98f479081ad971473d2bc13c59e9fbc0a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"skhd-zig": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_11"
|
||||
"nixpkgs": "nixpkgs_9"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769555538,
|
||||
|
|
@ -1438,7 +1329,7 @@
|
|||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_12"
|
||||
"nixpkgs": "nixpkgs_10"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771524872,
|
||||
|
|
@ -1456,8 +1347,8 @@
|
|||
},
|
||||
"spicetify-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_13",
|
||||
"systems": "systems_8"
|
||||
"nixpkgs": "nixpkgs_11",
|
||||
"systems": "systems_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771268051,
|
||||
|
|
@ -1498,9 +1389,8 @@
|
|||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
|
|
@ -1513,9 +1403,8 @@
|
|||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
|
|
@ -1542,40 +1431,12 @@
|
|||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_6": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"systems_7": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_8": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
||||
skhd-zig.url = "github:sebb3/skhd-zig.nix";
|
||||
iamb.url = "github:ulyssa/iamb/latest";
|
||||
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@
|
|||
"lua"
|
||||
];
|
||||
casks = [
|
||||
"supertuxkart"
|
||||
"vial"
|
||||
"thunderbird"
|
||||
"sf-symbols"
|
||||
|
|
|
|||
|
|
@ -1,54 +1,9 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
programs.iamb = {
|
||||
enable = true;
|
||||
package = inputs.iamb.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
settings = {
|
||||
profiles.user = {
|
||||
user_id = "@liv:liv.town";
|
||||
layout.style = "restore";
|
||||
};
|
||||
typing_notice_send = false;
|
||||
typing_notice_display = true;
|
||||
reaction_display = true;
|
||||
read_receipt_send = false;
|
||||
read_receipt_display = false;
|
||||
sort = {
|
||||
chats = [
|
||||
"favorite"
|
||||
"recent"
|
||||
"unread"
|
||||
"name"
|
||||
"lowpriority"
|
||||
];
|
||||
members = [
|
||||
"power"
|
||||
"id"
|
||||
];
|
||||
};
|
||||
macros.normal = {
|
||||
";" = ":";
|
||||
gc = ":chats<Enter>";
|
||||
gr = ":rooms<Enter>";
|
||||
gs = ":spaces<Enter>";
|
||||
gu = ":unreads<Enter>";
|
||||
gf = ":open<Enter>";
|
||||
uc = ":unreads clear<Enter>";
|
||||
r = ":reply<Enter>";
|
||||
e = ":edit<Enter>";
|
||||
mq = ":cancel<Enter>y";
|
||||
me = ":editor<Enter>";
|
||||
J = ":tabprevious<Enter>y";
|
||||
K = ":tabnext<Enter>";
|
||||
};
|
||||
macros.normal = {
|
||||
asdf = "<Esc>";
|
||||
sadf = "<Esc>";
|
||||
fasd = "<Esc>";
|
||||
sdaf = "<Esc>";
|
||||
};
|
||||
profiles.user.user_id = "@liv:liv.town";
|
||||
notifications.enabled = false;
|
||||
username_display = "displayname";
|
||||
image_preview = {
|
||||
protocol.type = "kitty";
|
||||
protocol.size = {
|
||||
|
|
@ -56,6 +11,7 @@
|
|||
width = 66;
|
||||
};
|
||||
};
|
||||
username_display = "displayname";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,16 +16,6 @@ let
|
|||
builtins.readFile ./scripts/dock-on-all-monitors.sh
|
||||
);
|
||||
caffeine = pkgs.writeScriptBin "caffeine" (builtins.readFile ./scripts/caffeine);
|
||||
image-preview = pkgs.writeScriptBin "image-preview" (builtins.readFile ./scripts/image-preview.sh);
|
||||
focus-kitty-picker = pkgs.writeScriptBin "focus-kitty-picker" (
|
||||
builtins.readFile ./scripts/focus-kitty-picker.sh
|
||||
);
|
||||
change-wallpaper = pkgs.writeScriptBin "change-wallpaper" (
|
||||
builtins.readFile ./scripts/change-wallpaper.sh
|
||||
);
|
||||
macos-terminal-launcher = pkgs.writeShellScriptBin "macos-terminal-launcher" (
|
||||
builtins.readFile ./scripts/macos-terminal-launcher.sh
|
||||
);
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -41,9 +31,5 @@ in
|
|||
ascii
|
||||
dock-on-all-monitors
|
||||
caffeine
|
||||
change-wallpaper
|
||||
focus-kitty-picker
|
||||
image-preview
|
||||
macos-terminal-launcher
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# focus-kitty-picker $1
|
||||
|
||||
selected_wallpaper=$(
|
||||
eza -1 -X --no-quotes --absolute ~/Pictures/wallpapers/ | fzf --preview="wallpaper-preview {}" \
|
||||
--color=fg+:#b8bb26 \
|
||||
--color=hl:#fb4934,hl+:#fb4934,info:#83a598,marker:#fe8019 \
|
||||
--color=prompt:#fb4934,spinner:#fb4934,pointer:#fe8019,header:#b8bb26 \
|
||||
--color=border:#fe8019,scrollbar:#fabd2f,label:#fe8019 \
|
||||
--color=query:#b8bb26 \
|
||||
--color=preview-border:#fe8019 \
|
||||
--border="rounded" --border-label-pos="0" --preview-window="border-rounded"
|
||||
)
|
||||
|
||||
if [ ! -z "${selected_wallpaper}" ]; then
|
||||
osascript -e "tell application \"System Events\" to tell every desktop to set picture to POSIX file \"$selected_wallpaper\""
|
||||
fi
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$1" = "kitty-picker" ]; then
|
||||
while :; do
|
||||
window_id=$(aerospace list-windows --all --format %{window-id}%{app-name} --json | jq ".[] | select(.\"app-name\" == \"kitty\") | .\"window-id\"")
|
||||
if [ ! -z "${window_id}" ]; then
|
||||
$(aerospace focus --window-id "${window_id}")
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
dim=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}
|
||||
|
||||
if [[ $KITTY_WINDOW_ID ]] || [[ $GHOSTTY_RESOURCES_DIR ]] && command -v kitten >/dev/null; then
|
||||
kitten icat --clear --transfer-mode=memory --unicode-placeholder --stdin=no --place="$dim@0x0" "$1" | sed '$d' | sed $'$s/$/\e[m/'
|
||||
else
|
||||
chafa -s "$dim" "$1"
|
||||
echo
|
||||
fi
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
kitty -e "$@"
|
||||
|
|
@ -7,30 +7,15 @@
|
|||
|
||||
NOTEDIR="$HOME/Notes"
|
||||
|
||||
if [ $(command -v bemenu) ]; then
|
||||
MENUCMD="bemenu -l 10 --ignorecase"
|
||||
elif [ $(command -v fzf) ]; then
|
||||
MENUCMD="fzf"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $(command -v notify-send) ]; then
|
||||
NOTICMD="notify-send \"Pulling from Git...\""
|
||||
elif [ $(command -v fzf) ]; then
|
||||
NOTICMD="osascript -e \'display notification \"Pulling from Git...\"\'"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CHOSEN=$(find "$HOME/Notes" -follow | grep -E '.md$' | $MENUCMD)
|
||||
CHOSEN=$(find "$HOME/Notes" -follow | grep -E '.md$' | bemenu -l 10 --ignorecase)
|
||||
|
||||
cd "$NOTEDIR" || mkdir -p "$NOTEDIR" && cd "$NOTEDIR" || echo 'Error with moving into directory, is "$NOTEDIR" set?' # Change dir to notes dir, if it doesn't exist, create it and try again. Otherwise it should just die, I guess?
|
||||
echo "Check if connected to internet and pull changes from Git"
|
||||
ping -c1 github.com >/dev/null && $NOTICMD # Pull most recent changes, be sure to not create conficts...
|
||||
ping -c1 github.com >/dev/null && notify-send "$(git pull)" # Pull most recent changes, be sure to not create conficts...
|
||||
|
||||
if [ "$CHOSEN" ]; then
|
||||
kitty -e nvim "$CHOSEN" # Finally open chosen note
|
||||
|
||||
git add "$CHOSEN" && git commit -m "chore: updates (auto)" && git push && notify-send "Changes pushed"
|
||||
else
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -41,10 +41,6 @@
|
|||
executable = true;
|
||||
text = builtins.readFile ./plugins/space.sh;
|
||||
};
|
||||
".config/sketchybar/plugins/uptime.sh" = {
|
||||
executable = true;
|
||||
text = builtins.readFile ./plugins/uptime.sh;
|
||||
};
|
||||
".config/sketchybar/plugins/volume.sh" = {
|
||||
executable = true;
|
||||
text = builtins.readFile ./plugins/volume.sh;
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
boot=$(sysctl -n kern.boottime)
|
||||
boot=${boot/\{ sec = /}
|
||||
boot=${boot/,*/}
|
||||
now=$(date +%s)
|
||||
seconds=$((now - boot))
|
||||
d="$((seconds / 60 / 60 / 24)) days"
|
||||
h="$((seconds / 60 / 60 % 24)) hours"
|
||||
m="$((seconds / 60 % 60)) minutes"
|
||||
|
||||
# Remove plural if < 2.
|
||||
((${d/ */} == 1)) && d=${d/s/}
|
||||
((${h/ */} == 1)) && h=${h/s/}
|
||||
((${m/ */} == 1)) && m=${m/s/}
|
||||
|
||||
# Hide empty fields.
|
||||
((${d/ */} == 0)) && unset d
|
||||
((${h/ */} == 0)) && unset h
|
||||
((${m/ */} == 0)) && unset m
|
||||
|
||||
uptime=${d:+$d, }${h:+$h, }$m
|
||||
uptime=${uptime%', '}
|
||||
uptime=${uptime:-$seconds seconds}
|
||||
|
||||
sketchybar --set "$NAME" label="up $uptime"
|
||||
|
|
@ -91,9 +91,6 @@ sketchybar --add item clock right \
|
|||
--add item memory right \
|
||||
--set memory script="$PLUGIN_DIR/memory.sh" \
|
||||
--set memory update_freq=120 \
|
||||
--add item uptime right \
|
||||
--set uptime script="$PLUGIN_DIR/uptime.sh" \
|
||||
--set uptime update_freq=60
|
||||
|
||||
##### Force all scripts to run the first time (never do this in a script) #####
|
||||
sketchybar --update
|
||||
|
|
|
|||
|
|
@ -50,12 +50,10 @@
|
|||
alt - e : open -a Finder /Users/${username}
|
||||
alt + shift - c : open -na Chromium # open new instance
|
||||
alt + shift - e : open -a Element # move to existing instance
|
||||
alt + shift - f : open -a Firefox -n # open new firefox window
|
||||
alt + shift - n : macos-terminal-launcher notes # open notes window
|
||||
|
||||
alt - f : yabai -m window --toggle zoom-fullscreen
|
||||
|
||||
alt + ctrl + shift -f : yabai -m window --toggle native-fullscreen
|
||||
alt + shift -f : yabai -m window --toggle native-fullscreen
|
||||
|
||||
|
||||
# # Linux-style word navigation and deletion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue