Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1334  / 1 Year ago, sat, february 25, 2023, 7:25:49

After an update I ended up with this:



Files quicklist



How can I add the default Files quicklist options which are not bookmarks (Documents, Downloads, Music...)



The same happened to Nautilus when I opened it, but I added the options in ~.config/user-dirs.dirs but now the Launcher icon is missing this options.


More From » 14.04

 Answers
5

The default entries, which are added automatically to the Files launcher icon (not the ones, mentioned in the .desktop file) , are stored in ~/.config/gtk-3.0/bookmarks, as lines in the format:



file:///home/[your_username]/Documents
file:///home/[your_username]/Downloads


etc.



I am afraid you will have to re-enter them manually if the file was messed up somehow.



...Or, if you simply want to use all the entries in ~/.config/user-dirs.dirs, you can use the script below :)



#!/usr/bin/env python3

import os
home = os.getenv("HOME")
exclude = ["Desktop", "Templates"]

with open(home+"/.config/user-dirs.dirs") as locations:
homelinks = [item.replace("
", "").split("$HOME/")[-1][:-1]
for item in locations.readlines() if item.startswith("XDG_")]

with open(home+"/.config/gtk-3.0/bookmarks", "wt") as bookmarks:
for item in homelinks:
if not item in exclude:
bookmarks.write("file://"+home+"/"+item+"
")

[#23598] Sunday, February 26, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
odenanno

Total Points: 207
Total Questions: 113
Total Answers: 94

Location: South Korea
Member since Sat, Oct 2, 2021
3 Years ago
;