{ config, pkgs, inputs, ... }:

{
  # Home Manager needs a bit of information about you and the
  # paths it should manage.
  home.username = "joshuaelm";
  home.homeDirectory = "/home/joshuaelm";

  imports = [ ../../modules/nvim ../../modules/stylix.nix ../../modules/hypr/hyprland_laptop.nix ../../modules/ashell/default.nix  ];


  home.packages = [
    pkgs.element-desktop
    pkgs.waybar
    pkgs.signal-desktop-bin
    pkgs.supersonic
    pkgs.adw-gtk3
    ];

  programs.hyprlock.enable = false;
  programs.kitty.enable = true;
  programs.cava.enable = true;
  programs.btop.enable = true;
  programs.rofi.enable = true;
  programs.rofi.package = pkgs.rofi-wayland;
  services.hyprpaper.enable = true;
  wayland.windowManager.hyprland.enable = true;

  #xdg.configFile.hypr.source = ./modules/hypr;
  #xdg.configFile.waybar.source = ./modules/waybar;
  #xdg.configFile.cava.source = ./modules/cava;
  #xdg.configFile.kitty.source = ./modules/kitty;
  #xdg.configFile.rofi.source = ./modules/rofi;
  #xdg.configFile.dunst.source = ./modules/dunst;
  #home.file.".cache/ags/hyprpanel/options.json".source = ./modules/hyprpanel/options.json;


  home.file.".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";

  services.mpd-mpris.enable = true;


  programs.rofi.extraConfig = {
    show-icons = true;
    drun-display-format = "{icon} {name}";
    hide-scrollbar = true;
    sidebar-mode = true;
    dpi = 110;
    font = "FreeSans Regular 12";
    icon-theme = "Gruvbox-Plus-Dark";
  };
  programs.rofi.theme = {
    window.height = 600;
    window.width = 600;
    window.border-radius = 10;

    element = {
      padding = 5;
      border-radius = 10; 
    };
    inputbar.padding = 14;
    listview = {
      padding = 8;
      border-radius = "0 0 10 10";
      border = "2 2 2 2";
      dynamic = false;
    };
    "element-text element-icon" = {
      size = 40;
      margin = "0 10 0 0";
    };
    mainbox.children = "inputbar, message, listview";
    mainbox.spacing = 0;
  };

  programs.kitty.extraConfig = ''
    font_family Fira Code Nerd Font
    bold_font auto
    italic_font auto
    bold_italic_font auto
    confirm_os_window_close 0
    cursor_shape beam
    cursor_trail 3
  '';


  # This value determines the Home Manager release that your
  # configuration is compatible with. This helps avoid breakage
  # when a new Home Manager release introduces backwards
  # incompatible changes.
  #
  # You can update Home Manager without changing this value. See
  # the Home Manager release notes for a list of state version
  # changes in each release.
  home.stateVersion = "23.11";
  xdg.dataFile = {
    "Steam/compatibilitytools.d/SteamTinkerLaunch/compatibilitytool.vdf".text = ''
      "compatibilitytools"
      {
        "compat_tools"
        {
          "Proton-stl" // Internal name of this tool
          {
            "install_path" "."
            "display_name" "Steam Tinker Launch"
                                                                                   
            "from_oslist"  "windows"
            "to_oslist"    "linux"
          }
        }
      }
    '';
    "Steam/compatibilitytools.d/SteamTinkerLaunch/steamtinkerlaunch".source =
      config.lib.file.mkOutOfStoreSymlink "${pkgs.steamtinkerlaunch}/bin/steamtinkerlaunch";
    "Steam/compatibilitytools.d/SteamTinkerLaunch/toolmanifest.vdf".text = ''
      "manifest"
      {
        "commandline" "/steamtinkerlaunch run"
        "commandline_waitforexitandrun" "/steamtinkerlaunch waitforexitandrun"
      }
    '';
  };

  # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;
}
