finalise wallpaper
This commit is contained in:
parent
ef0c9157f4
commit
eabb1371eb
12 changed files with 217 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -0,0 +1 @@
|
|||
home/dots/qtile/.direnv
|
94
flakes/lutgen/flake.lock
generated
Normal file
94
flakes/lutgen/flake.lock
generated
Normal file
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693611461,
|
||||
"narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lutgen-lock": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-wPSo2ud3bsl2zi1kqLw4nEmZjJqbTFdvonjsd8ZMoeE=",
|
||||
"type": "file",
|
||||
"url": "https://raw.githubusercontent.com/ozwaldorf/lutgen-rs/main/Cargo.lock"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://raw.githubusercontent.com/ozwaldorf/lutgen-rs/main/Cargo.lock"
|
||||
}
|
||||
},
|
||||
"lutgen-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1694897750,
|
||||
"narHash": "sha256-f8uxk/QkoaVJQmFWAi7/QHAI6BTf0CEL/0YCs7F4GjQ=",
|
||||
"owner": "ozwaldorf",
|
||||
"repo": "lutgen-rs",
|
||||
"rev": "f717541ae6b0ffc1f001132ccb0e8108de761e19",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ozwaldorf",
|
||||
"repo": "lutgen-rs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1695644571,
|
||||
"narHash": "sha256-asS9dCCdlt1lPq0DLwkVBbVoEKuEuz+Zi3DG7pR/RxA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6500b4580c2a1f3d0f980d32d285739d8e156d92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1693471703,
|
||||
"narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"lutgen-lock": "lutgen-lock",
|
||||
"lutgen-src": "lutgen-src",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
54
flakes/lutgen/flake.nix
Normal file
54
flakes/lutgen/flake.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
description = "Description for the project";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
lutgen-lock = {
|
||||
url = "https://raw.githubusercontent.com/ozwaldorf/lutgen-rs/main/Cargo.lock";
|
||||
flake = false;
|
||||
};
|
||||
lutgen-src = {
|
||||
url = "github:ozwaldorf/lutgen-rs";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [
|
||||
# To import a flake module
|
||||
# 1. Add foo to inputs
|
||||
# 2. Add foo as a parameter to the outputs function
|
||||
# 3. Add here: foo.flakeModule
|
||||
];
|
||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||
perSystem = {
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
# Per-system attributes can be defined here. The self' and inputs'
|
||||
# module parameters provide easy access to attributes of the same
|
||||
# system.
|
||||
|
||||
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
||||
packages.default = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "lutgen";
|
||||
version = "git-${inputs.lutgen-src.lastModifiedDate}";
|
||||
src = inputs.lutgen-src;
|
||||
cargoLock = {
|
||||
lockFile = inputs.lutgen-lock;
|
||||
};
|
||||
};
|
||||
};
|
||||
flake = {
|
||||
# The usual flake attributes can be defined here, including system-
|
||||
# agnostic ones like nixosModule and system-enumerating ones, although
|
||||
# those are more easily expressed in perSystem.
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
/nix/store/xdms5kxx5gzkjfsfkaz3akvh0y8vqx1r-source
|
|
@ -135,8 +135,8 @@ keys.extend([
|
|||
layout_theme = dict(
|
||||
margin=#GAPS,
|
||||
border_width=#BORDERWIDTH,
|
||||
border_focus="#BORDERFOCUS",
|
||||
border_normal="#BORDERCOL",
|
||||
border_focus=[ "#BORDERCOL", "#BORDERFOCUS", "#BORDERCOL", ],
|
||||
border_normal=["#BORDERCOL", "#BORDERCOL", "#BORDERCOL", ],
|
||||
)
|
||||
|
||||
layouts = [
|
||||
|
@ -162,11 +162,11 @@ screens = [
|
|||
[
|
||||
widget.GroupBox(**widget_defaults),
|
||||
widget.WindowTabs(**widget_defaults),
|
||||
widget.Spacer(),
|
||||
widget.CurrentLayout(**widget_defaults),
|
||||
widget.Volume(**widget_defaults),
|
||||
widget.Systray(**widget_defaults),
|
||||
widget.Clock(**widget_defaults)
|
||||
# widget.Clock('%B %d %a %I:%M %p'),
|
||||
widget.Clock(**widget_defaults),
|
||||
],
|
||||
16,
|
||||
)
|
||||
|
@ -179,8 +179,25 @@ follow_mouse_focus = True
|
|||
bring_front_click = False
|
||||
cursor_warp = True
|
||||
focus_on_window_activation = "smart"
|
||||
auto_fullscreen = True
|
||||
|
||||
floating_layout = layout.Floating(float_rules=[
|
||||
*layout.Floating.default_float_rules,
|
||||
], **layout_theme)
|
||||
|
||||
|
||||
@hook.subscribe.startup
|
||||
def autostart():
|
||||
home = os.path.expanduser("~/.config/qtile/autostart.sh")
|
||||
subprocess.Popen([home])
|
||||
|
||||
@hook.subscribe.client_new
|
||||
def float_firefox(client):
|
||||
if "firefox" in client.get_wm_class() and client.name == "Library":
|
||||
client.enable_floating()
|
||||
|
||||
@hook.subscribe.client_new
|
||||
def fullscreen_wlogout(client):
|
||||
if client.name == "wlogout":
|
||||
client.enable_fullscreen()
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ in {
|
|||
config.xdg.configFile."qtile/config.py" = {
|
||||
enable = true;
|
||||
executable = true;
|
||||
onChange = "pkill -SIGUSR1 qtile";
|
||||
onChange = "${lib.getExe' pkgs.procps "pkill"} -SIGUSR1 qtile";
|
||||
text = with palette-shex;
|
||||
with pkgs.rice; (builtins.replaceStrings
|
||||
[
|
||||
|
@ -31,7 +31,7 @@ in {
|
|||
(builtins.toString borders.gaps_in)
|
||||
(builtins.toString borders.thickness)
|
||||
bright.yellow
|
||||
util.bg
|
||||
normal.black
|
||||
fonts.sans.name
|
||||
(builtins.toString fonts.sans.size)
|
||||
util.bg
|
||||
|
|
|
@ -152,8 +152,6 @@
|
|||
rnix-lsp
|
||||
nixd
|
||||
|
||||
# tailscale
|
||||
|
||||
home-manager
|
||||
cachix
|
||||
|
||||
|
@ -164,7 +162,6 @@
|
|||
git
|
||||
|
||||
nix-index
|
||||
# comma
|
||||
starship
|
||||
|
||||
cachix
|
||||
|
@ -180,6 +177,16 @@
|
|||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.nix-index.enableBashIntegration = false;
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall = {
|
||||
# trustedInterfaces = ["tailscale0"];
|
||||
checkReversePath = "loose";
|
||||
};
|
||||
|
||||
# programs.sway = {
|
||||
# # to use home-manager
|
||||
# package = null;
|
||||
|
@ -191,14 +198,6 @@
|
|||
# # extraPackages = with pkgs; [swaylock swayidle foot dmenu vulkan-validation-layers];
|
||||
# };
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall = {
|
||||
# trustedInterfaces = ["tailscale0"];
|
||||
checkReversePath = "loose";
|
||||
};
|
||||
|
||||
# systemd.services.fixNetworkingForTailscale = {
|
||||
# wantedBy = ["multi-user.target"];
|
||||
# after = ["network.target" "mullvad-daemon.service"];
|
||||
|
|
|
@ -9,8 +9,8 @@ in
|
|||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nana-4";
|
||||
repo = "materia-theme";
|
||||
rev = "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984";
|
||||
sha256 = "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k=";
|
||||
rev = "6e5850388a25f424b8193fe4523504d1dc364175";
|
||||
sha256 = "sha256-I6hpH0VTmftU4+/pRbztuTQcBKcOFBFbNZXJL/2bcgU=";
|
||||
};
|
||||
buildInputs = with pkgs; [
|
||||
sassc
|
||||
|
|
|
@ -90,17 +90,25 @@ in rec {
|
|||
};
|
||||
|
||||
borders = {
|
||||
thickness = 2;
|
||||
thickness = 6;
|
||||
rounding = 0;
|
||||
gaps_in = 6;
|
||||
gaps_out = 6;
|
||||
};
|
||||
|
||||
bg = {
|
||||
image = builtins.path {
|
||||
name = "wallpaper";
|
||||
path = ./wallpaper.png;
|
||||
sha256 = "a98b32664ab456d088225a19c0fc7e672a8fccd6a30129fdb2ff11d25e766b17";
|
||||
# image = builtins.path rec {
|
||||
# name = "wallpaper.jpg";
|
||||
# path = ../${name};
|
||||
# sha256 = "ec88d7005a97f104784e53ecaef883d33cf53f76cf4a6e89d05980bbc844c772";
|
||||
# };
|
||||
image = prev.callPackage ./wallpaper.nix {} {
|
||||
palette = palette.toRGBShortHex final.rice.palette;
|
||||
wallpaper = builtins.path rec {
|
||||
name = "wallpaper.jpg";
|
||||
path = ../${name};
|
||||
sha256 = "2db3f9d0397fbd4746ada297bd14c0c7d3e22c7d4e894968fcfece90bbfb902a";
|
||||
};
|
||||
};
|
||||
};
|
||||
}; # /rice
|
||||
|
|
20
util/wallpaper.nix
Normal file
20
util/wallpaper.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{pkgs}: {
|
||||
palette,
|
||||
wallpaper,
|
||||
}: let
|
||||
str_pal = with pkgs.lib; concatStringsSep " " (builtins.foldl' (acc: el: acc ++ (attrValues el)) [] [palette.normal palette.bright palette.util]);
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = "generated-wallpaper.png";
|
||||
src = wallpaper;
|
||||
buildInputs = [
|
||||
pkgs.lutgen
|
||||
];
|
||||
|
||||
phases = ["installPhase"];
|
||||
|
||||
installPhase = ''
|
||||
echo -e "Generating wallpaper from ${wallpaper} using palette:\n${str_pal}.."
|
||||
${pkgs.lib.getExe pkgs.lutgen} apply --lum 0.8 -l 10 -s 128 -n 8 -o $out ${wallpaper} -- ${str_pal}
|
||||
'';
|
||||
}
|
BIN
wallpaper.jpg
Normal file
BIN
wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 MiB |
BIN
wallpaper.png
BIN
wallpaper.png
Binary file not shown.
Before Width: | Height: | Size: 7.5 MiB |
Loading…
Add table
Add a link
Reference in a new issue