dotfiles

My PC Dotfiles & Website
commit f874b65fa3732916260cc2293e51ea04be853864
parent 5c0af10e564cf926d5df08d87ac3928f9622e30f
Author: maydayv7 <maydayv7@gmail.com>
Date:   Fri, 21 Mar 2025 20:43:18 +0530

feat(Hyprland): Use `pcmanfm-qt` to render desktop icons

Diffstat:

MREADME.md | 2++
Mfiles/flake.nix | 16+++++++++++-----
Afiles/hyprland/pcmanfm.conf | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/images/transparent.png | 0
Mmodules/gui/desktop/hyprland/apps/files.nix | 55+++++++++++++++++++++++++++++++++++++++++--------------
Mmodules/gui/desktop/hyprland/apps/settings.nix | 2+-
Mmodules/gui/desktop/hyprland/apps/utilities.nix | 1-
Dpackages/desktop-icons/default.nix | 45---------------------------------------------
Dpackages/desktop-icons/metadata.nix | 6------
9 files changed, 171 insertions(+), 72 deletions(-)

diff --git a/README.md b/README.md @@ -514,6 +514,8 @@ You can navigate to the `README`s present in the various directories to know mor ### NEXT - Update Hyprland to v0.47.1 + - Use `hyprswitch` to switch between windows + - Use `pcmanfm-qt` to render desktop icons ### v25 diff --git a/files/flake.nix b/files/flake.nix @@ -69,8 +69,8 @@ # Hyprland WM hyprland = { - # Keybinds Viewer - kebihelp = readFile ./hyprland/kebihelp.json; + # Pyprland + pypr = readFile ./hyprland/pypr.toml; # Clipboard Manager clipse = map.files { @@ -79,8 +79,11 @@ extension = ".json"; }; - # Pyprland - pypr = readFile ./hyprland/pypr.toml; + # Keybinds Viewer + kebihelp = readFile ./hyprland/kebihelp.json; + + # PcmanFM File Manager + pcmanfm = readFile ./hyprland/pcmanfm.conf; } // map.files { directory = ./hyprland/theme; @@ -89,7 +92,10 @@ }; # Pictures - images.profile = ./images/Profile.png; + images = { + profile = ./images/Profile.png; + transparent = ./images/transparent.png; + }; # Logseq Notes logseq = { diff --git a/files/hyprland/pcmanfm.conf b/files/hyprland/pcmanfm.conf @@ -0,0 +1,116 @@ +[Behavior] +AutoSelectionDelay=600 +BookmarkOpenMethod=current_tab +ConfirmDelete=true +ConfirmTrash=false +CtrlRightClick=false +NoUsbTrash=false +QuickExec=false +RecentFilesNumber=0 +SelectNewFiles=false +SingleClick=false +SingleWindowMode=true +UseTrash=true + +[Desktop] +AllSticky=true +BgColor=#000000 +DesktopCellMargins=@Size(3 1) +DesktopIconSize=48 +DesktopShortcuts=@Invalid() +FgColor=#ffffff +Font="@font,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" +HideItems=false +LastSlide= +OpenWithDefaultFileManager=true +PerScreenWallpaper=false +ShadowColor=#000000 +ShowHidden=false +SlideShowInterval=0 +SortColumn=name +SortFolderFirst=true +SortHiddenLast=false +SortOrder=ascending +TransformWallpaper=false +Wallpaper=@wallpaper +WallpaperDialogSize=@Size(700 500) +WallpaperDialogSplitterPos=200 +WallpaperDirectory= +WallpaperMode=stretch +WallpaperRandomize=false +WorkAreaMargins=15, 60, 15, 30 + +[FolderView] +BackupAsHidden=false +BigIconSize=48 +CustomColumnWidths=@Invalid() +FolderViewCellMargins=@Size(3 3) +HiddenColumns=@Invalid() +Mode=icon +NoItemTooltip=false +ScrollPerPixel=true +ShadowHidden=true +ShowFilter=false +ShowFullNames=true +ShowHidden=false +SidePaneIconSize=24 +SmallIconSize=24 +SortCaseSensitive=false +SortColumn=name +SortFolderFirst=true +SortHiddenLast=false +SortOrder=ascending +ThumbnailIconSize=128 + +[Places] +HiddenPlaces=@Invalid() + +[Search] +ContentPatterns=@Invalid() +MaxSearchHistory=0 +NamePatterns=@Invalid() +searchContentCaseInsensitive=false +searchContentRegexp=true +searchNameCaseInsensitive=true +searchNameRegexp=false +searchRecursive=true +searchhHidden=true + +[System] +Archiver=@archiver +FallbackIconThemeName=@icon +OnlyUserTemplates=true +SIUnit=false +SuCommand=lxqt-sudo %s +TemplateRunApp=false +TemplateTypeOnce=false +Terminal=@terminal + +[Thumbnail] +MaxExternalThumbnailFileSize=-1 +MaxThumbnailFileSize=4096 +ShowThumbnails=true +ThumbnailLocalFilesOnly=true + +[Volume] +AutoRun=true +CloseOnUnmount=true +MountOnStartup=false +MountRemovable=false + +[Window] +AlwaysShowTabs=false +FixedHeight=480 +FixedWidth=640 +PathBarButtons=true +RememberWindowSize=false +ReopenLastTabs=false +ShowMenuBar=true +ShowTabClose=true +SidePaneMode=places +SidePaneVisible=true +SplitView=false +SplitViewTabsNum=0 +SplitterPos=150 +SwitchToNewTab=false +TabPaths=@Invalid() diff --git a/files/images/transparent.png b/files/images/transparent.png Binary files differ. diff --git a/modules/gui/desktop/hyprland/apps/files.nix b/modules/gui/desktop/hyprland/apps/files.nix @@ -6,8 +6,9 @@ files, ... }: let - inherit (lib) hm getExe getExe'; - inherit (config.gui.launcher) terminal; + inherit (lib) hm getExe getExe' replaceStrings; + inherit (config.gui) icons launcher; + inherit (launcher) terminal; nemo = pkgs.nemo-with-extensions; in { ## File Manager Configuration @@ -18,10 +19,16 @@ in { cinnamon-desktop bulky file-roller + lxqt.pcmanfm-qt ]); user = { - persist.directories = [".config/nemo" ".local/share/nemo"]; + persist.directories = [ + ".config/nemo" + ".local/share/nemo" + ".config/pcmanfm-qt" + ]; + homeConfig = { xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { directory = ["nemo.desktop"]; @@ -64,17 +71,37 @@ in { unset DCONF_DBUS_RUN_SESSION ''; - # Open in Terminal - file.".local/share/nemo/actions/terminal.nemo_action".text = '' - [Nemo Action] - Name=Open in Terminal - Comment=Opens ${terminal} in the selected folder - Exec=${terminal} --working-directory=%F - Icon-Name=${terminal} - Selection=any - Extensions=dir; - EscapeSpaces=true - ''; + file = { + # Open in Terminal + ".local/share/nemo/actions/terminal.nemo_action".text = '' + [Nemo Action] + Name=Open in Terminal + Comment=Opens ${terminal} in the selected folder + Exec=${terminal} --working-directory=%F + Icon-Name=${terminal} + Selection=any + Extensions=dir; + EscapeSpaces=true + ''; + + # Desktop Icons + ".config/pcmanfm-qt/default/settings.conf".text = + replaceStrings [ + "@icon" + "@font" + "@terminal" + "@wallpaper" + "@archiver" + ] + [ + icons.name + config.stylix.fonts.sansSerif.name + terminal + (builtins.toString files.images.transparent) + "file-roller" + ] + files.hyprland.pcmanfm; + }; }; }; }; diff --git a/modules/gui/desktop/hyprland/apps/settings.nix b/modules/gui/desktop/hyprland/apps/settings.nix @@ -64,7 +64,7 @@ in { "clipse -listen" # Desktop Icons - "dicons" + "pcmanfm-qt --desktop" # Window Switcher "hyprswitch init --workspaces-per-row 3 --custom-css ${toFile "style.css" (build.theme { diff --git a/modules/gui/desktop/hyprland/apps/utilities.nix b/modules/gui/desktop/hyprland/apps/utilities.nix @@ -11,7 +11,6 @@ in { environment.systemPackages = with pkgs; [ # Apps clipse - custom.desktop-icons custom.kebihelp font-manager gnome-clocks diff --git a/packages/desktop-icons/default.nix b/packages/desktop-icons/default.nix @@ -1,45 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; let - metadata = import ./metadata.nix; -in - stdenv.mkDerivation rec { - pname = "desktop-icons"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "Geronymos"; - repo = pname; - inherit (metadata) rev sha256; - }; - - nativeBuildInputs = [wrapGAppsHook]; - buildInputs = [ - gtk3 - gtk-layer-shell - pkg-config - ]; - - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; - preFixup = '' - gappsWrapperArgs+=( - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS" - ) - ''; - - installPhase = '' - mkdir -p $out/bin - cp -r dicons $out/bin/dicons - ''; - - meta = with lib; { - mainProgram = "dicons"; - description = "Show Files from a Directory on Wayland Desktop"; - homepage = metadata.repo; - license = licenses.gpl3Only; - maintainers = ["maydayv7"]; - }; - } diff --git a/packages/desktop-icons/metadata.nix b/packages/desktop-icons/metadata.nix @@ -1,6 +0,0 @@ -{ - repo = "https://github.com/Geronymos/desktop-icons"; - branch = "main"; - rev = "5a1f4e12fcf405df7daf0986eb580efaad37c3c2"; - sha256 = "sha256-Hp+eMai0KhFsD8rgs5TaEVSNviF9MhyNfKttzekAgQg="; -}