This is a set of declarative Linux configuration files and scripts designed to consistently reproduce my personal setup. It contains many unique features such as:
A modern zsh config with all of the shortcuts and autocomplete features from the fish shell
This repository is designed to provide quick and automatic configuration of all these features on a fresh Arch Linux installation, although configuration for i3 and NixOS is available at an older commit.
Currently, this repository works well, but useful features such as the ones mentioned above are intermingled with various personal configuration changes. These configuration files need to be cleaned up to modularize the various features they provide, but in the meantime, here is a quick summary of how some of the features works:
The color scheme engine is implemented with a combination of pywal templates, kde-material-you-colors, and a custom fork of the dark reader addon. This fork attaches to a custom native extension that forwards the current pywal color scheme to the addon process. A compiled version of the dark reader fork is available in user/files/darkreader.xpi for firefox and user/files/darkreader-chrome.zip for Chrome. The associated native extension is available in user/files/darkreader. Everything else is in user/firefox.nix.
The OS-wide frosted glass effect is achieved with a combination of lightly-qt and a custom Hyprland plugin. This plugin applies a GLSL shader to each window which uses the chromakey algorithm to selectively apply transparency to the system background color and colors close to it. An older commit of this repository contains the necessary configuration to apply a similar effect in i3.
KDE support is achieved by manually starting kde daemon modules via dbus commands and storing windowed versions of plasmoid applets in the hyprland scratchpad. This allows the majority of KDE features to work without having to run plasmashell or use the KDE wayland compositor.
The reproducible and declarative aspects of this repository come from its use of aconfmgr and nix home-manager. The system
folder contains the contents of my ~/.config/aconfmgr
folder and the user
folder contains my ~/.config/home-manager
folder.
Since this is a pretty broad repository and different people are likely going to want different things out of it, I've provided multiple installation guides for various parts of the repo.
I would imagine that most people visiting this repository are primarily interested in the firefox customizations contained within it, and would prefer to apply them as easily as possible to their existing configuration. If you're comfortable using nix home-manager, you can just add firefox.nix to your home-manager configuration and run home-manager switch
. If you're not comfortable with home-manager, you can still apply the firefox customization manually.
The following steps should be sufficient to apply the firefox customization to any existing Linux installation, assuming you already have pywal and nodejs installed and working.
~/.mozilla/native-messaging-hosts/darkreader.json
:
{
"name": "darkreader",
"description": "custom darkreader native host for syncing with pywal",
"path": "/opt/darkreader-pywal/index.js",
"type": "stdio",
"allowed_extensions": ["darkreader@alexhulbert.com"]
}
/opt/darkreader-pywal
. This folder can be put anywhere if you don't have permission to write to /opt
. Just make sure to update the path in the path
field in darkreader.json
to match the location of these files./opt/darkreader-pywal/index.js
by running chmod +x /opt/darkreader-pywal/index.js
in a terminalabout:config
in the URL bar. Set toolkit.legacyUserProfileCustomizations.stylesheets
to true
At this point, you can skip steps 5-10 if you have your own userChrome/userContent files that you want to keep.
~/.config/wal/templates
~/.cache/wal/userContent.css
(create an empty file if it doesn't exist) to ~/.mozilla/Firefox/default/chrome/userContent.css
~/.mozilla/Firefox/default/chrome/userChrome.css
:
@import url('blurredfox/userChrome.css');
@import url('userContent.css');
@import url('layout.css');
blurredfox
folder in ~/.mozilla/Firefox/default/chrome
~/.mozilla/Firefox/default/chrome
, renaming it from twoline.css
to layout.css
Close and reopen firefox and the theme should be applied.
I'm working on trying to get these changes upstreamed into Darkreader so that the fork isn't necessary.
The fork also works on Chrome/Chromium/Brave/etc. The steps are slightly different, though.
~/.config/google-chrome/NativeMessagingHosts
) and create a new file called "darkreader.json" with the following contents:
{
"name": "darkreader",
"description": "custom darkreader native host for syncing with pywal",
"path": "/opt/darkreader-pywal/index.js",
"type": "stdio",
"allowed_origins": ["chrome-extension://gidgehhdgebooieidpcckaphjbfcghpe/"]
}
/opt/darkreader-pywal
This folder can be put anywhere if you don't have permission to write to /opt
. Just make sure to update the path in the path
field in darkreader.json
to match the location of these files./opt/darkreader-pywal/index.js
by running chmod +x /opt/darkreader-pywal/index.js
in a terminalchrome://extensions
in the URL bar. Enable "Developer mode" and click "Load unpacked"Chromakey-based background transparency in hyprland can be achieved by running the following commands:
hyprpm add https://github.com/alexhulbert/hyprchroma
hyprpm enable hyprchroma
To disable chromakey on fullscreen applications, add the following line to your hyprland.conf
:
chromakey_enable = fullscreen:0
Sometimes, videos may be a bit washed out. To set a shortcut key to toggle the chromakey effect, add a line like the following to your hyprland.conf
:
bind = $mainMod, O, togglechromakey
To make the chromakey sync up with your pywal configuration, copy colors-hyprland.conf to ~/.config/wal/templates
and add the following line to your hyprland.conf
:
source = ~/.cache/wal/colors-hyprland.conf
The KDE support in hyprland is achieved via a python-based daemon in user/files/plasma-waybar.py. It depends on pyprland, so make sure you've installed that. This daemon should be started with hyprland and will automatically launch any KDE applets specified in ~/.config/hypr/plasmoids.json
. Check waybar.nix for an example of how the plasmoids.json file should be formatted (make sure to convert it from nix to json). the title
property must match the window title of the plasmoid and the plasmoid
property must match its identifier, which can be found by running ls /usr/share/plasma/plasmoids
. The margin_right
property controls how far the applet is from the right edge of the screen.
For each plasmoid added to the plasmoids.json file, three corresponding window rules must be added to your hyprland.conf
file:
windowrulev2 = move 0 -200%,title:^(<TITLE>)$
windowrulev2 = workspace special:scratch_<NAME> silent,title:^(<TITLE>)$
windowrulev2 = size <WIDTH> <HEIGHT>, title:^(<TITLE>)$
where <NAME>
matches the key in the json file and <TITLE>
, <WIDTH>
, and <HEIGHT>
match the corresponding properties for that key.
Then, the on-click events for your waybar modules should be set to run plasma-waybar toggle <NAME>
, where <NAME>
is a key in the json file. This assumes plasma-waybar is in your $PATH
. For an example of all this in action, look at waybar.nix
KDE also utilizes several services that need to be run in order to function properly. These are loaded in startup.nix. In order to run these services, you'll need to start the kde daemon with hyprland (by adding kded5
to your exec-once
). Then, after kded loads, you'll want to run these shell commands. This will ensure that the wifi and bluetooth applets work properly and that network and storage devices are properly mounted and unmounted. For power management to work properly, you'll need to run /usr/lib/org_kde_powerdevil
with Hyprland and enable the power-profiles-daemon
systemd service.
This repository also has a custom script that themes gtk and qt applications, as well as spotify and kde plasma.
kde-material-you-colors
, wpgtk
, lightly-qt
, python-haishoku
, and python-pywal
seaglass-theme
and seaglass-spicetify
commands are available in your path, and run seaglass-theme
when your desktop environment loads.~/.local/share/plasma/look-and-feel
and rename it to "seaglass". This global theme also sets the cursor theme to Bibata, so you might need to install that in order for it to work.If you'd like to start your linux installation from scratch and use my entire config as a jumping off point, that's possible too. From a freshly bootstrapped Arch installation, follow these steps:
paru
, nix
, and aconfmgr
system
directory of this repo to ~/.config/aconfmgr
and the user
directory to ~/.config/home-manager
aconfmgr apply
chown -R $USER:$USER /nix
to make the nix store editable by your useruser/personal.nix
home-manager switch
to apply the home-manager configurationfirst-time-setup.sh
When I did this most recently, I ran into issues with firefox profiles. The changes to the firefox profile itself are fairly minimal outside of the user chrome stuff, though, so they can easily be applied manually. If you happen to go through this route and encounter any trouble, let me know.
As stated above, this repository contains my personal dotfiles, including everything from the packages I have installed to laptop-specific adjustments. Below is a non-exhaustive list of sections of this repo which you may want to delete before installing it in totality.
user/startup.nix
: This makes sure various subfolders of the home directory (including Downloads!) stay deletedsystem/33-pkgs-personal.sh
: This contains software I've installed that most people probably don't also wantuser/personal.nix
: This changes the home directories to be shorter names like "tmp" instead of "Downloads"user/personal.nix
: This override hides the firefox url bar unless you focus it by pressing ctrl+Lsystem/21-gui.sh
: This remaps the caps lock key to switch back and forth between the last visited workspacesystem/21-gui.sh
: This remaps the "Copilot Key" on windows laptops to right controlsystem/20-base.sh
: If you don't live in the EST time zone, this should be changedsystem/20-base.sh
: My grub configuration is specific to my laptop and filesystem type