Add pcmanfm-qt

This commit is contained in:
ItsDrike 2024-06-24 20:35:36 +02:00
parent 4c86bb8ce6
commit 32bebe0adc
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
6 changed files with 180 additions and 1 deletions

View file

@ -5,5 +5,6 @@ _: {
./apps ./apps
./bars ./bars
./browsers ./browsers
./file-managers
]; ];
} }

View file

@ -0,0 +1,5 @@
{
imports = [
./pcmanfm-qt
];
}

View file

@ -0,0 +1,145 @@
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.file-managers.pcmanfm-qt;
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [ lxqt.pcmanfm-qt ];
xdg.configFile."pcmanfm-qt/default/settings.conf".text = lib.generators.toINI {} {
Behavior = {
AutoSelectionDelay = 600;
BookmarkOpenMethod = "current_tab";
ConfirmDelete = true;
ConfirmTrash = false;
CtrlRightClick = false;
NoUsbTrash = false;
QuickExec = false;
RecentFilesNumber = 0;
SelectNewFiles = false;
SingleClick = false;
SingleWindowMode = false;
UseTrash = true;
};
Desktop = {
AllSticky = false;
BgColor = "#000000";
DesktopCellMargins = "@Size(3 1)";
DesktopIconSize = 48;
DesktopShortcuts = "@Invalid()";
FgColor = "#ffffff";
Font = "Noto Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1";
HideItems = false;
# LastSlide=
OpenWithDefaultFileManager = false;
PerScreenWallpaper = false;
ShadowColor = "#000000";
ShowHidden = false;
SlideShowInterval = 0;
SortColumn = "name";
SortFolderFirst = true;
SortHiddenLast = false;
SortOrder = "ascending";
TransformWallpaper = false;
#Wallpaper=
WallpaperDialogSize = "@Size(700 500)";
WallpaperDialogSplitterPos = 200;
# WallpaperDirectory=
WallpaperMode = "none";
WallpaperRandomize = false;
WorkAreaMargins = "12, 12, 12, 12";
};
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 = false;
searchNameRegexp = true;
searchRecursive = false;
searchhHidden = false;
};
System = {
Archiver = cfg.archiverCmd;
FallbackIconThemeName = "oxygen";
OnlyUserTemplates = false;
SIUnit = false;
SuCommand = "${pkgs.lxqt.lxqt-sudo}/bin/lxqt-sudo %s";
TemplateRunApp = false;
TemplateTypeOnce = false;
Terminal = cfg.terminalCmd;
};
Thumbnail = {
MaxExternalThumbnailFileSize = -1;
MaxThumbnailFileSize = 40960; # 40 MB
ShowThumbnails = true;
ThumbnailLocalFilesOnly = true;
};
Volume = {
AutoRun = true;
CloseOnUnmount = true;
MountOnStartup = false;
MountRemovable = false;
};
Window = {
AlwaysShowTabs = true;
FixedHeight = 480;
FixedWidth = 640;
LastWindowHeight = 1168;
LastWindowMaximized = true;
LastWindowWidth = 960;
PathBarButtons = true;
RememberWindowSize = true;
ReopenLastTabs = false;
ShowMenuBar = true;
ShowTabClose = true;
SidePaneMode = "places";
SidePaneVisible = true;
SplitView = false;
SplitViewTabsNum = 0;
SplitterPos = 150;
SwitchToNewTab = false;
TabPaths = "@Invalid()";
};
};
};
}

View file

@ -6,11 +6,12 @@
cfg = osConfig.myOptions.home-manager.programs; cfg = osConfig.myOptions.home-manager.programs;
in { in {
xdg.mimeApps = let xdg.mimeApps = let
# TODO: Make options for these
browser = "firefox.desktop"; browser = "firefox.desktop";
textEditor = browser; # nvim doesn't work properly with xdg-open, just use the browser textEditor = browser; # nvim doesn't work properly with xdg-open, just use the browser
emailClient = browser; emailClient = browser;
documentViewer = browser; # TODO: consider zathura (org.pwmt.zathura.desktop.desktop) documentViewer = browser; # TODO: consider zathura (org.pwmt.zathura.desktop.desktop)
fileManager = "pcmanfm-qt.desktop"; # TODO: change fileManager = "pcmanfm-qt.desktop";
archiveManager = "org.kde.ark.desktop"; archiveManager = "org.kde.ark.desktop";
imageViewer = imageViewer =
if cfg.applications.qimgv.enable if cfg.applications.qimgv.enable

View file

@ -88,9 +88,11 @@
".local/share/go" ".local/share/go"
]; ];
extraFiles = [ extraFiles = [
".config/gtk-3.0/bookmarks"
".config/git/git-credentials" ".config/git/git-credentials"
".cache/walker/history.gob" ".cache/walker/history.gob"
".local/share/zsh/zsh_history" ".local/share/zsh/zsh_history"
".config/pcmanfm-qt/default/recent-files.conf"
]; ];
}; };
@ -194,6 +196,9 @@
}; };
}; };
}; };
file-managers = {
pcmanfm-qt.enable = true;
};
}; };
services = { services = {

View file

@ -48,6 +48,28 @@ in
mpv.enable = mkEnableOption "MPV (General-purpose media player)"; mpv.enable = mkEnableOption "MPV (General-purpose media player)";
}; };
file-managers = {
pcmanfm-qt = {
enable = mkEnableOption "Pcmanfm-qt (extremely fast and lightweight file manager and the standard file manager of LXDE)";
terminalCmd = mkOption {
type = types.str;
default = "kitty";
description = ''
Command used to open the terminal emulator.
'';
};
archiverCmd = mkOption {
type = types.str;
default = "ark";
description = ''
Command used to open the archiver (zip/tar explorer).
'';
};
};
};
tools = { tools = {
fastfetch.enable = mkEnableOption "FastFetch (fast neofetch)"; fastfetch.enable = mkEnableOption "FastFetch (fast neofetch)";
hyfetch.enable = mkEnableOption "Neofetch with pride flags"; hyfetch.enable = mkEnableOption "Neofetch with pride flags";