feat(xorg): added wallpaper for xorg

feat(gtk): added theming
This commit is contained in:
Patrick 2023-09-16 21:29:12 +02:00
parent e6e2e63cf6
commit 2a34aeeb08
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
12 changed files with 138 additions and 16 deletions

View file

@ -38,4 +38,6 @@
interval = "weekly";
};
};
# TODO remove once this is upstreamed
boot.initrd.systemd.services."zfs-import-rpool".after = ["cryptsetup.target"];
}

View file

@ -5,5 +5,6 @@
./polybar.nix
./autorandr.nix
./i3.nix
./wallpapers.nix
];
}

View file

@ -1,6 +1,21 @@
{
config,
lib,
...
}: {
xsession.windowManager.i3 = {
enable = true;
config = import ../sway3.nix;
config =
lib.attrsets.recursiveUpdate
(import ../sway3.nix)
{
menu = "rofi -show drun";
keybindings = let
cfg = config.xsession.windowManager.i3.config;
in {
"Menu" = "exec ${cfg.menu}";
"${cfg.modifier}+c" = "exec ${cfg.menu}";
};
};
};
}

View file

@ -0,0 +1,42 @@
{
config,
pkgs,
...
}: let
wallpaper-folder = "${config.home.homeDirectory}/.local/share/wallpapers";
exe =
pkgs.writeShellScript "set-wallpaper"
''
for D in /tmp/.X11-unix/*; do
file=$(${pkgs.coreutils}/bin/basename $D)
DISPLAY=":''${file:1}" ${pkgs.feh}/bin/feh --bg-fill --randomize --recursive ${wallpaper-folder}/
done
'';
in {
systemd.user = {
timers = {
set-wallpaper = {
Unit = {
Description = "Set a random wallpaper every 3 minutes";
};
Timer = {
OnActiveSec = "0 sec";
OnUnitActiveSec = "3 min";
};
Install.WantedBy = ["timers.target"];
};
};
services = {
set-wallpaper = {
Unit = {
Description = "Set a random wallpaper on all X displays";
};
Service = {
Type = "oneshot";
ExecStart =
exe;
};
};
};
};
}

View file

@ -3,6 +3,7 @@
./kitty.nix
./Xorg
./firefox.nix
./themes.nix
];
home = {
packages = with pkgs; [
@ -21,7 +22,4 @@
# notification are nice to have
services.dunst.enable = true;
gtk.gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
}

View file

@ -16,6 +16,7 @@
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
};
xdg.mimeApps.enable = true;
programs.firefox = {
enable = true;
profiles.patrick = {

View file

@ -0,0 +1,57 @@
{
pkgs,
config,
...
}: {
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Original-Ice";
size = 24;
};
xresources.properties = {
"Xft.hinting" = true;
"Xft.antialias" = true;
"Xft.autohint" = false;
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintfull";
"Xft.rgba" = "rgb";
};
gtk = let
gtk34extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-size = 32;
gtk-enable-animations = true;
gtk-xft-antialias = 1;
gtk-xft-dpi = 96; # XXX: delete for wayland?
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintfull";
gtk-xft-rgba = "rgb";
};
in {
enable = true;
iconTheme = {
name = "Vimix-Doder";
package = pkgs.vimix-icon-theme;
};
theme = {
name = "Orchis-purple-solid-black";
package = pkgs.orchis-theme;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme = true";
gtk3.extraConfig = gtk34extraConfig;
gtk4.extraConfig = gtk34extraConfig;
};
home.sessionVariables.GTK_THEME = config.gtk.theme.name;
qt = {
enable = true;
platformTheme = "gtk";
};
}

View file

@ -2,6 +2,7 @@
config,
pkgs,
nixosConfig,
lib,
...
}: {
home.packages = [
@ -10,8 +11,9 @@
wayland.windowManager.sway = {
enable = true;
config =
lib.attrsets.recursiveUpdate
(import ../sway3.nix)
// {
{
menu = "fuzzel";
input = {
"*" = {

View file

@ -4,12 +4,16 @@
...
}: {
home.persistence."/state" = {
files = with lib.lists; [
".ssh/known_hosts"
".cache/fuzzel"
];
files = with lib.lists;
[
".ssh/known_hosts"
".cache/fuzzel"
]
++ optionals config.programs.rofi.enable [
".cache/rofi3.druncache"
];
directories = with lib.lists;
[]
[".config/dconf"]
++
# firefox cannot be a symlink as home manager refuses put files outside your $HOME
optionals config.programs.firefox.enable [

View file

@ -1,12 +1,10 @@
{
pkgs,
lib,
...
}: {
{pkgs, ...}: {
home.packages = with pkgs; [
bottles
winetricks
wineWowPackages.fonts
wineWowPackages.stagingFull
];
# To enable dark mode use the command:
# dconf write /com/usebottles/bottles/dark-theme true
}

View file

@ -1,4 +1,4 @@
_: {
{pkgs, ...}: {
home.shellAliases = {
# Aliases
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
@ -24,5 +24,6 @@ _: {
rg = "rg -S";
zf = "zathura --fork";
gdb = "${pkgs.pwndbg}/bin/pwndbg";
};
}

View file

@ -4,6 +4,7 @@
nextcloud-client
discord
netflix
pwndbg
];
};
}