- Notifications
You must be signed in to change notification settings - Fork8
Theme manager for unix systems
License
JLErvin/squash
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
If you are interested in reading more aboutsquash
, check outthis blog post I wrotehere
squash
is a dead-simple bash script that allows users to create custom themes andquickly apply them to terminals, panels, browsers, and window managers.squash
storesthemes in pure bash-scripts, allowing it to be extensible and versitile.
To understand howsquash
interacts with various system applications, check the usage section.
- Clone the repository and cd into it
git clone https://github.com/JLErvin/squashcd squash
- Move themes and default configuration file into
$HOME/.config
mkdir$HOME/.config/squashmkdir$HOME/.config/squash/themescp -r themes/*$HOME/.config/squash/themes/cp defaults$HOME/.config/squash/defaults
- Finally, add
squash
to your path
Before runningsquash
, it is best to edit the defaults at$HOME/.config/squash/defaults
and set which applications you want to be reloaded.
Next, you will want to edit the theme that you are using so it best suits your needs.Themes are located in$HOME/.config/squash/themes
.For example, you might want to set theBAR_SCRIPT
variable, which determines what barsquash
will try to reload.
Now, switch to your first theme!
squash designr
squash
is really just a translator, it takessquash
theme information and writes it in various file formatsto be used by other applications.
For example,squash
generates ax_colors
file, which can be sourced byXresorces
so colors can be usedsystem-wide.
To make colors persist on new terminals, add the following to~/.Xresources
#include ".cache/squash/x_colors"
squash
colors are copied to pure bash scripts so they can be sourced by lemonbar.Add the following at the top of your script:
source$HOME/.cache/squsah/colors
Becausesquash
can be used byXresources
,polybar
will recognize all changes thatsquash
makes to these valuesupon restart. To see these values, make sure polybar defines colors fromXresources
blk=${xrdb:color0}red=${xrdb:color1}...bwht=${xrdb:color15}
squash
writes a.css
file. You can source this file and use it to definefirefox
colors
@import"file:///home/jlervin/.cache/squash/colors.css";
bspwm
configuration is really just a bash file.This means you can sourcesquash
sh files to get access to all variablesAdd the following to yourbspwmrc
source"${HOME}/.cache/squash/colors"bspc config normal_border_color"${BSPWM_NORMAL}"bspc config focused_border_color"${BSPWM_FOCUSED}"
windowchef
configuration is almost identical tobspwm
configuration.Add the following to yourwindowchefrc
source"${HOME}/.cache/squash/colors"waitron wm_config internal_border_width 5 waitron wm_config internal_color_focused"${TWOBWM_FOCUS:1:7}"waitron wm_config internal_color_unfocused"${TWOBWM_UNFOCUS:1:7}"
squash
will reload2bwm
automatically. It should be noted thatsquash
changes that contents ofconfig.h
which may cause syntax errors if colors are not sourced correctly. Use are your own risk.
squsah
will reloaddunst
automatically with background/foreground colors.It should be noted thatsquash
changes the contents ofdunstrc
, which may cause syntax errorsif colors are not sourced correctly. Use at your own risk.
If you are usingneovim
,squash
will be able to reload all open instances ofnvim
assuming that youhavenvr-remote
installed and always opennvim
as a server. To open as a server, add the followingfunction to your.zshrc
or equivalent:
nvim() {local fn="$(mktemp -u"/tmp/nvimsocket-XXXXXXX")" NVIM_LISTEN_ADDRESS=$fn /usr/bin/nvim$@}
squash
will attempt to edit your$MYVIMRC
, which may cause problems. Use at your own risk.