How do you tidy your home, aka `tree -L2 ~` - Desktop Customization & Workflow

Users browsing this thread: 4 Guest(s)
josuah
Long time nixers
tmpfs for the download directory, great idea (that I have seen above too) !

At work I have all documentation put on a sshfs in the meantime that the team agree on a documentation tool for all (zillion of stuff deployed and still using the good'ol system).

And SSHFS lets you mount a directory only accessible to the user.

It is fun to see 'access denied' when you are root. :)

That introduces to distributed systems where authentication is omnipresent.
venam
Administrators
In the same spirit of the past 2 weeks thread promotion, let's have an insider's look at how you organize your machine. How do you tidy your home?
That's a simple question on its own, but knowing why you organize it that way can give insights on techniques others might not have previously considered.

I'll start with mine:

Code:
.
├── docu
│   ├── bin
│   ├── myself
│   ├── programming
│   └── psychology
├── dot
│   ├── ... # a lot of dots)
│   ├── backup.sh # script to backup on external HDD
│   ├── pkgs # list of all installed software
│   ├── setup.sh # script to set all the dots as symlinks in the right places
│   ├── user-dirs.dirs # XDG environment, important
│   └── ... # more dots
├── downloads
│   └── ... # temporary dir for downloaded files
├── Dropbox
│   ├── impure
│   ├── .. impure61 through ..
│   ├── impure78
│   └── mushrooms
├── junk
│   └── ... # temporary working dir for non-important stuff
├── media
│   ├── ascii
│   ├── audio_books
│   ├── books
│   ├── games
│   ├── images
│   ├── manga
│   ├── musics
│   ├── os
│   ├── recordings
│   ├── Remi
│   └── videos
└── Recordings -> /home/vnm/media/recordings/

Looking back at it, I think it's a bit of a mess to have multiple "temporary" directories. But that's still a big improvement from my previous setup.

Somewhat on topic, I recently found this repo.
s0kx
Members
I'm kinda forced to keep all my school work in the magical cloud, so that's why my setup might look a bit empty.
Code:
.
├── bin
│   ├── bcr        # Get direct link to bandcamp's audio files
│   ├── bm         # dmenu bookmarks
│   ├── ddg        # dmenu search bar
│   ├── mon.sh     # xrandr script
│   ├── pdf        # dmenu pdf selector
│   ├── r          # browse reddit in acme
│   ├── vol        # volume management
│   └── yt         # Emergency "replacement" for broken youtube-dl
├── GNUstep
│   ├── Defaults
│   └── Library
├── img
│   ├── bitmap-walls
│   └── cafe.jpg   # Current wallpaper
├── mbox
├── pdf
│   └── CoursePlan.pdf
└── src
    ├── dmenu
    ├── dockapps
    ├── dunst
    ├── n30f
    ├── swm
    └── teams_1.3.00.25560_amd64.deb
opfez
Members
(12-10-2020, 02:17 AM)venam Wrote: Looking back at it, I think it's a bit of a mess to have multiple "temporary" directories. But that's still a big improvement from my previous setup.
Why not just use /tmp?
venam
Administrators
(12-10-2020, 07:32 AM)opFez Wrote: Why not just use /tmp?
Each is "temporary" but for a different purpose, otherwise I would get confused between files. Also my /tmp is on tmpfs and I don't want these files to disappear after reboot, so it's out of the question.
seninha
Long time nixers
I changed my $HOME a little bit since my last post in this thread:

Code:
/home/phill
|-- .cache/
|-- .config/
|-- .data/
|-- .profile*
|-- .session*
|-- .xprofile*
|-- .xsession*
|-- apps/
|-- files/
|-- mnt/
|-- proj/
|-- rules/
|-- skel/
|-- theme/
|-- tmp/
|-- trash/
|-- usr/
`-- var/

Stuff that changed:
  • ~/.profile and ~/.xprofile are where I set environment variables. ~/.session and ~/.xsession set my terminal and X session, respectively.
  • ~/gpg/ is no more. I don't use gpg to save my passwords anymore, I use openssl now.
  • ~/mail/ moved to ~/var/mail/
  • ~/proj/, ~/files/ and ~/tmp have the same function they had.
  • ~/usr/ is where I put binaries and other files of applications. Each subdirectory is for a different application. I use environment variables to set $PATH and $MANPATH to the corresponding directories in each ~/usr/*/.
  • ~/skel/: Where I keep templates and skeleton, for example, ~/skel/c/ has the skeleton of C programs I write, etc.
  • ~/trash/: Where I send my trash to, see fmutils for the scripts that manages the trash.
  • ~/apps/: Where I keep .desktop entries for each application that has an entry in pmenu.
  • ~/mnt/: Where I mount devices.
  • ~/rules/: Where I keep configuration files (or rules files, as I call them) and databases for applications. For example, ~/rules/vimrc is my vimrc, ~/rules/rss contains the list of RSS I'm subscribed to, ~/rules/mime contains the mimetype-application associations that I use with my file-opener script xopen.
  • ~/themes/: Where I put fonts, cursor themes, icon themes, Xresources, etc.
  • ~/var/: Where I keep variable stuff. It is a new directory I added recently. It contains stuff like cache, browsing history, shell history, mail. I may move ~/trash/ there.

I'm working on ~/fav/ to keep bookmarks and on a script that symlinks entries on this directory to commonly used files.
yakumo.izuru
Members
I definitely think my ~/ could be a lot worse, lol.
(side note: not the full listing because there are a ton of files XD)

Code:
akoizumi@mizuki: ~ tree -L 1
.
├── Android
├── Books
├── COPYING
├── Desktop
├── Documents
├── Downloads
├── Local -> .local
├── Mail
├── Music
├── Pictures
├── Public
├── README
├── RPi
├── Repositories
├── Settings -> .config
├── Templates
├── Torrents
└── Videos

16 directories, 2 files
josuah
Long time nixers
I am slowly moving toward using multiple users in /home just for myself:

* I have been the only one using my computer actively
* even if sharing it like a UNIX server, it makes sense to organise things like this (see below).
* UNIX user are not an unit to count human beings, but rather system users.
* static paths for data: can hardcode i.e /home/backup in custom scripts
* uniform permissions: cd /home && for x in *; do chown $x:$x $x; chmod 750 $x; done
* this reduces opportunity of human errors or doubt by having only 1 place in the whole system to apply protection for any kind for user data.
* does not mess with the software-specific permissions (no need to apply custom permissions to /var, /etc, /usr...)
* easy to design "operators" users that have access to these data, but without access in the other direction, by adding the i.e josuah user to these groups
* works well in shared work/perso environments: can have the convention to put a "$workplace" account on
all machines to use it on local scripts or user name, rather than ~/work/...
* same feature as these "cd wrapper scripts" for free with "su -l $user" that places you in the user of choice
and lets you come back to the original shell session with Ctrl+D (works with any shell ever).
* permits custom startup shells for specific purposes (see /home/weechat below)
* for free: I can now target each user's networking, quotas, permissions... from various configuration files

The real advantage in all that, is that it removes one important doubt: where will my data be, under which user.

In other words: welcome to the power of UNIX user permission management!

For instance:

/home/src - I git clone all media at the root of that directory.
That way, even if I run make on something freshly cloned from a compromised github account,
it only accesses /home/src and not (for instance) /home/josuah/Maildir

/home/pack - same as above, but for repos that I install with "make install".
I also have a small script to automate downloading and installing things here,
See z3bra's pm(8) for something nice.

/home/backup - as backups might contain sensible data from other systems, they
are isolated onto a specific user. Any system that stores backups have this
/home/backup

/home/weechat - a ~/.shell script is the start shell for this user that spins weechat
right away. From another user, "su -l weechat" attaches the current weechat session
using https://github.com/martanne/abduco or from remote, "ssh weechat@josuah.net"
and you are in right away. An IRC client vulnerability will not permit executing
/bin/sh nor accessing /home/josuah/Maildir.

/home/git - an example that you probably already do for being able to
git clone git@example.com:wonderful-project

/home/transmission - there is only one transmission-daemon running but multiple users
might be interested in it, so a dedicated user solves it. This also makes it a good
temporary storage to apply quotas on, so that the /home does not get filled with too
large torrent files.

/home/_sysupgrade - the (OpenBSD) system might itself make use of /home! It fits nicely
in this model where users have a purpose, rather than an human identity.

/home/{dn42,mirror,openstreetmap,...} - from times to time, I want to have a dedicated
location for some specific data, such as DN42 (not in that game anymore alas!) records
along with a dn42 user that can rsync network databases of any kind and what not, or
maybe some day I want to deal with these OpenStreetMap data files and store them in a
dedicated user with its own disk... I do not feel like adding a disk too far under
/home/.../.../.../ as I will never remember it! Anything special that happen with
permissions or mounts happens at a *single* point in hierarchy: /home.

That's all folks!
josuah
Long time nixers
Remarks

Short note on /home/src related to OpenBSD: there is not enough room on /usr to fit /usr/obj, /usr/src, /usr/ports on my system, so these three are symlinks to matching subdirectories of /home/src/openbsd/.
This also fits OpenBSD's advise to have a separate dedicated user for compiling the system sources, eventually adding regular users for them.

Frequently encountered situation: I am in the middle of /home/josuah/Music, and want to quick git clone a github repo so I can actually grep the thing without waiting Github slow datacenters to move their arses. If it was too uncomfortable, I would never have done it. Since that move, I do: "doas su -l src; git clone $url" (doas might be sudo on Linux) and bam! I can resume to whatever I was doing in a blast without changing my shell history or working directory thanks to "su -l".

The whole thing might feel weird, or even flawed (I'd love to hear your impression :) if you think either!). And I am usually doubting on how to organise the rest in /home/josuah/. Everyone's posts above help me organise my own mess!
josuah
Long time nixers
This mode of "tidy bazaar" organisation (overly flexible in order to never be messy whatever mess you throw at it) encountered here and there reminds me what Bogatin often says:

Quote:Do not consider that things to work thanks to how we design them, consider them to work in spite of how we design them.
r1w1s1
Members
try to keep the things simple.
  • .dotfiles (git repo)
  • bin
  • Projects/{github,codeberg}

And the rest keep the default
r1w1s1@matrix:~$ tree -L 1
.
├── Desktop
├── Documents
├── Downloads
├── Dropbox
├── Music
├── Pictures
├── Public
├── Templates
├── Videos
__________________
Support Slackware: https://www.patreon.com/slackwarelinux
Support Slackware: https://paypal.me/volkerdi

Mailed donations:
Patrick Volkerding
PO BOX 172, Sebeka, MN 56477
maksim
Members
fun fact: you can rename default directories such as ~/Downloads and others via a file at
Code:
$XDG_CONFIG_HOME/user-dirs.dirs
, it's pretty straightforward:

Code:
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/desk"
XDG_DOWNLOAD_DIR="$HOME/down"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/docs"
XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/pics"
XDG_VIDEOS_DIR="$HOME/vids"
XDG_CONFIG_HOME="$HOME/.config"

make sure to run
Code:
xdg-user-dirs-update
after editing the file.
prx*
Members
My turn:
Code:
/home/prx
|-- Downloads/
|   |-- Fiche-outil_Les_anges_gardiens_.pdf
|   |-- bigfiles/
|   |-- bsd.rd
|   `-- réunon rentrée prof maths.odt
|-- Maildir/
|   |-- archive/
|   |-- difflists/
|   |-- draft/
|   |-- educ/
|   |-- laposte/
|   |-- new/
|   |-- prx/
|   |-- sent/
|   |-- spam/
|   |-- trash/
|   `-- x/
|-- TorBrowser-Data/
|   |-- Browser/
|   `-- Tor/
|-- bin/
|   |-- SUPPRZIC*
|   |-- addbmk*
|   |-- alarm*
|   |-- altnethack*
|   |-- apu2*
|   |-- article++*
|   |-- black*
|   |-- bmk*
|   |-- cali*
|   |-- checkbatt*
|   |-- clip*
|   |-- codesbanques*
|   |-- convert2mp3*
|   |-- convert2opus*
|   |-- convert2wav*
|   |-- convert2webmvp9*
|   |-- cvsdiff*
|   |-- desktop*
|   |-- dlmail*
|   |-- doku2gmi*
|   |-- duallive*
|   |-- dualscreen*
|   |-- dwm*
|   |-- dwm-status*
|   |-- dwmmenu*
|   |-- e*
|   |-- educ*
|   |-- emojisel*
|   |-- en2fr*
|   |-- encrypt-mail.sh*
|   |-- f*
|   |-- fauxstream*
|   |-- feeds*
|   |-- forlater*
|   |-- fr2en*
|   |-- frdstream*
|   |-- g*
|   |-- gemcol*
|   |-- gemfeeds*
|   |-- geoiplookup*
|   |-- getdoku.sh*
|   |-- getytdl*
|   |-- gitdiff*
|   |-- gitpatch*
|   |-- gitsync*
|   |-- gmipp*
|   |-- gz*
|   |-- hash2magnet*
|   |-- imgmod*
|   |-- imgopti*
|   |-- imgred50*
|   |-- impri*
|   |-- impri2*
|   |-- ip*
|   |-- isitup*
|   |-- jeumotprenom*
|   |-- kilproc*
|   |-- loadbmk*
|   |-- local_syncthing*
|   |-- lsdesktop*
|   |-- lyrics*
|   |-- m3ugen.sh*
|   |-- magnet*
|   |-- match*
|   |-- minihtml*
|   |-- mnt*
|   |-- modele*
|   |-- mpd-notifier*
|   |-- mpd-status*
|   |-- mpdupdate*
|   |-- ms*
|   |-- msmtp-enqueue.sh*
|   |-- msmtp-listqueue.sh*
|   |-- msmtp-runqueue.sh*
|   |-- mutt-mailto*
|   |-- muxify*
|   |-- neatvi*
|   |-- nethack*
|   |-- networkcheck*
|   |-- noice*
|   |-- noot*
|   |-- nootnoot*
|   |-- nopen*
|   |-- notd*
|   |-- notes*
|   |-- nsxiv-storeimg
|   |-- off*
|   |-- olab*
|   |-- pdf2jpg*
|   |-- pdfmini*
|   |-- periodict*
|   |-- pixcol*
|   |-- pkg-readmes*
|   |-- play*
|   |-- pokemon*
|   |-- ppt2text*
|   |-- programmecycle3*
|   |-- programmecycle4*
|   |-- proxyssh*
|   |-- prxbckp*
|   |-- prxsync*
|   |-- qemu_run*
|   |-- radio*
|   |-- rdmempw.sh*
|   |-- rdmpass*
|   |-- rdmwall*
|   |-- reboot*
|   |-- record.sh*
|   |-- reload-dwm-status*
|   |-- rmcores*
|   |-- rover*
|   |-- rspamd*
|   |-- sch*
|   |-- scratchterm*
|   |-- screencast*
|   |-- screencolor*
|   |-- screenshot*
|   |-- sctdstop*
|   |-- sere*
|   |-- setwall*
|   |-- shot*
|   |-- show_feed_url*
|   |-- showcal*
|   |-- si3tch*
|   |-- sloweb*
|   |-- slstatus*
|   |-- sms*
|   |-- snippet*
|   |-- soulcoud*
|   |-- sshfs-mount*
|   |-- st*
|   |-- starttmux*
|   |-- status*
|   |-- sw_anyget*
|   |-- sw_checkwatched*
|   |-- sw_cmd*
|   |-- sw_forlater*
|   |-- sw_gemfeeds*
|   |-- sw_mastodon*
|   |-- sw_online*
|   |-- sw_run_cmds*
|   |-- sw_sync_files*
|   |-- sw_whatsinthebox*
|   |-- sync*
|   |-- synccle*
|   |-- tex*
|   |-- tex2png*
|   |-- todo*
|   |-- torrent*
|   |-- tw*
|   |-- twt*
|   |-- twtxt2atom*
|   |-- uloc*
|   |-- umnt*
|   |-- undualscreen*
|   |-- up*
|   |-- up-tools/
|   |-- upm3uzic*
|   |-- uptm*
|   |-- url*
|   |-- urlencode.sh*
|   |-- verse*
|   |-- video2gif*
|   |-- video2ogv*
|   |-- video2wav*
|   |-- vpn*
|   |-- vpndown*
|   |-- vpnup*
|   |-- wall*
|   |-- watch*
|   |-- waybackmachine*
|   |-- weather*
|   |-- websitedl*
|   |-- xdg-set-default*
|   |-- xmenu.sh*
|   |-- ympd*
|   |-- youtube-cli*
|   |-- youtubeatom*
|   |-- yt-dlp*
|   |-- yt2mp3*
|   |-- yt2mpd*
|   |-- yt2opus*
|   |-- ytdl*
|   |-- ytfzf*
|   |-- ytplaylist*
|   |-- ytstream*
|   `-- zim-update.sh*
|-- docs/
|   |-- IMPORTANTS/
|   |-- adresses.txt
|   |-- agenda_poche.ods
|   |-- audio/
|   |-- calculateur_savon.xlsx
|   |-- calendrier_mural_12_feuilles_A4.ods
|   |-- calendrier_perpetuel.ods
|   |-- calendrier_semaine.ods
|   |-- data/
|   |-- img/
|   |-- jeux/
|   |-- teddit_prefs.json
|   |-- textes/
|   |-- videos/
|   `-- zim/
|-- man/
|   |-- man1/
|   `-- mandoc.db
|-- mnt/
|   |-- sd1i/
|   |-- sd2i/
|   |-- sd3i/
|   |-- sd4i/
|   |-- sd5i/
|   |-- sd6i/
|   `-- sshfs/
|-- mpd/
|   `-- musique/
|-- share/
|   `-- man/
|-- sloweb/
|   |-- box/
|   |-- cache/
|   |-- cmds/
|   |-- gemfeeds.txt
|   |-- slowebrc
|   |-- sync-exclude.txt
|   |-- sync-list.txt
|   `-- watched_urls.txt
|-- tmp/
|   `-- stofa.qcow2
|-- wip/
|   |-- affiche_pour_jb.jpg
|   |-- articles/
|   |-- authfail.gz
|   |-- comment-ca-va.txt
|   |-- comment-ca-va.txt.bak
|   |-- fete des peres lucie.mp4
|   |-- generer-enregistrement-tlsa.txt
|   |-- gpgall.txt
|   |-- lalaland.tab
|   |-- logs.gz
|   |-- noroanka_wip/
|   |-- noroanka_wip.tgz
|   |-- ordinateurs_le_temple_de_bretagne/
|   |-- questions_manon.txt
|   |-- txt/
|   `-- tyu/
`-- work/
    |-- archive/
    |-- code/
    |-- educ/
    |-- jda.tld/
    |-- notes/
    |-- obsdports/
    |-- openbsd-ports/
    |-- si3t.ch/
    `-- vm/