diff --git a/flake.lock b/flake.lock index 5570ab0..2565ca1 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1678271387, - "narHash": "sha256-H2dv/i1LRlunRtrESirELzfPWdlG/6ElDB1ksO529H4=", + "lastModified": 1677621055, + "narHash": "sha256-n3D/pZX0cYEpWKcLJSFImo5Dpk3D1RrxKVDmI6lnaIg=", "owner": "nix-community", "repo": "home-manager", - "rev": "36999b8d19eb6eebb41983ef017d7e0095316af2", + "rev": "ef7d316578367ed7732a21eede6c79546a36124f", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1678201391, - "narHash": "sha256-dX4z2oSJ5UKzY5wb5HX2VaPP08DPWZ6B7EHzOJfP7GM=", + "lastModified": 1677407201, + "narHash": "sha256-3blwdI9o1BAprkvlByHvtEm5HAIRn/XPjtcfiunpY7s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c707238dc262923da5a53a5a11914117caac07a2", + "rev": "7f5639fa3b68054ca0b062866dc62b22c3f11505", "type": "github" }, "original": { @@ -45,11 +45,11 @@ }, "utils": { "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { diff --git a/hosts/home.nix b/hosts/home.nix index d038d15..63d1d1c 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -19,6 +19,7 @@ in ../modules/startpage ../modules/terminal ../modules/todo-txt + ../modules/xborders ]; home.file."./.background-image".source = theme.wallpaper; diff --git a/modules/i3/default.nix b/modules/i3/default.nix index f6d5550..23aa48e 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -8,7 +8,6 @@ in with theme.colors; { home.packages = with pkgs; [ playerctl # pactl comes with PulseAudio wmctrl # For rofi power menu - xborders # Active window borders ]; # Screenshots diff --git a/modules/xborders/default.nix b/modules/xborders/default.nix new file mode 100644 index 0000000..f0e721b --- /dev/null +++ b/modules/xborders/default.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = with pkgs; [ + (pkgs.callPackage ./xborders.nix {}) + ]; +} diff --git a/modules/xborders/setup.py b/modules/xborders/setup.py new file mode 100644 index 0000000..a002625 --- /dev/null +++ b/modules/xborders/setup.py @@ -0,0 +1,12 @@ +from setuptools import setup + +setup( + name='@pname@', + version='@version@', + author='deter0', + description='@desc@', + install_requires=['pycairo', 'requests', 'PyGObject'], + scripts=[ + 'xborders', + ], +) diff --git a/modules/xborders/xborders.nix b/modules/xborders/xborders.nix new file mode 100644 index 0000000..9436697 --- /dev/null +++ b/modules/xborders/xborders.nix @@ -0,0 +1,48 @@ +{ lib, pkgs, ... }: + +with pkgs; callPackage python3Packages.buildPythonPackage rec { + pname = "xborders"; + version = "3.4"; # in version.txt + + src = fetchFromGitHub { + owner = "deter0"; + repo = "xborder"; + rev = "e74ae532b9555c59d195537934fa355b3fea73c5"; + hash = "sha256-UKsseNkXest6npPqJKvKL0iBWeK+S7zynrDlyXIOmF4="; + }; + + buildInputs = [ + libwnck + gtk3 + libnotify + ]; + + nativeBuildInputs = [ + wrapGAppsHook + gobject-introspection + ]; + + propagatedBuildInputs = with python3Packages; [ + pycairo + requests + pygobject3 + ]; + + postPatch = let + setup = pkgs.substituteAll { + src = ./setup.py; + desc = meta.description; # "description" is reserved + inherit pname version; + }; + in '' + ln -s ${setup} setup.py + ''; + + meta = with lib; { + description = "Active window border replacement for window managers."; + homepage = "https://github.com/deter0/xborder"; + license = licenses.unlicense; + maintainers = with maintainers; [ elnudev ]; + platforms = platforms.linux; + }; +}