wallpaper

This commit is contained in:
Adrian Gunnar Lauterer 2024-09-17 18:14:26 +02:00
parent 8df49e4231
commit 622a6afcb0
10 changed files with 250 additions and 94 deletions

View File

@ -9,6 +9,11 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";
# stylix.url = "github:bluskript/stylix/6bc871ab352c9f18d1179daab9e392a4d46393af";
# stylix.inputs.nixpkgs.follows = "nixpkgs";
# stylix.inputs.home-manager.follows = "home-manager";
ozai.url = "git+https://git.pvv.ntnu.no/Projects/ozai.git"; ozai.url = "git+https://git.pvv.ntnu.no/Projects/ozai.git";
ozai.inputs.nixpkgs.follows = "unstable"; ozai.inputs.nixpkgs.follows = "unstable";
@ -65,6 +70,9 @@
home-manager.users."gunalx" = import ./home/full.nix; home-manager.users."gunalx" = import ./home/full.nix;
home-manager.extraSpecialArgs = {inherit nix-colors inputs;}; home-manager.extraSpecialArgs = {inherit nix-colors inputs;};
} }
#need to choose one. The nixos one has bootloader and display manager in addition to the home manager one.
#inputs.stylix.nixosModules.stylix
#inputs.stylix.homeManagerModules.stylix
]; ];
}; };

19
home/assets/default.nix Normal file
View File

@ -0,0 +1,19 @@
{ stdenv, lib }:
stdenv.mkDerivation rec {
pname = "wallpapers";
version = "1.0";
src = ./;
installPhase = ''
mkdir -p $out/share/wallpapers
cp -r * $out/share/wallpapers/
'';
meta = with lib; {
description = "My Collection of wallpapers";
license = licenses.unfree;
maintainers = with maintainers; [ adriangl ];
};
}

View File

@ -56,32 +56,6 @@ in{
}; };
}; };
programs.foot.settings.colors = {
alpha = "0.85";
#set based on https://github.com/tinted-theming/base16-foot/blob/main/colors/base16-apathy.ini and https://github.com/tinted-theming/base16-schemes/blob/main/apathy.yaml
foreground = "${config.colorScheme.palette.base05}";
background = "${config.colorScheme.palette.base00}";
regular0 = "${config.colorScheme.palette.base00}";
regular1 = "${config.colorScheme.palette.base08}";
regular2 = "${config.colorScheme.palette.base0B}";
regular3 = "${config.colorScheme.palette.base0A}";
regular4 = "${config.colorScheme.palette.base0D}";
regular5 = "${config.colorScheme.palette.base0E}";
regular6 = "${config.colorScheme.palette.base0C}";
regular7 = "${config.colorScheme.palette.base05}";
bright0 = "${config.colorScheme.palette.base03}";
bright1 = "${config.colorScheme.palette.base08}";
bright2 = "${config.colorScheme.palette.base0B}";
bright3 = "${config.colorScheme.palette.base0A}";
bright4 = "${config.colorScheme.palette.base0D}";
bright5 = "${config.colorScheme.palette.base0E}";
bright6 = "${config.colorScheme.palette.base0C}";
bright7 = "${config.colorScheme.palette.base07}";
selection-foreground = "${config.colorScheme.palette.base00}";
selection-background = "${config.colorScheme.palette.base0A}";
};
} }

View File

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, lib, config, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
foot foot
@ -14,7 +14,40 @@
}; };
mouse = { mouse = {
hide-when-typing = "yes"; hide-when-typing = "yes";
}; };
colors = {
alpha = "0.7";
#set based on https://github.com/tinted-theming/base16-foot/blob/main/colors/base16-apathy.ini and https://github.com/tinted-theming/base16-schemes/blob/main/apathy.yaml
foreground = "${config.colorScheme.palette.base05}";
background = "${config.colorScheme.palette.base00}";
regular0 = "${config.colorScheme.palette.base00}";
regular1 = "${config.colorScheme.palette.base08}";
regular2 = "${config.colorScheme.palette.base0B}";
regular3 = "${config.colorScheme.palette.base0A}";
regular4 = "${config.colorScheme.palette.base0D}";
regular5 = "${config.colorScheme.palette.base0E}";
regular6 = "${config.colorScheme.palette.base0C}";
regular7 = "${config.colorScheme.palette.base05}";
bright0 = "${config.colorScheme.palette.base03}";
bright1 = "${config.colorScheme.palette.base08}";
bright2 = "${config.colorScheme.palette.base0B}";
bright3 = "${config.colorScheme.palette.base0A}";
bright4 = "${config.colorScheme.palette.base0D}";
bright5 = "${config.colorScheme.palette.base0E}";
bright6 = "${config.colorScheme.palette.base0C}";
bright7 = "${config.colorScheme.palette.base07}";
selection-foreground = "${config.colorScheme.palette.base00}";
selection-background = "${config.colorScheme.palette.base0A}";
};
}; };

View File

@ -6,6 +6,8 @@
./sway.nix ./sway.nix
./colors.nix ./colors.nix
#./stylix.nix
#inputs.nix-colors.homeManagerModules.default #inputs.nix-colors.homeManagerModules.default
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [

View File

@ -13,6 +13,41 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
compression = true; compression = true;
matchBlocks = {
"*.ntnu.no !*.pvv.ntnu.no" = {
user="adriangl";
proxyJump="isvegg.pvv.ntnu.no";
};
"snotra" = {
user="adriangl";
proxyJump="isvegg.pvv.ntnu.no";
host="snotra.idi.ntnu.no";
};
#pvv
"pvv" = {
user="adriangl";
host="login.pvv.ntnu.no";
match="pvv";
};
"isvegg" = {
user="adriangl";
host="isvegg.pvv.ntnu.no";
};
#home
"aragon" = {
port = 6969;
user="gunalx";
host = "100.74.34.149";
};
};
extraConfig = ""; extraConfig = "";
}; };
} }

42
home/stylix.nix Normal file
View File

@ -0,0 +1,42 @@
{ pkgs, lib, ... }:
{
stylix.enable = true;
stylix.image = ./assets/wallpaper.jpg;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/apathy.yaml";
stylix.fonts = {
monospace = {
package = pkgs.nerdfonts.override {fonts = [JetBrainsMono];};
name = JetBrainsMono Nerd Font Mono;
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = DejaVu Sans;
};
serif = {
package = pkgs.dejavu_fonts;
name = DejaVu Serif;
};
};
stylix.fonts.sizes = {
applications = 16;
terminal = 12;
desktop = 12;
popups = 12;
};
stylix.opacity = {
applications = 0.9;
terminal = 0.7;
desktop = 0.9;
popups = 0.9;
};
stylix.polarity = "dark"; # “light” or “either”
}

View File

@ -1,12 +1,11 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
let let
wallpapers = import ./wallpaper.nix { inherit pkgs; };
palette = config.colorScheme.palette; palette = config.colorScheme.palette;
in in
{ {
imports = [ imports = [
#./fuzzle.nix ./waybar.nix
#./wofi.nix
#./waybar.nix
./foot.nix ./foot.nix
./fonts.nix ./fonts.nix
./kanshi.nix ./kanshi.nix
@ -30,7 +29,8 @@ in
wdisplays wdisplays
kanshi kanshi
wlr-randr wlr-randr
swaybg #swaybg
swww
#bar applets and notifications #bar applets and notifications
waybar waybar
@ -83,7 +83,7 @@ in
]; ];
qt.enable = true; qt.enable = true;
qt.style.name = "breeze"; qt.style.name = "adwaita-dark";
home.sessionVariables = { home.sessionVariables = {
@ -91,7 +91,7 @@ in
MOZ_USE_XINPUT2 = "1"; MOZ_USE_XINPUT2 = "1";
XDG_SESSION_TYPE = "wayland"; XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "sway"; XDG_CURRENT_DESKTOP = "sway";
XKB_DEFAULT_OPTIONS = "terminate:ctrl_alt_bksp,caps:escape,altwin:swap_alt_win"; XKB_DEFAULT_OPTIONS = "terminate:ctrl_alt_bksp,caps:escape";
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland";
# needs qt5.qtwayland in systemPackages # needs qt5.qtwayland in systemPackages
@ -111,14 +111,16 @@ wayland.windowManager.sway = let
cfg = config.wayland.windowManager.sway; cfg = config.wayland.windowManager.sway;
in { in {
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
systemd.enable = true;
enable = true; enable = true;
systemd.enable = true;
config = rec { config = rec {
modifier = "Mod4"; modifier = "Mod4";
terminal = "footclient"; terminal = "footclient";
menu = "fuzzel"; menu = "fuzzel -b ${palette.base00}BB -t ${palette.base05}FF";
bars = [{ bars = [{
fonts.size = 16.0; fonts.size = 16.0;
command = "waybar"; command = "waybar";
@ -126,6 +128,9 @@ in {
}]; }];
startup = [ startup = [
{command = "foot --server";} {command = "foot --server";}
{command = "swww-daemon";}
{command = ''while true; do for wallpaper in $WALLPAPER_DIR/*; do swww img "$wallpaper"; sleep 300; done; done'';}
{command = "firefox";} {command = "firefox";}
{command = "nm-applet";} {command = "nm-applet";}
{command = "autotiling-rs";} {command = "autotiling-rs";}
@ -214,9 +219,7 @@ in {
"${cfg.config.modifier}+r" = "mode resize"; "${cfg.config.modifier}+r" = "mode resize";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"F3" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"F2" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-"; "XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
@ -230,12 +233,12 @@ in {
"${cfg.config.modifier}+Shift+c" = "exec code"; "${cfg.config.modifier}+Shift+c" = "exec code";
"${cfg.config.modifier}+f11" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png"; "${cfg.config.modifier}+f11" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png";
"${cfg.config.modifier}+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png"; "${cfg.config.modifier}+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png";
"${cfg.config.modifier}+tab" = "workspace back_and_forth"; "${cfg.config.modifier}+tab" = "workspace next";
"Alt+tab" = "workspace back_and_forth";
}; };
}; };
extraConfig = '' extraConfig = ''
set $mod Mod4
input type:keyboard xkb_capslock disabled input type:keyboard xkb_capslock disabled
input type:keyboard xkb_numlock enabled input type:keyboard xkb_numlock enabled
xwayland enable xwayland enable
@ -247,10 +250,10 @@ in {
default_floating_border pixel 2 default_floating_border pixel 2
titlebar_border_thickness 1 titlebar_border_thickness 1
client.focused ${palette.base0D} ${palette.base00} ${palette.base05} ${palette.base0D} ${palette.base0D} client.focused #${palette.base0D} #${palette.base00} #${palette.base05} #${palette.base0D} #${palette.base0D}
client.focused_inactive ${palette.base0D} ${palette.base00} ${palette.base05} ${palette.base0D} ${palette.base0D} client.focused_inactive #${palette.base0D} #${palette.base00} #${palette.base05} #${palette.base0D} #${palette.base0D}
client.unfocused ${palette.base0D} ${palette.base03} ${palette.base05} ${palette.base0D} ${palette.base00} client.unfocused #${palette.base0D} #${palette.base03} #${palette.base05} #${palette.base0D} #${palette.base00}
client.urgent ${palette.base0D} ${palette.base0D} ${palette.base03} ${palette.base0D} client.urgent #${palette.base0D} #${palette.base0D} #${palette.base03} #${palette.base0D} #${palette.base00}
for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable
for_window [title="(?:Open|Save) (?:File|Folder|As)"] resize set 1920 1080 for_window [title="(?:Open|Save) (?:File|Folder|As)"] resize set 1920 1080

18
home/wallpapers.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs, ... }:
let
wallpapers = pkgs.callPackage ./assets {};
in
{
environment.systemPackages = [
wallpapers
];
home.packages = [
wallpapers
];
home.sessionVariables = {
WALLPAPER_DIR = "${wallpapers}/share/wallpapers";
};
}

View File

@ -1,14 +1,17 @@
{ pkgs, config, nix-colors, ... }: { pkgs, inputs, lib, config, nix-colors, ... }:
let {
palette = config.colorScheme.palette;
in{
imports = [ imports = [
]; ];
programs.waybar = { programs.waybar = let
inherit (inputs.nix-colors.lib.conversions) hexToRGBString;
inherit (config.colorscheme) colors;
inherit (config.colorscheme) palette;
toRGBA = color: opacity: "rgba(${hexToRGBString "," (lib.removePrefix "#" color)},${opacity})";
in {
enable = true; enable = true;
@ -22,9 +25,9 @@ in{
} }
window#waybar { window#waybar {
background-color: #${palette.base00}50; background-color: #${palette.base00};
border-bottom: 3px solid #${palette.base03}50; border-bottom: 3px solid #${palette.base03};
color: ${palette.base05}; color: ${toRGBA palette.base05 "0.7"};
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
} }
@ -77,7 +80,7 @@ button:hover {
} }
#workspaces button:hover { #workspaces button:hover {
background: #${palette.base00}20; background: #${palette.base00};
} }
#workspaces button.focused { #workspaces button.focused {
@ -166,48 +169,55 @@ button:hover {
padding-right: 15px; padding-right: 15px;
} }
/*0b also looked good though. */
#power-profiles-daemon.performance { #power-profiles-daemon.performance {
background-color: #${palette.base08}; background-color: #${palette.base04};
color: #${palette.base05}; color: #${palette.base00};
} }
#power-profiles-daemon.balanced { #power-profiles-daemon.balanced {
background-color: #${palette.base0D}; background-color: #${palette.base04};
color: #${palette.base05}; color: #${palette.base00};
} }
#power-profiles-daemon.power-saver { #power-profiles-daemon.power-saver {
background-color: #${palette.base0B}; background-color: #${palette.base04};
color: ${palette.base00}; color: #${palette.base00};
} }
label:focus { label:focus {
background-color: #${palette.base00}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#cpu { #cpu {
background-color: #${palette.base0B}; background-color: #${palette.base04};
color: ${palette.base00}; color: #${palette.base00};
} }
#memory { #memory {
background-color: #${palette.base0E}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#disk { #disk {
background-color: #${palette.base09}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#backlight { #backlight {
background-color: #${palette.base0C}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#network { #network {
background-color: #${palette.base0D}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#network.disconnected { #network.disconnected {
background-color: #${palette.base08}; background-color: #${palette.base0E};
color: #${palette.base00};
} }
#pulseaudio { #pulseaudio {
@ -216,7 +226,7 @@ label:focus {
} }
#pulseaudio.muted { #pulseaudio.muted {
background-color: #${palette.base0C}; background-color: #${palette.base0E};
color: #${palette.base03}; color: #${palette.base03};
} }
@ -226,33 +236,39 @@ label:focus {
} }
#wireplumber.muted { #wireplumber.muted {
background-color: #${palette.base08}; background-color: #${palette.base0E};
color: #${palette.base00};
} }
#custom-media { #custom-media {
background-color: #${palette.base0B}; background-color: #${palette.base04};
color: #${palette.base03}; color: #${palette.base00};
min-width: 100px; min-width: 100px;
} }
#custom-media.custom-spotify { #custom-media.custom-spotify {
background-color: #${palette.base0B}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#custom-media.custom-vlc { #custom-media.custom-vlc {
background-color: #${palette.base09}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#temperature { #temperature {
background-color: #${palette.base0A}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#temperature.critical { #temperature.critical {
background-color: #${palette.base08}; background-color: #${palette.base0E};
color: #${palette.base00};
} }
#tray { #tray {
background-color: #${palette.base0D}; background-color: #${palette.base04};
color: #${palette.base00};
} }
#tray > .passive { #tray > .passive {
@ -261,25 +277,28 @@ label:focus {
#tray > .needs-attention { #tray > .needs-attention {
-gtk-icon-effect: highlight; -gtk-icon-effect: highlight;
background-color: #${palette.base08};
}
#idle_inhibitor {
background-color: #${palette.base00};
}
#idle_inhibitor.activated {
background-color: #${palette.base07}; background-color: #${palette.base07};
color: #${palette.base00}; color: #${palette.base00};
} }
#idle_inhibitor {
background-color: #${palette.base04};
color: #${palette.base00};
}
#idle_inhibitor.activated {
background-color: #${palette.base06};
color: #${palette.base00};
}
#mpd { #mpd {
background-color: #${palette.base0B}; background-color: #${palette.base04};
color: #${palette.base03}; color: #${palette.base00};
} }
#mpd.disconnected { #mpd.disconnected {
background-color: #${palette.base08}; background-color: #${palette.base06};
color: #${palette.base00};
} }
#mpd.stopped { #mpd.stopped {
@ -291,15 +310,15 @@ label:focus {
} }
#language { #language {
background: #${palette.base0C}; background: #${palette.base04};
color: #${palette.base0E}; color: #${palette.base00};
padding: 0 5px; padding: 0 5px;
margin: 0 5px; margin: 0 5px;
min-width: 16px; min-width: 16px;
} }
#keyboard-state { #keyboard-state {
background: #${palette.base0B}; background: #${palette.base04};
color: #${palette.base00}; color: #${palette.base00};
padding: 0 0px; padding: 0 0px;
margin: 0 5px; margin: 0 5px;
@ -311,11 +330,13 @@ label:focus {
} }
#keyboard-state > label.locked { #keyboard-state > label.locked {
background: #${palette.base00}20; background: #${palette.base04};
color: #${palette.base00};
} }
#scratchpad { #scratchpad {
background: #${palette.base00}20; background: #${palette.base00};
color: #${palette.base00};
} }
#scratchpad.empty { #scratchpad.empty {
@ -324,15 +345,16 @@ label:focus {
#privacy { #privacy {
padding: 0; padding: 0;
color: #${palette.base04};
} }
#privacy-item { #privacy-item {
color: #${palette.base00};
padding: 0 5px; padding: 0 5px;
color: #${palette.base05};
} }
#privacy-item.screenshare { #privacy-item.screenshare {
background-color: #${palette.base09}; background-color: #${palette.base00};
} }
#privacy-item.audio-in { #privacy-item.audio-in {