diff --git a/modules/home/programs/gui/default.nix b/modules/home/programs/gui/default.nix index 35536f5..b8d20ab 100644 --- a/modules/home/programs/gui/default.nix +++ b/modules/home/programs/gui/default.nix @@ -4,7 +4,6 @@ ./easyeffects ./foot ./librewolf - ./mako ./mangohud ./mpv ./pcmanfm diff --git a/modules/home/programs/gui/pcmanfm/default.nix b/modules/home/programs/gui/pcmanfm/default.nix index 5a668dc..2adddc3 100644 --- a/modules/home/programs/gui/pcmanfm/default.nix +++ b/modules/home/programs/gui/pcmanfm/default.nix @@ -2,56 +2,37 @@ { home = { packages = with pkgs; [ - pcmanfm-qt + pcmanfm file-roller ]; file = { - ".config/pcmanfm-qt/default/settings.conf".text = '' - [Behavior] - BookmarkOpenMethod=current_tab - ConfirmDelete=true - RecentFilesNumber=0 - - [Desktop] - HideItems=false - SortColumn=name - SortFolderFirst=true - SortHiddenLast=false - SortOrder=ascending - - [FolderView] - Mode=icon - ScrollPerPixel=true - ShadowHidden=true - ShowFilter=false - ShowFullNames=true - ShowHidden=true - SortCaseSensitive=false - SortColumn=mtime - SortFolderFirst=true - SortHiddenLast=false - SortOrder=descending - - [Places] - HiddenPlaces=menu://applications/, network:///, computer:///, /home/${config.home.username}/Desktop - - [System] - Archiver=file-roller - Terminal=foot - - [Thumbnail] - MaxExternalThumbnailFileSize=-1 - MaxThumbnailFileSize=4096 - ShowThumbnails=true - ThumbnailLocalFilesOnly=false - - [Window] - AlwaysShowTabs=false - PathBarButtons=true - ShowMenuBar=true - ShowTabClose=true - SwitchToNewTab=true - TabPaths=@Invalid() + ".config/pcmanfm/default/pcmanfm.conf".text = '' + [config] + bm_open_method=0 + + [volume] + mount_on_startup=0 + mount_removable=1 + autorun=0 + + [ui] + always_show_tabs=0 + max_tab_chars=32 + win_width=943 + win_height=1039 + splitter_pos=150 + media_in_new_tab=0 + desktop_folder_new_win=0 + change_tab_on_drop=1 + close_on_unmount=1 + focus_previous=0 + side_pane_mode=places + view_mode=icon + show_hidden=1 + sort=name;ascending; + toolbar=newtab;navigation;home; + show_statusbar=1 + pathbar_mode_buttons=0 ''; }; }; diff --git a/modules/home/programs/gui/rofi/default.nix b/modules/home/programs/gui/rofi/default.nix index acd636a..eff39cc 100644 --- a/modules/home/programs/gui/rofi/default.nix +++ b/modules/home/programs/gui/rofi/default.nix @@ -127,7 +127,7 @@ home.packages = with pkgs; [ (pkgs.writeScriptBin "rofiscripts" '' # Scratchpad function - handle_scratchpads() { + scratchpads() { SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads") case $SCRATCHPADS in Gotop) foot -a gotop -T Gotop gotop;; @@ -138,43 +138,24 @@ } # Lock menu - handle_power() { + power() { POWER=$(echo -e "Shutdown\nReboot\nSleep\nLock\nKill" | rofi -dmenu -i -p "Power") case $POWER in Shutdown) poweroff;; Reboot) reboot;; Sleep) swaysleep &;; Lock) swaylock &;; - Kill) pkill -9 sway;; - esac - } - - # Resolutions - handle_resolutions() { - RET=$(echo -e "Default\nWide\nGPU2" | rofi -dmenu -i -p "Resolutions") - case $RET in - Default) swaymsg reload ;; - Wide) swaymsg " - output ${config.displays.d1} enable pos 1680 0 mode 1680x1050@59.954Hz - output ${config.displays.d2} enable pos 0 0 mode 1680x1050@59.954Hz - output ${config.displays.d3} enable pos 3360 0 transform 0 - ";; - GPU2) swaymsg " - output ${config.displays.d2} enable pos 1680 0 mode 1920x1080@60Hz - output ${config.displays.d3} enable pos 0 0 transform 0 - ";; + Kill) pkill -9 $XDG_CURRENT_DESKTOP;; esac } # Check for command-line arguments if [ "$1" == "--scratchpads" ]; then - handle_scratchpads + scratchpads elif [ "$1" == "--power" ]; then - handle_power - elif [ "$1" == "--resolutions" ]; then - handle_resolutions + power else - echo "Please use a valid argument." + echo "Please --scratchpads or --power." fi '') rofi-bluetooth diff --git a/modules/home/programs/terminal/neovim/default.nix b/modules/home/programs/terminal/neovim/default.nix index 9573332..ed8cd57 100644 --- a/modules/home/programs/terminal/neovim/default.nix +++ b/modules/home/programs/terminal/neovim/default.nix @@ -34,6 +34,9 @@ # Nerdtree nerdtree vim-nerdtree-syntax-highlight + + # Misc languages + kdl-vim ]; extraConfig = '' lua < /dev/null; then - export LIBVA_DRIVER_NAME=nvidia - export GBM_BACKEND=nvidia-drm - export __GLX_VENDOR_LIBRARY_NAME=nvidia - else - : - fi - - export XDG_CURRENT_DESKTOP=sway - export QT_QPA_PLATFORM="wayland;xcb" - - sway --unsupported-gpu - ''; - in { + services.greetd = { enable = config.system.desktop.enable; restart = true; settings = { @@ -24,10 +8,32 @@ vt = 2; switch = true; }; - default_session = { - command = "${startSway}"; - user = "jimbo"; - }; + default_session.command = "${pkgs.cage}/bin/cage -d -m last ${pkgs.greetd.gtkgreet}/bin/gtkgreet"; }; }; + + environment.etc."greetd/environments".text = let + initScript = '' + if ${pkgs.pciutils}/bin/lspci -k | grep "in use: nvidia" &> /dev/null; then + export LIBVA_DRIVER_NAME=nvidia + export GBM_BACKEND=nvidia-drm + export __GLX_VENDOR_LIBRARY_NAME=nvidia + else + : + fi + ''; + in '' + ${pkgs.writeScript "startsway" '' + ${initScript} + export QT_QPA_PLATFORM="wayland;xcb" + export XDG_CURRENT_DESKTOP=sway + sway --unsupported-gpu + ''} + ${pkgs.writeScript "startniri" '' + ${initScript} + export QT_QPA_PLATFORM=wayland + export XDG_CURRENT_DESKTOP=niri + niri-session + ''} + ''; } diff --git a/modules/system/programs/qt/default.nix b/modules/system/programs/qt/default.nix deleted file mode 100644 index f887517..0000000 --- a/modules/system/programs/qt/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: -{ - qt = { - enable = config.system.desktop.enable; - style = "gtk2"; - platformTheme = "gtk2"; - }; -} diff --git a/modules/system/programs/sway/default.nix b/modules/system/programs/sway/default.nix deleted file mode 100644 index 872674c..0000000 --- a/modules/system/programs/sway/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: -{ - imports = [ ./greetd ]; - - programs.sway = { - enable = config.system.desktop.enable; - extraPackages = with pkgs; [ swaylock ]; - }; - - services.dbus.enable = config.system.desktop.enable; - security.pam.services.swaylock = {}; -} diff --git a/modules/system/services/general/portals/default.nix b/modules/system/services/general/portals/default.nix index 6554b68..67b03e0 100644 --- a/modules/system/services/general/portals/default.nix +++ b/modules/system/services/general/portals/default.nix @@ -1,11 +1,14 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { - xdg.portal.wlr = { - enable = config.system.desktop.enable; - settings.screencast = { - max_fps = 60; - chooser_type = "simple"; - chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099"; + xdg.portal = { + wlr = { + enable = lib.mkForce config.system.desktop.enable; + settings.screencast = { + max_fps = 60; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099"; + }; }; + extraPortals = with pkgs; [ xdg-desktop-portal-gnome ]; }; }