diff --git a/flake.lock b/flake.lock index 6a2469c..bb2ea8f 100644 --- a/flake.lock +++ b/flake.lock @@ -570,7 +570,8 @@ "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", "prismlauncher-cracked": "prismlauncher-cracked", - "stylix": "stylix" + "stylix": "stylix", + "wrappers": "wrappers" } }, "rust-analyzer-src": { @@ -739,6 +740,26 @@ "repo": "treefmt-nix", "type": "github" } + }, + "wrappers": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767440749, + "narHash": "sha256-HMPTjLM3vg5iLX/2ssqFIhAjoRLQJ6PHNqjzuyjj+No=", + "owner": "lassulus", + "repo": "wrappers", + "rev": "c10d90a8907b57a8c57c232562820a1352fa98d7", + "type": "github" + }, + "original": { + "owner": "lassulus", + "repo": "wrappers", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 16bf091..76e4923 100644 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,11 @@ url = "git+https://gitea.garandplg.com/GarandPLG/garandos-tui?ref=main"; inputs.nixpkgs.follows = "nixpkgs"; }; + + wrappers = { + url = "github:lassulus/wrappers"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { diff --git a/hosts/Garand-Desktop/home-modules.nix b/hosts/Garand-Desktop/home-modules.nix index f613be2..9a1ab9b 100644 --- a/hosts/Garand-Desktop/home-modules.nix +++ b/hosts/Garand-Desktop/home-modules.nix @@ -25,6 +25,8 @@ _: { fastfetch.enable = true; # Fastfetch: a fast system information tool + peaclock.enable = true; # Peaclock: Clock, timer, and stopwatch for the terminal + /* Communication and synchronization */ diff --git a/hosts/Garand-Desktop/system-modules.nix b/hosts/Garand-Desktop/system-modules.nix index 9f96e7d..a2db370 100644 --- a/hosts/Garand-Desktop/system-modules.nix +++ b/hosts/Garand-Desktop/system-modules.nix @@ -76,6 +76,5 @@ _: { galculator.enable = true; # Galculator: simple calculator gedit.enable = false; # Gedit: GNOME text editor winboat.enable = false; # Winboat: Windows remote desktop via RDP - peaclock.enable = true; # Peaclock: Clock, timer, and stopwatch for the terminal }; } diff --git a/hosts/Garand-Laptop/home-modules.nix b/hosts/Garand-Laptop/home-modules.nix index f613be2..9a1ab9b 100644 --- a/hosts/Garand-Laptop/home-modules.nix +++ b/hosts/Garand-Laptop/home-modules.nix @@ -25,6 +25,8 @@ _: { fastfetch.enable = true; # Fastfetch: a fast system information tool + peaclock.enable = true; # Peaclock: Clock, timer, and stopwatch for the terminal + /* Communication and synchronization */ diff --git a/hosts/Garand-Laptop/system-modules.nix b/hosts/Garand-Laptop/system-modules.nix index 8b7e073..8e11b2d 100644 --- a/hosts/Garand-Laptop/system-modules.nix +++ b/hosts/Garand-Laptop/system-modules.nix @@ -76,6 +76,5 @@ _: { galculator.enable = true; # Galculator: simple calculator gedit.enable = false; # Gedit: GNOME text editor winboat.enable = false; # Winboat: Windows remote desktop via RDP - peaclock.enable = true; # Peaclock: Clock, timer, and stopwatch for the terminal }; } diff --git a/hosts/default/home-modules.nix b/hosts/default/home-modules.nix index f613be2..9a1ab9b 100644 --- a/hosts/default/home-modules.nix +++ b/hosts/default/home-modules.nix @@ -25,6 +25,8 @@ _: { fastfetch.enable = true; # Fastfetch: a fast system information tool + peaclock.enable = true; # Peaclock: Clock, timer, and stopwatch for the terminal + /* Communication and synchronization */ diff --git a/hosts/default/system-modules.nix b/hosts/default/system-modules.nix index 8b7e073..8e11b2d 100644 --- a/hosts/default/system-modules.nix +++ b/hosts/default/system-modules.nix @@ -76,6 +76,5 @@ _: { galculator.enable = true; # Galculator: simple calculator gedit.enable = false; # Gedit: GNOME text editor winboat.enable = false; # Winboat: Windows remote desktop via RDP - peaclock.enable = true; # Peaclock: Clock, timer, and stopwatch for the terminal }; } diff --git a/modules/core/packages/packages.nix b/modules/core/packages/packages.nix index 67a48cf..442b48d 100644 --- a/modules/core/packages/packages.nix +++ b/modules/core/packages/packages.nix @@ -44,7 +44,6 @@ winboat = [winboat freerdp]; signal = signal-desktop; pixieditor = pixieditor; - peaclock = peaclock; bottles = bottles; heroic = heroic; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index 3d3483f..85ce98e 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -8,6 +8,7 @@ in { ./hyprland ./kitty ./librewolf + ./peaclock ./rofi ./scripts ./swaync diff --git a/modules/home/peaclock/default.nix b/modules/home/peaclock/default.nix new file mode 100644 index 0000000..6966d71 --- /dev/null +++ b/modules/home/peaclock/default.nix @@ -0,0 +1,25 @@ +{ + pkgs, + lib, + config, + inputs, + username, + ... +}: let +in { + options.peaclock.enable = lib.mkEnableOption "Peaclock"; + + config.home.packages = lib.mkIf config.peaclock.enable [ + (inputs.wrappers.lib.wrapPackage + { + inherit pkgs; + package = pkgs.peaclock; + flags = { + "--config-dir" = "/home/${username}/.peaclock"; + "--config" = "/home/${username}/.peaclock/config/digital"; + }; + }) + ]; + + imports = [./digital.nix]; +} diff --git a/modules/home/peaclock/digital.nix b/modules/home/peaclock/digital.nix new file mode 100644 index 0000000..e6d4384 --- /dev/null +++ b/modules/home/peaclock/digital.nix @@ -0,0 +1,61 @@ +{config, ...}: { + home.file.".peaclock/config/digital" = { + # recursive = true; + text = let + colors = config.stylix.base16Scheme; + in '' + # peaclock + # digital config + # + # For more information, refer to the 'Configuration' and 'Commands' + # sections of the programs help output with '--help' or '-h'. + + # ----------------------------------------------------------------------------- + # general + # ----------------------------------------------------------------------------- + + block 2 1 + padding 2 1 + margin 2 1 + ratio 2 1 + date-padding 1 + locale 'pl_PL.utf8' + timezone 'Europe/Warsaw' + date '%a %b %d %p' + mode stopwatch + view digital + toggle padding + stopwatch start + timer 10m:0s + timer-exec 'notify-send -a peaclock "timer complete"' + rate-input 50 + rate-refresh 250 + rate-status 5000 + + # ----------------------------------------------------------------------------- + # toggles + # ----------------------------------------------------------------------------- + set hour-24 on + set seconds on + set date on + set auto-size on + set auto-ratio on + + # ----------------------------------------------------------------------------- + # styles + # ----------------------------------------------------------------------------- + style active-fg #${colors.base05} + style inactive-fg #${colors.base03} + style colon-fg #${colors.base07} + style active-bg #${colors.base0E} + style inactive-bg #${colors.base00} + style colon-bg #${colors.base00} + style date #${colors.base04} + style background #${colors.base00} + style text #${colors.base05} + style prompt #${colors.base09} + style success #${colors.base0A} + style error #${colors.base02} + ''; + }; +}