https://github.com/angelodibella/dotfiles
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: angelodibella
- Language: Shell
- Default Branch: main
- Size: 13.3 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Dependencies
For Zsh, tmux and NeoVim, run
bash
yay -S direnv eza fd fzf neovim tmux-plugin-manager wget unzip zinit zip zoxide
for the rest of the packages, TODO!
Installation
To clean install (override) the configurations follow these steps.
Clone this repository's desired branch:
bash git clone -b <branch> https://github.com/angelodibella/dotfiles ~/Dotfiles cd ~/DotfilesFor each folder inside
Dotfiles/inspect the directory structure:bash tree -da <folder>now make the directory structure, making sure to delete previous objects in the path:
bash rm -rf /path/to/config/ mkdir -p /directory/structure/Finally, stow each component in
Dotfiles/:bash stow <component>
Further Steps
Follow these steps to make sure everything works as expected.
Note: These are not exhaustive! However, they are the trickiest steps I've found.
Power Configuration
For computers with batteries (e.g., laptops), edit /etc/systemd/logind.conf such that the following lines are uncommented and have the following exact parameters:
ini
[Login]
SleepOperation=suspend-then-hibernate suspend hibernate
HandlePowerKey=suspend-then-hibernate
HandlePowerKeyLongPress=poweroff
HandleLidSwitch=suspend-then-hibernate
IdleAction=ignore
then, similarly for /etc/systemd/sleep.conf with
ini
[Sleep]
AllowSuspendThenHibernate=yes
AllowHybridSleep=no
HibernateDelaySec=2h
HibernateOnACPower=yes
After these modifications, run
bash
sudo systemctl restart systemd-logind.service
sudo systemctl daemon-reload
and, for safety, reboot.
Verification
It is strongly recommended to verify the behavior of this power configuration. First, do some qualitative tests:
1. Execute sudo systemctl sleep from a terminal. The system should suspend. Resume it before the 2-hour HibernateDelaySec elapses. It should resume quickly from RAM.
2. Execute sudo systemctl sleep again. This time, allow the system to remain in suspend for more than 2 hours. Upon resuming after the delay, the system should resume from hibernation. This process is typically slower than resuming from suspend and may involve different visual cues during startup.
Check the same with closing the laptop lid. Between each step, also check logs from systemd-logind and relevant sleep services via
bash
journalctl -u systemd-logind.service -e
bash
journalctl -u systemd-suspend-then-hibernate.service -e
bash
journalctl -b # Review logs since the last boot for messages around sleep/resume events.
wherever applicable. Look for messages indicating which sleep state was entered (e.g., "Starting Suspend...", "Suspending system...", "Waking up to hibernate...", "Starting Hibernate..."), any errors encountered during the process, and confirmation of resume events. During suspend-then-hibernate, scripts executed by systemd-sleep (located in /usr/lib/systemd/system-sleep/) receive an environment variable SYSTEMD_SLEEP_ACTION which will be set to "suspend" during the initial suspend phase and "hibernate" during the subsequent hibernation phase. Log entries from such scripts, if any are present, could also provide clues.
Catppuccin Icons and Cursors
Install the (deprecated) GTK 3/4 Catppuccin themes with yay -S catppuccin-gtk-theme-mocha. Next, install the papirus icon theme via
bash
yay -S papirus-icon-theme
and make it Catppuccin-themed by installing
bash
yay -S papirus-folders-catppuccin-git
and running
bash
papirus-folders -C cat-mocha-flamingo --theme Papirus-Dark
For the cursors, run
bash
yay -S catppuccin-cursors-mocha
Now, using nwg-look, select the desired configurations. Install this yay -S nwg-look.
Rclone systemd Mount
We assume mounting Google Drive and OneDrive to the /mnt directory. To do this, first install rclone via
bash
yay -S rclone
then run, separately,
bash
rclone lsd gdrive:
bash
rclone lsd onedrive:
If the output is positive, continue. Otherwise, the configuration needs fixing.
Start by creating the mountpoints on /mnt:
bash
cd /mnt
sudo mkdir gdrive onedrive
sudo chown angelo gdrive
sudo chown angelo onedrive
Then, create and edit /etc/systemd/user/rclone@.service to include the following:
```ini [Unit] Description=RClone mount of users remote %i using filesystem permissions Documentation=http://rclone.org/docs/ After=network-online.target
[Service] Type=notify
Set up environment
Environment=REMOTENAME="%i" Environment=REMOTEPATH="/" Environment=MOUNTDIR="/mnt/%i" Environment=POSTMOUNTSCRIPT="" Environment=RCLONECONF="%h/.config/rclone/rclone.conf" Environment=RCLONETEMPDIR="/tmp/rclone/%u/%i" Environment=RCLONERCON="false"
Default arguments for rclone mount. Can be overridden in the environment file
Environment=RCLONEMOUNTATTR_TIMEOUT="1s"
TODO: figure out default for the following parameter
Environment=RCLONEMOUNTDAEMONTIMEOUT="UNKNOWNDEFAULT" Environment=RCLONEMOUNTDIRCACHETIME="60m" Environment=RCLONEMOUNTDIRPERMS="0777" Environment=RCLONEMOUNTFILEPERMS="0666" Environment=RCLONEMOUNTGID="%G" Environment=RCLONEMOUNTMAXREADAHEAD="128k" Environment=RCLONEMOUNTPOLLINTERVAL="1m0s" Environment=RCLONEMOUNTUID="%U" Environment=RCLONEMOUNTUMASK="022" Environment=RCLONEMOUNTVFSCACHEMAXAGE="1h0m0s" Environment=RCLONEMOUNTVFSCACHEMAXSIZE="off" Environment=RCLONEMOUNTVFSCACHEMODE="off" Environment=RCLONEMOUNTVFSCACHEPOLLINTERVAL="1m0s" Environment=RCLONEMOUNTVFSREADCHUNKSIZE="128M" Environment=RCLONEMOUNTVFSREADCHUNKSIZE_LIMIT="off"
TODO: figure out default for the following parameter
Environment=RCLONEMOUNTVOLNAME="UNKNOWN_DEFAULT"
Overwrite default environment settings with settings from the file if present
EnvironmentFile=-%h/.config/rclone/%i.env
Check that rclone is installed
ExecStartPre=/usr/bin/test -x /usr/bin/rclone
Check the mount directory
ExecStartPre=/usr/bin/test -d "${MOUNTDIR}" ExecStartPre=/usr/bin/test -w "${MOUNTDIR}"
TODO: Add test for MOUNTDIR being empty -> ExecStartPre=/usr/bin/test -z "$(ls -A "${MOUNTDIR}")"
Check the rclone configuration file
ExecStartPre=/usr/bin/test -f "${RCLONECONF}" ExecStartPre=/usr/bin/test -r "${RCLONECONF}"
TODO: add test that the remote is configured for the rclone configuration
Mount rclone fs
ExecStart=/usr/bin/rclone mount \ --config="${RCLONE_CONF}" \
See additional items for access control below for information about the following 2 flags
--allow-other \
--default-permissions \
--rc="${RCLONE_RC_ON}" \
--cache-tmp-upload-path="${RCLONE_TEMP_DIR}/upload" \
--cache-chunk-path="${RCLONE_TEMP_DIR}/chunks" \
--cache-workers=8 \
--cache-writes \
--cache-dir="${RCLONE_TEMP_DIR}/vfs" \
--cache-db-path="${RCLONE_TEMP_DIR}/db" \
--no-modtime \
--drive-use-trash \
--stats=0 \
--checkers=16 \
--bwlimit=40M \
--cache-info-age=60m \
--attr-timeout="${RCLONE_MOUNT_ATTR_TIMEOUT}" \
TODO: Include this once a proper default value is determined
--daemon-timeout="${RCLONEMOUNTDAEMON_TIMEOUT}" \
--dir-cache-time="${RCLONE_MOUNT_DIR_CACHE_TIME}" \
--dir-perms="${RCLONE_MOUNT_DIR_PERMS}" \
--file-perms="${RCLONE_MOUNT_FILE_PERMS}" \
--gid="${RCLONE_MOUNT_GID}" \
--max-read-ahead="${RCLONE_MOUNT_MAX_READ_AHEAD}" \
--poll-interval="${RCLONE_MOUNT_POLL_INTERVAL}" \
--uid="${RCLONE_MOUNT_UID}" \
--umask="${RCLONE_MOUNT_UMASK}" \
--vfs-cache-max-age="${RCLONE_MOUNT_VFS_CACHE_MAX_AGE}" \
--vfs-cache-max-size="${RCLONE_MOUNT_VFS_CACHE_MAX_SIZE}" \
--vfs-cache-mode="${RCLONE_MOUNT_VFS_CACHE_MODE}" \
--vfs-cache-poll-interval="${RCLONE_MOUNT_VFS_CACHE_POLL_INTERVAL}" \
--vfs-read-chunk-size="${RCLONE_MOUNT_VFS_READ_CHUNK_SIZE}" \
--vfs-read-chunk-size-limit="${RCLONE_MOUNT_VFS_READ_CHUNK_SIZE_LIMIT}" \
TODO: Include this once a proper default value is determined
--volname="${RCLONEMOUNTVOLNAME}"
"${REMOTE_NAME}:${REMOTE_PATH}" "${MOUNT_DIR}"
Execute Post Mount Script if specified
ExecStartPost=/bin/sh -c "${POSTMOUNTSCRIPT}"
Unmount rclone fs
ExecStop=/bin/fusermount3 -u "${MOUNT_DIR}"
Restart info
Restart=always RestartSec=10
[Install] WantedBy=default.target ```
Then run systemctl --user daemon-reload to load this unit. Next, activate the services:
bash
systemctl --user start rclone@gdrive
systemctl --user start rclone@onedrive
Check if these are loaded correctly in /mnt, then enable them:
bash
systemctl --user enable rclone@gdrive
systemctl --user enable rclone@onedrive
More information available at https://github.com/rclone/rclone/wiki/Systemd-rclone-mount/.
Mount Symlinks
What I like to do is create symlinks of these drives to my home directory. This can by done by running
bash
cd ~
ln -s /mnt/gdrive Google\ Drive
ln -s /mnt/onedrive OneDrive
and for some of the folders too (ensure they are deleted first):
bash
cd ~
ln -s /mnt/onedrive/Desktop Desktop
ln -s /mnt/onedrive/Documents Documents
ln -s /mnt/onedrive/Picture Picture
ln -s /mnt/onedrive/Music Music
Bat
Run bat cache --build to load themes.
Hyprpanel
For some reason, Hyprpanel (version r576.05cd1f5-1) does not save this option in the JSON configuration... but I like to have Configuration > Bar > Workspaces > Monitor Specific toggled off (available in the settings GUI baked into the package).
Owner
- Name: Angelo Di Bella
- Login: angelodibella
- Kind: user
- Location: London, UK
- Website: linkedin.com/in/angelo-di-bella
- Repositories: 2
- Profile: https://github.com/angelodibella
MSci Theoretical Physics @UCL
GitHub Events
Total
- Public event: 1
- Push event: 9
Last Year
- Public event: 1
- Push event: 9