From 1ae71eba14390ff21916d5d1393cbcdb1c73d09e Mon Sep 17 00:00:00 2001
From: Nate Anderson <n8r@tuta.io>
Date: Mon, 15 Jan 2024 22:07:47 -0700
Subject: [PATCH] Added jaci kde edition, added autostart and other niceties to
 sway config

---
 flake.nix                                     |  18 ++
 jaci/default.nix                              |  39 ++++
 jaci/desktop-configuration.nix                |  94 ++++++++
 jaci/modules/apps/firefox/firefox.nix         |  66 ++++++
 jaci/modules/home-manager/home.nix            | 203 ++++++++++++++++++
 jaci/modules/kde/kde_conf.nix                 |  69 ++++++
 jaci/modules/user/main_user.nix               |  53 +++++
 jaci/nixos/hardware-configuration.nix         |  44 ++++
 nate/default.nix                              |  37 +++-
 nate/desktop-configuration.nix                |   1 +
 nate/dotfiles/sway/config.d/output            |   1 +
 nate/dotfiles/sway/scripts/background.sh      |   2 +-
 nate/dotfiles/sway/scripts/import-gsettings   |   2 +-
 nate/dotfiles/sway/scripts/scale.sh           |   2 +-
 nate/dotfiles/sway/scripts/screenshot.sh      |   2 +-
 nate/dotfiles/sway/scripts/weather.sh         |  15 --
 nate/dotfiles/waybar/scripts/PBPbattery.sh    |  21 --
 .../waybar/scripts/keyboard_layout.sh         |   2 +-
 nate/dotfiles/waybar/scripts/keyhint.sh       |   2 -
 nate/dotfiles/waybar/scripts/weather.sh       |  13 --
 nate/modules/home-manager/home.nix            |  21 +-
 nate/modules/sway/sway_conf.nix               |   4 +
 22 files changed, 644 insertions(+), 67 deletions(-)
 create mode 100644 jaci/default.nix
 create mode 100644 jaci/desktop-configuration.nix
 create mode 100644 jaci/modules/apps/firefox/firefox.nix
 create mode 100644 jaci/modules/home-manager/home.nix
 create mode 100644 jaci/modules/kde/kde_conf.nix
 create mode 100644 jaci/modules/user/main_user.nix
 create mode 100644 jaci/nixos/hardware-configuration.nix
 delete mode 100755 nate/dotfiles/sway/scripts/weather.sh
 delete mode 100755 nate/dotfiles/waybar/scripts/PBPbattery.sh
 delete mode 100755 nate/dotfiles/waybar/scripts/keyhint.sh
 delete mode 100755 nate/dotfiles/waybar/scripts/weather.sh

diff --git a/flake.nix b/flake.nix
index 8c2203d..6efe698 100644
--- a/flake.nix
+++ b/flake.nix
@@ -47,6 +47,24 @@
             ./nate/default.nix
         ];
       };
+      jaci = nixpkgs.lib.nixosSystem {
+        # Pass args to desktop configuration
+        specialArgs = {
+            inherit inputs outputs timeZone system;
+        };
+        modules = [
+            # Setup home manager
+            inputs.home-manager.nixosModules.home-manager {
+                home-manager.useGlobalPkgs = true;
+                home-manager.useUserPackages = true;
+                home-manager.users.jaci = import ./jaci/modules/home-manager/home.nix;
+                home-manager.extraSpecialArgs = {
+                    inherit inputs outputs;
+                };
+            }
+            ./jaci/default.nix
+        ];
+      };
     };
   };
 }
diff --git a/jaci/default.nix b/jaci/default.nix
new file mode 100644
index 0000000..c8fbdf7
--- /dev/null
+++ b/jaci/default.nix
@@ -0,0 +1,39 @@
+{ config, lib, inputs, outputs, pkgs, system, timeZone, ... }:
+  let
+    userName = "jaci";
+    fullName = "Jaci Anderson";
+    email = "jaci.s.anderson@gmail.com";
+    hostName = "meowyxlife";
+    desktop = "kde";
+    gaming = true;
+  in
+{
+  imports = [
+      ./desktop-configuration.nix
+      ./nixos/hardware-configuration.nix
+  ];
+
+  deskCfg = {
+      userName = userName;
+      hostName = hostName;
+      de = desktop;
+      installGaming = gaming;
+  };
+
+  # Limit the number of generations to keep
+  boot.loader.systemd-boot.configurationLimit = 5;
+
+  # Perform garbage collection weekly to maintain low disk usage
+  nix.gc = {
+    automatic = true;
+    dates = "weekly";
+    options = "--delete-older-than 1w";
+  };
+
+  # Optimize storage
+  # You can also manually optimize the store via:
+  #    nix-store --optimise
+  # Refer to the following link for more details:
+  # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
+  nix.settings.auto-optimise-store = true;
+}
diff --git a/jaci/desktop-configuration.nix b/jaci/desktop-configuration.nix
new file mode 100644
index 0000000..97b1423
--- /dev/null
+++ b/jaci/desktop-configuration.nix
@@ -0,0 +1,94 @@
+{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }:
+let
+  supportedDesktops = [ "kde" ];
+  supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
+  deskCfg = config.deskCfg;
+in
+{
+  options.deskCfg = {
+      de = lib.mkOption {
+          default = "kde";
+          type = lib.types.str;
+          description = "Desktop Environment";
+      };
+      userName = lib.mkOption {
+          type = lib.types.str;
+          description = "Main username for system";
+      };
+      hostName = lib.mkOption {
+          type = lib.types.str;
+          description = "Hostname for system";
+      };
+      installGaming = lib.mkOption {
+          type = lib.types.bool;
+          default = true;
+          description = "Whether to install gaming software or not";
+      };
+  };
+
+   imports = [
+     modules/user/main_user.nix
+     modules/kde/kde_conf.nix
+   ];
+
+   config = {
+    assertions = [
+      {
+        assertion = builtins.elem deskCfg.de supportedDesktops;
+        message = "Unsupported desktop environment: ${deskCfg.de}\nSupported DE's: ${supportedDesktopsStr}";
+      }
+    ];
+
+    nixpkgs.overlays = [
+      inputs.nur.overlay
+    ];
+
+    # Enable flakes feature
+    nix.settings.experimental-features = [
+      "nix-command" "flakes"
+    ];
+
+    # Use the systemd-boot EFI boot loader.
+    boot.loader.systemd-boot.enable = true;
+    boot.loader.efi.canTouchEfiVariables = true;
+    boot.plymouth.enable = true;
+
+    networking.hostName = deskCfg.hostName; # Define your hostname.
+    networking.networkmanager.enable = true;  # Easiest to use and most distros use this by default.
+
+    time.timeZone = timeZone;
+
+
+    users.users.${deskCfg.userName} = {
+        isNormalUser = true;
+        initialPassword = "password";
+        description = "main user";
+        shell = pkgs.zsh;
+        extraGroups = [
+            "wheel"
+            "networkmanager"
+            "corectrl"
+            deskCfg.userName
+            "video"
+            "audio"
+        ];
+    };
+       # main_user = {
+    #   enable = true;
+    #   userName = deskCfg.userName;
+    #   isDesktopUser = true;
+    # };
+    
+    kde = {
+        enable = true;
+        useNonFree = true;
+        installGaming = deskCfg.installGaming;
+        systemPackages = with pkgs; [
+          libreoffice
+        ];
+    };
+   
+    system.stateVersion = "23.11"; # Did you read the comment?
+  };
+}
+
diff --git a/jaci/modules/apps/firefox/firefox.nix b/jaci/modules/apps/firefox/firefox.nix
new file mode 100644
index 0000000..1b9dae5
--- /dev/null
+++ b/jaci/modules/apps/firefox/firefox.nix
@@ -0,0 +1,66 @@
+{lib, config, pkgs, inputs, ...}:
+let
+  cfg = config.firefoxApp;
+in
+{
+    # imports = [
+    #     inputs.nur.hmModules.nur
+    # ];
+
+    options.firefoxApp = {
+        enable = lib.mkEnableOption "enable firefox browser";
+    };
+    config = lib.mkIf cfg.enable {
+        programs.firefox = {
+            enable = true;
+            profiles = {
+                default = {
+                    id = 0;
+                    name = "default";
+                    isDefault = true;
+                    extensions = with pkgs; [
+                        nur.repos.rycee.firefox-addons.darkreader
+                        nur.repos.rycee.firefox-addons.keepassxc-browser
+                        nur.repos.crazazy.firefox-addons.ublock-origin
+                    ];
+                    search = {
+                        # Replace default firefox search engine config with this one
+                        force = true;
+                        default = "Startpage";
+                        engines = {
+                            "Startpage" = {
+                                urls = [{
+                                    template = "https://www.startpage.com/sp/search?query={searchTerms}";
+                                }];
+                            };
+                        };
+                    };
+                    settings = {
+                       "browser.startup.blankWindow" = true;
+                       "browser.startup.homepage" = "about:blank";
+                       "browser.search.region" = "US";
+                       "browser.search.isUS" = true;
+                       "distribution.searchplugins.defaultLocale" = "en-US";
+                       "general.useragent.locale" = "en-US";
+                       "extensions.activeThemeID" = "{831b8843-7251-4306-9521-e688f18b4aeb}";
+                       "privacy.trackingprotection.enable" = true;
+                       "privacy.trackingprotection.emailtracking.enable" = true;
+                       "privacy.trackingprotection.socialtracking.enable" = true;
+                       "privacy.clearOnShutdown.cookies" = true;
+                       "browser.safebrowsing.passwords.enabled" = false;
+                       "browser.migrate.interactions.passwords" = false;
+                       "pref.privacy.disable_button.view_passwords" = false;
+                       "signon.rememberSignon" = false;
+                       "extensions.formautofill.creditCards.enabled" = false;
+                       "extensions.formautofill.addresses.enabled" = false;
+                        # "browser.bookmarks.showMobileBookmarks" = true;
+                       # "browser.newtabpage.pinned" = [{
+                       #   title = "NixOS";
+                       #   url = "https://nixos.org";
+                       # }];
+                   };
+                };
+            };
+        };
+    };
+}
diff --git a/jaci/modules/home-manager/home.nix b/jaci/modules/home-manager/home.nix
new file mode 100644
index 0000000..33e6867
--- /dev/null
+++ b/jaci/modules/home-manager/home.nix
@@ -0,0 +1,203 @@
+{ inputs, outputs, lib, config, pkgs, ... }:
+  let
+    userName = "jaci";
+    fullName = "Jaci Anderson";
+    email = "jaci.s.anderson@gmail.com";
+  in
+{
+  # nixpkgs.overlays = [
+  #   inputs.nur.overlay
+  # ];
+
+  # nixpkgs.config.allowUnfree = true;
+  # inputs.nixpkgs-stable.config.allowUnfree = true;
+  imports = [
+      ../apps/firefox/firefox.nix
+  ];
+  
+  home.username = userName;
+  home.homeDirectory = "/home/${userName}";
+
+  programs.home-manager.enable = true;
+
+  home.stateVersion = "23.11"; # Please read the comment before changing.
+
+  # The home.packages option allows you to install Nix packages into your
+  # environment.
+  firefoxApp.enable = true;
+  
+  fonts.fontconfig.enable = true;
+  home.packages = with pkgs; [
+    # nur.repos.crazazy.js.eslint
+    # inputs.nixpkgs-stable.legacyPackages.x86_64-linux.corectrl
+
+    #
+    # Dev Tools
+    #
+    dbeaver
+    cargo
+    kakoune
+    # flutter
+    docker
+    docker-compose
+    python310
+    nodejs_21
+    zig
+    ### LSP's
+    rnix-lsp # Nix LSP
+    openscad-lsp
+    nodePackages.typescript-language-server
+    vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
+    rubyPackages.solargraph
+    python310Packages.python-lsp-server
+    zls
+    ### Misc
+    # android-udev-rules
+    # android-tools
+    # sdkmanager
+    openscad
+
+    #
+    # Gaming
+    #
+    wine-wayland
+    webcord
+
+    #
+    # Better Unix
+    #
+    bat
+    duf
+    fd
+    fzf
+    lsd
+    ripgrep
+    tre-command
+    gtop
+
+    #
+    # Photo / Video
+    #
+    imv
+    mpv
+    gimp
+
+    #
+    # Communication
+    #
+    mumble
+    slack
+    signal-desktop
+
+    #
+    # Other
+    #
+    keepassxc
+    obs-studio
+
+    # Install fonts
+    (nerdfonts.override { fonts = [ "Hermit" "Overpass" ]; })
+
+    # # You can also create simple shell scripts directly inside your
+    # # configuration. For example, this adds a command 'my-hello' to your
+    # # environment:
+    # (pkgs.writeShellScriptBin "my-hello" ''
+    #   echo "Hello, ${config.home.username}!"
+    # '')
+  ];
+
+  # Home Manager is pretty good at managing dotfiles. The primary way to manage
+  # plain files is through 'home.file'.
+  # home.file."${config.xdg.configHome}" = {
+    # # Building this configuration will create a copy of 'dotfiles/screenrc' in
+    # # the Nix store. Activating the configuration will then make '~/.screenrc' a
+    # # symlink to the Nix store copy.
+    # ".screenrc".source = dotfiles/screenrc;
+    # source = ../../dotfiles;
+    # recursive = true;
+
+    # # You can also set the file content immediately.
+    # ".gradle/gradle.properties".text = ''
+    #   org.gradle.console=verbose
+    #   org.gradle.daemon.idletimeout=3600000
+    # '';
+  # };
+
+
+  # Home Manager can also manage your environment variables through
+  # 'home.sessionVariables'. If you don't want to manage your shell through Home
+  # Manager then you have to manually source 'hm-session-vars.sh' located at
+  # either
+  #
+  #  ~/.nix-profile/etc/profile.d/hm-session-vars.sh
+  #
+  # or
+  #
+  #  /etc/profiles/per-user/nate/etc/profile.d/hm-session-vars.sh
+  #
+  home.sessionVariables = {
+    EDITOR = "kak";
+  };
+
+  # Git setup
+  programs.git = {
+      enable = true;
+      userEmail = email;
+      userName = fullName;
+  };
+
+  # Zsh setup
+  programs.zsh = {
+      enable = true;
+      oh-my-zsh = {
+          enable = true;
+          plugins = [ "git" ];
+          theme = "half-life";
+      };
+      initExtra = ''
+          alias ask="nix-shell -p python310Packages.openai --run 'python ~/source/python/chat.py'"
+
+          fzf_projects() {
+              DIR=`
+              fd .git --search-path="$HOME/source/" -H --ignore-file ~/.config/fd-ignore -tdirectory | \
+              xargs dirname | \
+              sed 's|$HOME||g' | \
+              sort | \
+              uniq | \
+              fzf --preview 'ls $HOME/{}/README.md 2>/dev/null && bat $HOME/{}/README.md || printf "No README.md file found in this directory\n%s" {}' --preview-window=top | \
+              xargs printf "$HOME/%s/"
+              `
+              cd $DIR
+          }
+          alias p="fzf_projects source/"
+
+          ### Busykid Bash Functions
+
+       '';
+  };
+
+
+    #
+    # Theming qt and gnome apps
+    #
+
+    qt = {
+      enable = true;
+      platformTheme = "gtk";
+      style.name = "adwaita-dark";
+      style.package = pkgs.adwaita-qt;
+    };
+    gtk = {
+        enable = true;
+        cursorTheme.package = pkgs.catppuccin-cursors;
+        cursorTheme.name = "latteFlamingo";
+        theme = {
+            name = "Catppuccin-Latte-Pink";
+            package = pkgs.catppuccin-gtk.override {
+                accents = [ "pink" ];
+                tweaks = [ ];
+                variant = "latte";
+            };
+        };
+    };
+}
diff --git a/jaci/modules/kde/kde_conf.nix b/jaci/modules/kde/kde_conf.nix
new file mode 100644
index 0000000..aba5507
--- /dev/null
+++ b/jaci/modules/kde/kde_conf.nix
@@ -0,0 +1,69 @@
+{ lib, config, pkgs, ... }:
+{
+    options.kde = {
+        enable = lib.mkEnableOption "Enable kde.";
+        useNonFree = lib.mkOption {
+            default = false;
+            example = true;
+            description = "Whether to enable non-free software in the kde config";
+        };
+        installGaming = lib.mkOption {
+            default = false;
+            example = true;
+            description = "Whether to install gaming software on the system.";
+        };
+        systemPackages = lib.mkOption {
+            default = [];
+            description = "Add any additional packages desired. Merged with kde defaults.";
+        };
+
+    };
+
+    ###
+    ##  Configuration
+    ###
+    config = lib.mkIf config.kde.enable {
+
+        nixpkgs.config.allowUnfree = config.kde.useNonFree;
+
+        ###
+        ##  System Packages
+        ###
+        environment.systemPackages = with pkgs; lib.lists.flatten [
+             [
+                bash
+                git
+                glib # gsettings
+                ncspot
+                zsh
+             ]
+            config.kde.systemPackages
+        ];
+
+        programs.zsh.enable = true;
+        programs.steam.enable = config.kde.installGaming;
+
+        # kdeconnect setup
+        programs.kdeconnect.enable = true;
+
+        ###
+        ##  Services
+        ###
+        services.openssh.enable = true;
+        # services.dbus.enable = true;
+        # enabling kde
+        services.xserver.enable = true;
+        services.xserver.displayManager.defaultSession = "plasmawayland";
+        services.xserver.displayManager.sddm.enable = true;
+        services.xserver.desktopManager.plasma5.enable = true;
+        ###
+        ##  Misc
+        ###
+        sound.enable = true;
+
+        hardware.opengl = {
+            enable = true;
+            driSupport = true;
+        };
+    };
+}
diff --git a/jaci/modules/user/main_user.nix b/jaci/modules/user/main_user.nix
new file mode 100644
index 0000000..a2489b7
--- /dev/null
+++ b/jaci/modules/user/main_user.nix
@@ -0,0 +1,53 @@
+{ lib, config, pkgs, ... }:
+
+let
+	cfg = config.main_user;
+in
+{
+    options.main_user = {
+        enable = lib.mkEnableOption "enable user module";
+
+        isDesktopUser = lib.mkOption {
+            default = false;
+            example = true;
+            description = "Add additional user groups for desktop users";
+        };
+
+        userName = lib.mkOption {
+            default = "mainuser";
+            description = "username";
+        };
+    };
+
+    config = lib.mkIf cfg.enable {
+        users.users.${cfg.userName} = lib.mkMerge [
+            {
+                isNormalUser = true;
+                initialPassword = "password";
+
+                description = "main user";
+                shell = pkgs.zsh;
+            }
+    
+            (lib.mkIf (!cfg.isDesktopUser) {
+                extraGroups = [
+                    "wheel"
+                    "networkmanager"
+                    cfg.userName
+                ];
+            })
+            (lib.mkIf cfg.isDesktopUser {
+                extraGroups = [
+                    "wheel"
+                    "networkmanager"
+                    "corectrl"
+                    cfg.userName
+                    "video"
+                    "audio"
+                    # For android
+                    "adbusers"
+                ];
+            })
+        ];
+    };
+}
diff --git a/jaci/nixos/hardware-configuration.nix b/jaci/nixos/hardware-configuration.nix
new file mode 100644
index 0000000..31e746e
--- /dev/null
+++ b/jaci/nixos/hardware-configuration.nix
@@ -0,0 +1,44 @@
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports =
+    [ (modulesPath + "/installer/scan/not-detected.nix")
+    ];
+
+  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "uas" "usb_storage" "sd_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/e48c53a4-6e7d-4b12-a46e-a408956268ea";
+      fsType = "ext4";
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/82B2-9D40";
+      fsType = "vfat";
+    };
+
+  fileSystems."/home/nate/Games" =
+    { device = "/dev/disk/by-uuid/d66b7920-2c29-400a-be51-0b3890ea63db";
+      fsType = "ext4";
+    };
+
+  swapDevices = [ ];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.enp1s0f0u2u1u4.useDHCP = lib.mkDefault true;
+  # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
+  # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/nate/default.nix b/nate/default.nix
index b88fe07..e74340b 100644
--- a/nate/default.nix
+++ b/nate/default.nix
@@ -8,15 +8,32 @@
     gaming = true;
   in
 {
-    imports = [
-        ./desktop-configuration.nix
-        ./nixos/hardware-configuration.nix
-    ];
+  imports = [
+      ./desktop-configuration.nix
+      ./nixos/hardware-configuration.nix
+  ];
 
-    deskCfg = {
-        userName = userName;
-        hostName = hostName;
-        de = desktop;
-        installGaming = gaming;
-    };
+  deskCfg = {
+      userName = userName;
+      hostName = hostName;
+      de = desktop;
+      installGaming = gaming;
+  };
+
+  # Limit the number of generations to keep
+  boot.loader.systemd-boot.configurationLimit = 5;
+
+  # Perform garbage collection weekly to maintain low disk usage
+  nix.gc = {
+    automatic = true;
+    dates = "weekly";
+    options = "--delete-older-than 1w";
+  };
+
+  # Optimize storage
+  # You can also manually optimize the store via:
+  #    nix-store --optimise
+  # Refer to the following link for more details:
+  # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
+  nix.settings.auto-optimise-store = true;
 }
diff --git a/nate/desktop-configuration.nix b/nate/desktop-configuration.nix
index 5296bc2..31fb333 100644
--- a/nate/desktop-configuration.nix
+++ b/nate/desktop-configuration.nix
@@ -54,6 +54,7 @@ in
     # Use the systemd-boot EFI boot loader.
     boot.loader.systemd-boot.enable = true;
     boot.loader.efi.canTouchEfiVariables = true;
+    boot.plymouth.enable = true;
   
     networking.hostName = deskCfg.hostName; # Define your hostname.
     networking.networkmanager.enable = true;  # Easiest to use and most distros use this by default.
diff --git a/nate/dotfiles/sway/config.d/output b/nate/dotfiles/sway/config.d/output
index ef98359..c021241 100644
--- a/nate/dotfiles/sway/config.d/output
+++ b/nate/dotfiles/sway/config.d/output
@@ -9,4 +9,5 @@
 # Wacom Tablet - Example
 #   input "1386:884:Wacom_Intuos_S_Pad" map_to_output HDMI-A-1
 #   input "1386:884:Wacom_Intuos_S_Pen" map_to_output HDMI-A-1
+output DP-3 resolution 2560x1440@164.956Hz position 0,0
 output * adaptive_sync on
diff --git a/nate/dotfiles/sway/scripts/background.sh b/nate/dotfiles/sway/scripts/background.sh
index d668c23..e5dbf5b 100755
--- a/nate/dotfiles/sway/scripts/background.sh
+++ b/nate/dotfiles/sway/scripts/background.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 PID_FILE="background.pid"
 WP_LOC="/home/nate/.config/sway/wallpapers"
 PREV_WP=""
diff --git a/nate/dotfiles/sway/scripts/import-gsettings b/nate/dotfiles/sway/scripts/import-gsettings
index e1257df..5878046 100755
--- a/nate/dotfiles/sway/scripts/import-gsettings
+++ b/nate/dotfiles/sway/scripts/import-gsettings
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # usage: import-gsettings
 config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
diff --git a/nate/dotfiles/sway/scripts/scale.sh b/nate/dotfiles/sway/scripts/scale.sh
index c85289f..bb4b3d2 100755
--- a/nate/dotfiles/sway/scripts/scale.sh
+++ b/nate/dotfiles/sway/scripts/scale.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 SCALE_FILE="scale.txt"
 DIRNAME="/tmp/$(ls /tmp | grep scale.sh | head -n 1)"
diff --git a/nate/dotfiles/sway/scripts/screenshot.sh b/nate/dotfiles/sway/scripts/screenshot.sh
index d946a21..878ee12 100755
--- a/nate/dotfiles/sway/scripts/screenshot.sh
+++ b/nate/dotfiles/sway/scripts/screenshot.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
  
 entries="Active Screen Output Area Window"
  
diff --git a/nate/dotfiles/sway/scripts/weather.sh b/nate/dotfiles/sway/scripts/weather.sh
deleted file mode 100755
index ce0f458..0000000
--- a/nate/dotfiles/sway/scripts/weather.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-LOC="$1"
-# HTML encode string as %20
-LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
-content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=NewYork&deg=C")
-ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
-# echo $ICON
-TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
-TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
-CLASS=$(echo $content | jq .skytext)
-echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'
-
-
-
diff --git a/nate/dotfiles/waybar/scripts/PBPbattery.sh b/nate/dotfiles/waybar/scripts/PBPbattery.sh
deleted file mode 100755
index 1cf34da..0000000
--- a/nate/dotfiles/waybar/scripts/PBPbattery.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-
-#!/bin/bash
-#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro
-#05012020 geri123@gmx.net Gerhard S.
-
-PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
-STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
-case $((
- $PERCENT >= 0 && $PERCENT <= 20 ? 1 :
- $PERCENT > 20 && $PERCENT <= 40 ? 2 :
- $PERCENT > 40 && $PERCENT <= 60 ? 3 :
- $PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
-#
-       (1) echo $STATUS:"":$PERCENT%;;
-       (2) echo $STATUS:"":$PERCENT%;;
-       (3) echo $STATUS:"":$PERCENT%;;
-       (4) echo $STATUS:"":$PERCENT%;;
-       (5) echo $STATUS:"":$PERCENT%;;
-esac
-
-
diff --git a/nate/dotfiles/waybar/scripts/keyboard_layout.sh b/nate/dotfiles/waybar/scripts/keyboard_layout.sh
index 8106807..04cf5e1 100755
--- a/nate/dotfiles/waybar/scripts/keyboard_layout.sh
+++ b/nate/dotfiles/waybar/scripts/keyboard_layout.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 entries="Default Colemak"
 
diff --git a/nate/dotfiles/waybar/scripts/keyhint.sh b/nate/dotfiles/waybar/scripts/keyhint.sh
deleted file mode 100755
index 01f3396..0000000
--- a/nate/dotfiles/waybar/scripts/keyhint.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-yad --title="EndeavourOS Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(xfce4-terminal)" "+d" "Application Menu" "(wofi)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+t" "open keybinding helper" "full list"
diff --git a/nate/dotfiles/waybar/scripts/weather.sh b/nate/dotfiles/waybar/scripts/weather.sh
deleted file mode 100755
index b03cd1c..0000000
--- a/nate/dotfiles/waybar/scripts/weather.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-LOC="$1"
-# HTML encode string as %20
-LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
-content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION&deg=C")
-ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
-# echo $ICON
-TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
-TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
-CLASS=$(echo $content | jq .skytext)
-echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'
-
diff --git a/nate/modules/home-manager/home.nix b/nate/modules/home-manager/home.nix
index f2761ad..a7fcb33 100644
--- a/nate/modules/home-manager/home.nix
+++ b/nate/modules/home-manager/home.nix
@@ -67,12 +67,12 @@
     # Better Unix
     #
     bat
-    broot  # tree alternative
     duf
     fd
     fzf
     lsd
     ripgrep
+    tre-command
     gtop
 
     #
@@ -178,4 +178,23 @@
        '';
   };
 
+    qt = {
+      enable = true;
+      platformTheme = "gtk";
+      style.name = "adwaita-dark";
+      style.package = pkgs.adwaita-qt;
+    };
+    gtk = {
+        enable = true;
+        cursorTheme.package = pkgs.catppuccin-cursors;
+        cursorTheme.name = "latteFlamingo";
+        theme = {
+            name = "Catppuccin-Latte-Pink";
+            package = pkgs.catppuccin-gtk.override {
+                accents = [ "pink" ];
+                tweaks = [ ];
+                variant = "latte";
+            };
+        };
+    };
 }
diff --git a/nate/modules/sway/sway_conf.nix b/nate/modules/sway/sway_conf.nix
index 99b4f06..30a9201 100644
--- a/nate/modules/sway/sway_conf.nix
+++ b/nate/modules/sway/sway_conf.nix
@@ -70,6 +70,7 @@
                 slurp
                 swaylock
                 swayidle
+                swww
                 wl-clipboard
                 waybar
                 wdisplays
@@ -84,6 +85,9 @@
             # ])
         ];
 
+        environment.loginShellInit = ''
+            [[ "$(tty)" == /dev/tty1 ]] && sway
+        '';
         # Thunar config
         programs.thunar = {
             enable = true;