From 597c0582a87d2ffb49545e8ad24bd19893227d54 Mon Sep 17 00:00:00 2001 From: djairoh Date: Tue, 6 Oct 2026 13:30:23 +0200 Subject: [PATCH] hm: hypr, vesktop, dunst --- modules/apps/default.nix | 55 ++++---- modules/apps/element.nix | 0 modules/apps/vesktop.nix | 159 ++++++++++++++++++++++ modules/apps/zathura.nix | 1 - modules/audio/default.nix | 8 +- modules/base.nix | 2 +- modules/desktop/default.nix | 77 +++++++---- modules/desktop/hypr-input.nix | 3 +- modules/desktop/hypr-passthrough.nix | 34 ++--- modules/desktop/hypr.nix | 10 +- modules/dunst.nix | 8 +- modules/terminal/fish-functions/yazi.fish | 13 +- 12 files changed, 267 insertions(+), 103 deletions(-) create mode 100644 modules/apps/element.nix create mode 100644 modules/apps/vesktop.nix diff --git a/modules/apps/default.nix b/modules/apps/default.nix index b7d8fce..0af28e5 100644 --- a/modules/apps/default.nix +++ b/modules/apps/default.nix @@ -1,14 +1,17 @@ { pkgs, ... }: { + # TODO: move into home-manager; edit all files to not use the home manager settings (its more modular) imports = [ ./feh.nix ./freetube.nix ./mpv.nix ./starship.nix ./tealdeer.nix + ./vesktop.nix ./zathura.nix ]; + services.flatpak = { enable = true; update.onActivation = false; @@ -27,19 +30,38 @@ # productivity libreoffice + opencloud-desktop + w3m zathura # media feishin - yt-dlp streamlink + yt-dlp # terminal - btop bat + brightnessctl + btop fastfetch + file fzf + fzf + killall starship + tree + unrar + unzip + zip + + # tools + appimage-run + glib # for gio + gparted + grim + slop + slurp + yad ]; home-manager.users.djai.xdg.desktopEntries = { @@ -63,28 +85,15 @@ "x-scheme-handler/signalcaptcha" ]; }; - - vesktop = { - name = "Webcord"; - exec = "vesktop --disable-features=AudioServiceOutOfProcess %U"; - terminal = false; - icon = "discord"; - settings = { StartupWMClass = "vesktop";}; - }; }; users.users.djai.packages = with pkgs; [ # chat element-desktop - vesktop easyeffects - # productivity - w3m - # media exiftool - feh ffmpeg gimp kdePackages.kdenlive @@ -93,23 +102,7 @@ puddletag # tools - appimage-run - gparted - slop - slurp - ranger yazi - killall - tealdeer - unrar - unzip - zip - fzf - yad - brightnessctl - grim - file - tree ]; programs.appimage = { diff --git a/modules/apps/element.nix b/modules/apps/element.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/apps/vesktop.nix b/modules/apps/vesktop.nix new file mode 100644 index 0000000..1809ae6 --- /dev/null +++ b/modules/apps/vesktop.nix @@ -0,0 +1,159 @@ +{ ... }: + +{ + + home-manager.users.djai.xdg.desktopEntries = { + vesktop = { + name = "Webcord"; + exec = "vesktop --disable-features=AudioServiceOutOfProcess %U"; + terminal = false; + icon = "discord"; + settings.StartupWMClass = "vesktop"; + }; + }; + + home-manager.users.djai.programs.vesktop = { + enable = true; + settings = { + minimizeToTray = false; + arRPC = true; + audio.deviceSelect = true; + tray = false; + spellCheckLanguages = [ + "en-GB" + "en" + ]; + discordBranch = "stable"; + }; + vencord.settings = { + autoUpdate = false; + useQuickCss = true; + plugins = { + CommandsAPI = { + enabled = true; + }; + MessageAccessoriesAPI = { + enabled = true; + }; + MessageEventsAPI = { + enabled = true; + }; + UserSettingsAPI = { + enabled = true; + }; + AlwaysTrust = { + enabled = true; + domain = true; + file = true; + }; + BetterGifPicker = { + enabled = true; + }; + ConsoleJanitor = { + enabled = true; + disableLoggers = false; + disableSpotifyLogger = true; + whitelistedLoggers = [ "GatewaySocket" "Routing/Utils" ]; + }; + ConsoleShortcuts = { + enabled = true; + }; + CrashHandler = { + enabled = true; + }; + FakeNitro = { + enabled = true; + enableStickerBypass = true; + enableStreamQualityBypass = true; + enableEmojiBypass = true; + transformEmojis = true; + transformStickers = true; + transformCompoundSentence = false; + }; + FavoriteGifSearch = { + enabled = true; + }; + ForceOwnerCrown = { + enabled = true; + }; + FriendsSince = { + enabled = true; + }; + FullUserInChatbox = { + enabled = true; + }; + GameActivityToggle = { + enabled = true; + location = "PANEL"; + oldIcon = false; + }; + ImplicitRelationships = { + enabled = true; + sortByAffinity = true; + }; + IrcColors = { + enabled = true; + memberListColors = true; + lightness = 70; + applyColorOnlyInDms = false; + applyColorOnlyToUsersWithoutColor = false; + }; + NoF1 = { + enabled = true; + }; + NoTypingAnimation = { + enabled = true; + }; + ReplaceGoogleSearch = { + enabled = true; + replacementEngine = "DuckDuckGo"; + customEngineName = "DuckDuckGo"; + customEngineURL = "https://duckduckgo.com/html?q="; + }; + RoleColorEverywhere = { + enabled = true; + chatMentions = true; + memberList = true; + voiceUsers = true; + reactorsList = true; + pollResults = true; + colorChatMessages = false; + }; + ShowHiddenChannels = { + enabled = true; + showMode = 0; + hideUnreads = true; + }; + WebKeybinds = { + enabled = true; + }; + WebScreenShareFixes = { + enabled = true; + }; + YoutubeAdblock = { + enabled = true; + }; + BadgeAPI = { + enabled = true; + }; + NoTrack = { + enabled = true; + disableAnalytics = true; + }; + Settings = { + enabled = true; + settingsLocation = "aboveNitro"; + }; + DisableDeepLinks = { + enabled = true; + }; + SupportHelper = { + enabled = true; + }; + WebContextMenus = { + enabled = true; + }; + }; + }; + }; +} diff --git a/modules/apps/zathura.nix b/modules/apps/zathura.nix index ee90553..baa8e15 100644 --- a/modules/apps/zathura.nix +++ b/modules/apps/zathura.nix @@ -18,6 +18,5 @@ home-manager.users.djai.programs.zathura = { enable = true; - # mappings = '''';# TODO extra zathura mappings }; } diff --git a/modules/audio/default.nix b/modules/audio/default.nix index 2fa643d..a2892de 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -85,13 +85,7 @@ in }; }; - # TODO: switch to home manager - # home-manager.users.djai.home.packages = with pkgs; [ - # pavucontrol - # qpwgraph - # ]; - - users.users.djai.packages = with pkgs; [ + home-manager.users.djai.home.packages = with pkgs; [ pulseaudio pavucontrol pipewire diff --git a/modules/base.nix b/modules/base.nix index 39ff30c..62bf5d7 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -77,7 +77,7 @@ "$HOME/Scripts" ]; - sessionVariables = { + sessionVariables = { # TODO: add rest of .config/uwms/env.bck here NEWT_COLORS_FILE = "$HOME/.newtColours"; BROWSER = "librewolf"; EDITOR = "nvim"; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 0de75b1..db6a571 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -64,14 +64,9 @@ wl-clipboard wl-clipboard-x11 swaybg + catppuccin-qt5ct ]; - qt = { - enable = true; - platformTheme = "qt5ct"; # might have to go back to gnome if this makes kdenlive crash - style = "adwaita-dark"; - }; - # i have no clue what this does. # GLib aborts any program that loads a GSettings schema it can't find, and Qt's GTK file dialog needs gtk3's. Nothing else puts these on the path. environment.sessionVariables.GSETTINGS_SCHEMA_DIR = builtins.concatStringsSep ":" [ @@ -79,30 +74,54 @@ "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}/glib-2.0/schemas" ]; - # TODO: other mimetypes? - xdg.mime.defaultApplications = { - "inode/directory" = [ "kitty" ]; - "text/html" = [ "librewolf.desktop" ]; - "x-scheme-handler/http" = [ "librewolf.desktop" ]; - "x-scheme-handler/https" = [ "librewolf.desktop" ]; - }; - - xdg.portal = { - enable = true; - config = { - common.default = [ "gtk" ]; - hyprland = { - default = [ - "gtk" - "hyprland" - ]; - "org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ]; + environment.pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ]; + home-manager.users.djai = { + xdg = { + mimeApps = { + enable = true; + defaultApplications = { + "inode/directory" = [ "kitty.desktop" ]; + "image/gif" = [ "mpv.desktop" ]; + "text/html" = [ "librewolf.desktop" ]; + "application/pdf" = [ "zathura.desktop" ]; + "image/*" = [ "feh.deskop" ]; + "x-scheme-handler/http" = [ "librewolf.desktop" ]; + "x-scheme-handler/https" = [ "librewolf.desktop" ]; + }; }; + + # TODO: check termfilechooser still works; had to disable this becos of hyprland + # portal = { + # enable = true; + # config = { + # common.default = [ "gtk" ]; + # hyprland = { + # default = [ + # "gtk" + # "hyprland" + # ]; + # org.freedesktop.impl.portal.FileChooser = [ "termfilechooser" ]; + # }; + # }; + # extraPortals = with pkgs; [ + # xdg-desktop-portal-gtk + # xdg-desktop-portal-termfilechooser + # ]; + # }; + }; + + + catppuccin = { + cursors = { + enable = true; + accent = "mauve"; + }; + qt5ct.enable = true; + }; + qt = { + style.name = "kvantum"; # required for catppuccin-nix + platformTheme.name = "qtct"; + enable = true; }; - # programs.hyprland adds the Hyprland portal. - extraPortals = with pkgs; [ - xdg-desktop-portal-gtk - xdg-desktop-portal-termfilechooser - ]; }; } diff --git a/modules/desktop/hypr-input.nix b/modules/desktop/hypr-input.nix index 90143d1..36e6e36 100644 --- a/modules/desktop/hypr-input.nix +++ b/modules/desktop/hypr-input.nix @@ -28,7 +28,8 @@ device = [ { - name = "4152:6180:SteelSeries_SteelSeries_Rival_3"; + # name = "4152:6180:SteelSeries_SteelSeries_Rival_3"; + name = "steelseries-steelseries-rival-3"; disable_while_typing = false; accel_profile = "flat"; sensitivity = -0.3; diff --git a/modules/desktop/hypr-passthrough.nix b/modules/desktop/hypr-passthrough.nix index 6a2f1d2..7d21ade 100644 --- a/modules/desktop/hypr-passthrough.nix +++ b/modules/desktop/hypr-passthrough.nix @@ -28,15 +28,15 @@ let [ "2" "2"] [ "3" "3"] [ "4" "4"] - [ "W" "5"] - [ "A" "6"] - [ "D" "7"] - [ "F" "8"] - [ "Z" "9"] - [ "Q" "LEFT"] - [ "E" "RIGHT"] - [ "S" "h"] - [ "H" "h"] + [ "w" "5"] + [ "a" "6"] + [ "d" "7"] + [ "f" "8"] + [ "z" "9"] + [ "q" "LEFT"] + [ "e" "RIGHT"] + [ "s" "h"] + [ "h" "h"] ]; feishinBinds = [ [ "0" "0" "Send '0' to feishin"] @@ -44,14 +44,14 @@ let [ "2" "2" "Send '2' to feishin"] [ "3" "3" "Send '3' to feishin"] [ "4" "4" "Send '4' to feishin"] - [ "W" "5" "Send '5' to feishin"] - [ "S" "h" "Send 'h' to feishin"] - [ "H" "h" "Send 'h' to feishin"] - [ "Q" "q" "Send 'q' to feishin"] - [ "E" "e" "Send 'e' to feishin"] + [ "w" "5" "Send '5' to feishin"] + [ "s" "h" "Send 'h' to feishin"] + [ "h" "h" "Send 'h' to feishin"] + [ "q" "q" "Send 'q' to feishin"] + [ "e" "e" "Send 'e' to feishin"] [ "SPACE" "space" "Send 'space' to feishin"] - [ "A" "a" "Send 'a' to feishin"] - [ "D" "d" "Send 'd' to feishin"] + [ "a" "a" "Send 'a' to feishin"] + [ "d" "d" "Send 'd' to feishin"] ]; in { @@ -65,7 +65,7 @@ in ]; define_submap = [ - (makeSubmap "feh" (makePassthrough "class:^*hideme)$" fehBinds)) + (makeSubmap "feh" (makePassthrough "class:^(hideme)$" fehBinds)) (makeSubmap "feishin" (makePassthrough "class:^(feishin)$" feishinBinds)) ]; }; diff --git a/modules/desktop/hypr.nix b/modules/desktop/hypr.nix index 30bf791..1603a7b 100644 --- a/modules/desktop/hypr.nix +++ b/modules/desktop/hypr.nix @@ -39,6 +39,10 @@ in home-manager.users."djai".home.file.".config/hypr/scripts".source = ./scripts; home-manager.users."djai".home.file.".config/hypr/shaders".source = ./shaders; + home-manager.users."djai".xdg.configFile."uwsm/env-hyprland".text = '' + export AQ_ARM_DEVICES="/dev/dri/card1:/dev/dri/card2" + export AQ_NO_HARDWARE_CUSRORS="1" + ''; home-manager.users."djai".wayland.windowManager.hyprland = { @@ -54,14 +58,12 @@ in settings = { on = [ #TODO: set up exec oncess (hyprLib.on-signal "hyprland.start" [ - # "uwsm app -- /home/djai/AppImages/opencloud.appimage" # TODO: get opencloud + "uwsm app -- opencloud-desktop" "uwsm app -- openrgb --noautoconnect -p aroace.orp" "uwsm app -- kitty --class scratchme -d /home/djai/Documents/diary" + "uwsm app -- nohup flameshot" # these should be done thru systemd already - # hl.exec_cmd("nohup flameshot") # hl.exec_cmd("hyprpm reload") - # hl.exec_cmd("kanshi") - # hl.exec_cmd("dunst") # hl.exec_cmd("hyprctl setcursor Catppuccin-Macchiato-Dark-Cursors 24") ]) ]; diff --git a/modules/dunst.nix b/modules/dunst.nix index efb2ac5..8b2ec26 100644 --- a/modules/dunst.nix +++ b/modules/dunst.nix @@ -16,7 +16,7 @@ class = "Dunst"; corner_radius = 10; corners = "bottom-left, top-right"; - ellipsize = "middle"; + ellipsize = "end"; enable_posix_regex = true; follow = "mouse"; font = "Iosevka Mono Nerd Font Medium 10"; @@ -51,15 +51,15 @@ separator_height = 2; show_age_threshold = 60; show_indicators = true; - shrink = false; + shrink = true; sort = true; stack_duplicates = true; sticky_history = true; text_icon_padding = 15; title = "Dunst"; vertical_alignment = "center"; - width = 250; - word_wrap = false; + width = 480; + word_wrap = true; }; experimental.per_monitor_dpi = false; diff --git a/modules/terminal/fish-functions/yazi.fish b/modules/terminal/fish-functions/yazi.fish index e524fba..68648da 100644 --- a/modules/terminal/fish-functions/yazi.fish +++ b/modules/terminal/fish-functions/yazi.fish @@ -1,10 +1,7 @@ -set tempfile /tmp/chosendir -command yazi cwd-file=$tempfile (pwd) $argv +set tempfile (mktemp -t "yazi-cwd.XXX") +command yazi $argv --cwd-file=$tempfile -if test -f $tempfile - if [ (cat $tempfile) != (pwd) ] - cd (cat $tempfile) - end +if read -z cwd < "$tempfile"; and [ "$cwd" != "$PWD" ]; and test -d "$cwd" + builtin cd -- "$cwd" end - -rm -f $tempfile +command rm -f -- "$tempfile"