Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange behaviour when desktop is set to home #1867

Open
SArpnt opened this issue Feb 15, 2024 · 6 comments
Open

strange behaviour when desktop is set to home #1867

SArpnt opened this issue Feb 15, 2024 · 6 comments
Labels

Comments

@SArpnt
Copy link

SArpnt commented Feb 15, 2024

Expected Behavior

see possible solution

Current Behavior

image
if i click the home folder, it highlights the home folder on the left, and says Desktop at the top, even though the folder name
is not Desktop and the purpose of the folder is not as a desktop.
if i click Desktop, it highlights until i let go of the mouse button, which then it highlights the home folder on the left and behaves the same. if i right click on the left to hide Home or Desktop, both hide at the same time, and both unhide at the same time.

Possible Solution

if the desktop directory is the home directory, remove Desktop from the list and treat home as home.

Steps to Reproduce (for bugs)
  1. in ~/config/user-dirs.dirs, set XDG_DESKTOP_DIR to "$HOME"
  2. maybe update user dirs with whatever relevant xdg command
  3. view file manager
Context

i use sway, and my own system of organizing files. there's no desktop icons, so a Desktop directory doesn't make sense.
my user-dirs.dirs file looks like this

XDG_DESKTOP_DIR="$HOME"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME"
XDG_DOCUMENTS_DIR="$HOME"
XDG_MUSIC_DIR="$HOME"
XDG_PICTURES_DIR="$HOME"
XDG_VIDEOS_DIR="$HOME"

if there's a way to completely unset the desktop dir, i would prefer it but i haven't seen any way to do that.
trying to leave the string empty just causes it to reset to default.

System Information
  • PcManFm-qt version: 1.4.1-1
  • Distribution & Version: arch linux
  • Qt Version: 5.15.12+kde+r150-1
  • liblxqt Version: 5.15.12+kde+r150-1
@tsujan tsujan changed the title strange behaviour on overlapping home and desktop strange behaviour when desktop is set to home Feb 15, 2024
@tsujan
Copy link
Member

tsujan commented Feb 15, 2024

Your report is valid, although it isn't usual to set home as desktop.

if there's a way to completely unset the desktop dir, i would prefer it

You can try to set it to an empty, hidden directory and hide it in the side pane.

@tsujan tsujan added the later label Feb 15, 2024
@tsujan
Copy link
Member

tsujan commented Feb 15, 2024

Actually, you don't need to change Desktop. Instead, you could leave it as it is in a normal setup and just hide Desktop in the side-pane as well as in the view by adding it to ~/.hidden. See https://github.com/lxqt/pcmanfm-qt/wiki#hiding-filesfolders-without-renaming-them

@SArpnt
Copy link
Author

SArpnt commented Feb 15, 2024

i've seen people suggesting things relating to hiding the desktop folder somewhere, but that's still an annoying folder that clutters up some place (i still have to very regularly view hidden files, and i've already spent plenty of time cleaning them up), and programs will still interact with it in annoying ways, likely putting stuff in it that i have to go and clean up.

it looks like many other people use the solution i found too:
https://martijnvos.dev/removing-the-desktop-directory/
https://old.reddit.com/r/archlinux/comments/t06ffu/avoid_creation_of_desktop_folder/
https://unix.stackexchange.com/questions/37922/how-to-prevent-the-auto-creation-of-the-desktop-folder

other things don't work properly. last i remember, steam will just create a Desktop folder and put the icon in it if you don't have the directory set somewhere. many programs similarly create the various xdg folders if they don't exist. in fact, it's impossible to actually have it unset, xdg will just leave it as default if you try that.

for example, this post claims to give a way to unset it: https://forums.fedoraforum.org/showthread.php?311202-Nautilus-can-you-get-rid-of-quot-Desktop-quot-folder&s=9fc4b1cd8b55bf708b2609b55826e8cd&p=1769177#post1769177
if i do this and run xdg-user-dir DESKTOP, it still gives /home/sarpnt/Desktop, and pcmanfm-qt tries and fails to go to that directory.

@tsujan
Copy link
Member

tsujan commented Feb 15, 2024

Did you even read my comment?!

@SArpnt
Copy link
Author

SArpnt commented Feb 16, 2024

yes, that's addressed in the first sentence. i've seen the suggestion, and if you make some hidden file to make other files hidden, now that's two files that still clutter up space because every time i use a file manager it's still more useful for me to view hidden files because that's often still something i need to manage. i've never seen a hidden file that if i didn't know was there, wouldn't cause some kind of problem later. hidden folders still accumulate weird and sometimes important files. hidden folders and files still take up disk space. many programs create hidden files, and can't have the directory changed, and i often need to manage and keep track of those files.

hiding files doesn't work because in practice, when i'm managing files, they're never even hidden, they're just greyed out and won't autocomplete.

the point i wanted to make is that what i'm doing is a common solution done by many people, and the other solutions have their own issues.. i didn't dwell on your specific solution because then it just sounds like i'm complaining about it, when it's not really relevant to the file manager bug. i was just worried that i would look back in a day and find that the issue was closed as a wontfix or such because you thought your solution was a better workaround (i've seen that happen quite often on other projects).

@tsujan
Copy link
Member

tsujan commented Feb 16, 2024

i was just worried that i would look back in a day and find that the issue was closed as a wontfix

You gave a clear description of pcmanfm-qt's behavior, which seems to be about a problem in our code. An issue is an issue, regardless of stories behind it or how rarely it may happen. And thanks for the report.

Your long comments about your personal preferences make no difference. I just proposed a workaround, which you apparently didn't like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants