Skip to content
/ triton Public

Dotfile management tool empowering users with the ability to easily switch between alternative configuration setups.

Notifications You must be signed in to change notification settings

bntrtm/triton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About Triton

Triton is a dotfile management tool that leverages GNU Stow to easily switch between GROUPS of configuration files accomplishing the same tasks (EG, alternate linux ricing setups).

Installation

Get Stow

Triton depends on GNU Stow.

Stow is available through most package managers.

Arch:

sudo pacman -S stow

Debian:

sudo apt update
sudo apt install stow

Get Triton

Under /home//.local/bin or other preferred directory, clone the repo:

git clone https://github.com/bntrtm/triton

Consider adding the following line to your .bashrc (or other config equivalent), to be able to call the program at will from any new interactive shell:

export PATH=$PATH:~/.local/bin/triton

Ensure that the program:

  1. has the necessary permissions required to run (chmod +x triton)
  2. remains under the same directory as the default_triton.conf file and the config, helpers, and themetool scripts that it also sources.

Usage

Getting Started

Run triton -h for a brief usage guide.

Run triton init to generate a default triton.conf file under the ~/.config/triton directory, necessary for running any other commands.

Triton Themes

Triton's themetool is the primary purpose for which the tool was created to begin with. If you like the freedom of switching between custom linux rices at will, you may be interested in using this tool often. When setting a new theme from the .../.themes directory (located at /home//.triton/.themes by default), Triton copies the theme directory in its entirety to the .../.triton/ directory as a new directory: current_theme. Any existing current_theme directory is first deleted.

Symlinks generated by stow via Triton always link to this copied directory, and never link to the directory pertaining to the theme that was set. This is meant to help users to keep from absent-mindedly changing theme defaults under .../.themes/ that could then be overwritten by upstream updates, should they be sourcing their themes in such a versioned way, as one might with dotfiles. If users wish to truly change any theme settings, they must deliberately go to the .../.themes directory, make their modifications, and then reset their current_theme with the added changes.

Meanwhile, be aware that any changes to live theme-related config files are, of course, symlinked to the copied current_theme directory, and could be lost if the current_theme directory is not backed up before running themes set once again.

Building A Theme

This subsection will not cover linux ricing in general, but rather Triton's expectations when asked to recognize a directory and its contents as a theme.

The theme should be a directory which contains not only the necessary stow packages, but also a /.triton/ directory which itself contains the following:

  1. An art.txt file. This file is optional, but the contents will be output to the terminal upon setting the theme, if it does exist.
  2. A reload.sh script that containing a list of commands for Triton to run upon setting the theme. This ensures that when setting your theme with the Triton themetool, all affected visuals and other configurations are immediately refreshed. This means that as a user, you don't need to run those commands yourself to see your changes, or otherwise log out and back in to see them. Ensure that the scipt also contains the phrase: #TRITON_RELOAD for theme: <theme_name> on the first line after the script's shebang.
  3. A file titled triton_theme.conf, which includes first a title phrase: #TRITON_THEME: <theme_name>, and then an array listing all dependencies for the theme. Build this array as a list of commands that you could otherwise run in your terminal manually (I.E., if a program that your theme depends upon does not use namesake commands, ensure that you list a command that it truly provides).

About

Dotfile management tool empowering users with the ability to easily switch between alternative configuration setups.

Topics

Resources

Stars

Watchers

Forks

Languages