Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reset themes #58

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5aabefb
Add reset themes
Apr 4, 2024
7eb8523
Initial Upload; new fork
Apr 9, 2024
e7ea280
use gq not goq so themes can be changed
Apr 9, 2024
a7f9416
Refactor; add paul themes
Apr 9, 2024
0863d46
Refactor and Refine
Apr 10, 2024
598d28f
Cleanup; mv files to better locations
Apr 10, 2024
a518301
Refactor Paul Theme
Apr 15, 2024
448f240
Intermediate Refactoring; add file names
Apr 15, 2024
e9e7d52
double is working
Apr 15, 2024
77fe65f
Refactor Again
Apr 15, 2024
aa736d0
Updated Installdir
Apr 17, 2024
65b7c6b
Allow theme or theme.tmuxthemepack; change @themepack to be partial p…
Apr 17, 2024
3cac9ce
Cleanup and Rebuild Paul theme: allow F12 for nesting
Apr 17, 2024
00245f3
Fixed Merge
Apr 17, 2024
41c1eef
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack i…
Apr 17, 2024
5ffbd3a
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack
Apr 17, 2024
bb6049c
Remove built files from repo
Apr 17, 2024
749bb4e
Remove built files from repo
Apr 17, 2024
c930b23
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack
Apr 17, 2024
c3e5e04
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack
Apr 17, 2024
fb09bad
Remove built files from repo
Apr 17, 2024
708bffe
Clean up tmuxsh files
Apr 17, 2024
4d12dff
Clean up tmuxsh files
Apr 17, 2024
55e437e
Merge branch 'SIMPLEPAUL' of https://github.com/joslinpr/tmux-themepa…
Apr 17, 2024
4fa57a4
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack i…
Apr 17, 2024
846d72d
Merge pull request #2 from joslinpr/SIMPLEPAUL
joslinpr Apr 17, 2024
09aa3f8
Add Install Option
Apr 17, 2024
a9b4ab6
Exclude .git
Apr 17, 2024
a6c2fb6
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack
Apr 17, 2024
717053d
Cleanup old merge
Apr 17, 2024
c5688cc
Quiet install
Apr 17, 2024
ac1e2b5
Fixed F12 indicator; added to theme
Apr 19, 2024
686075c
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack
Apr 19, 2024
dd97c6d
Refactor pane to themes
Apr 23, 2024
373b7cc
Cleanup
Apr 23, 2024
459e221
Move pane-* to theme; add Minify; use Minify in Makefile
Apr 23, 2024
07b912c
Tuning pane-* in themes
Apr 23, 2024
c9c3a4a
Tuning pane-* in themes
Apr 23, 2024
e6860da
Merge branch 'master' of https://github.com/joslinpr/tmux-themepack
Apr 23, 2024
6717427
Add block simple theme without arrows
Apr 24, 2024
fbafc2f
Add color separator to block theme
Apr 24, 2024
a354bff
Make block simple theme double
Apr 24, 2024
2a9127c
Add Override to remove hostname, cleanup
May 2, 2024
d39de34
Cleanup All and Refine block-simple
May 2, 2024
fa4a77e
WIP
May 2, 2024
56e8b77
setting -o for debug; options should be fixed by apply
May 2, 2024
392a784
removing -o for debug
May 2, 2024
2b8af0f
Fixed Order of Inclusion, Pane Border format fixes
May 2, 2024
5b15074
Pane Status Updates
May 8, 2024
b6e8d22
Updates to tools, PANE for remote, 2.7
May 9, 2024
f292fa2
Rename block-simple simple
May 31, 2024
8640d7d
Rename block-simple simple, part II
May 31, 2024
43cfeac
Rename block-simple simple, part III
May 31, 2024
105635b
Update Tools
May 31, 2024
125bb59
Rearrange include files to get proper ordering
May 31, 2024
5919d38
Rename block-simple simple, part IV
May 31, 2024
00a016f
Fix double so colors are defined before use
May 31, 2024
6ee7004
Fix double so colors are defined before use
May 31, 2024
f75b543
Merge branch 'PRJ20240428' of https://github.com/joslinpr/tmux-themep…
May 31, 2024
8d60415
Remove X.tmuxtheme test file
May 31, 2024
db5ac65
Remove commented out option
May 31, 2024
3720976
Set Pane display to theme-colors
May 31, 2024
fa47c07
Cleanup paul themes
May 31, 2024
8822b3f
Build paul and powerline themes separately
May 31, 2024
277ab47
Merge pull request #3 from joslinpr/PRJ20240428
joslinpr May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paul/*
powerline/*
*.orig
*~
69 changes: 59 additions & 10 deletions Makefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
BUILDER := bin/build-theme
THEME_SRC := $(shell find src -name '*.tmuxtheme')
INCLUDES := $(shell find src -name '*.tmuxsh')
THEMES := $(patsubst src/%,%,$(THEME_SRC))
TESTS := $(addsuffix .test,$(THEMES))
BUILDER := bin/build-theme
MINIFY := bin/MinifyTheme
INSTALLDIR := $(HOME)/.tmux/plugins/tmux-themepack
RSYNC := $(shell command -v rsync)
RSYNCARGS := -ac --cvs-exclude --info=STATS,PROGRESS2
# Paul Themes
PAUL_THEME_SRC := $(shell find src/paul -name '*.tmuxtheme')
PAUL_INCLUDES := $(shell find src/paul -name '*.tmuxsh')
PAUL_THEMES := $(patsubst src/%,%,$(PAUL_THEME_SRC))
PAUL_TESTS := $(addsuffix .test,$(PAUL_THEMES))

# Powerline Themes
PL_THEME_SRC := $(shell find src/powerline -name '*.tmuxtheme')
PL_INCLUDES := $(shell find src/powerline -name '*.tmuxsh')
PL_THEMES := $(patsubst src/%,%,$(PL_THEME_SRC))
PL_TESTS := $(addsuffix .test,$(PL_THEMES))

# 10 jobs in parallel
MAKEFLAGS += -j10

.PHONY: build
build: $(THEMES)
build: $(PAUL_THEMES) $(PL_THEMES)

.PHONY: install
install: $(PAUL_THEMES) $(PL_THEMES)
@echo Rsyncing
@$(RSYNC) $(RSYNCARGS) ./ $(INSTALLDIR)
@echo Minify installed files
@$(MINIFY) $(INSTALLDIR)
@echo Cleanup .bak files
@find $(INSTALLDIR) -name "*.bak" -not -path "src/*" -exec rm {} +

.PHONY: clean
clean:
rm $(shell find * -name "*.tmuxtheme" -not -path "src/*")
find * -name "*.tmuxtheme" -not -path "src/*" -print -exec rm {} +
find * -name "*.bak" -not -path "src/*" -print -exec rm {} +
find $(INSTALLDIR) -name "*.bak" -not -path "src/*" -print -exec rm {} +

.PHONY: lint
lint:
Expand All @@ -21,11 +46,35 @@ test: needs-build

.PHONY: needs-build
needs-build:
$(foreach file,$(THEMES), \
$(foreach file,$(PAUL_THEMES), \
$(BUILDER) "src/$(file)" | diff -q "$(file)" - && \
) true
$(foreach file,$(PL_THEMES), \
$(BUILDER) "src/$(file)" | diff -q "$(file)" - && \
) true

$(THEMES): %.tmuxtheme: src/%.tmuxtheme $(INCLUDES)
.PHONY: testmake
testmake :
@printf "PAUL_THEME_SRC=$(PAUL_THEME_SRC)\n\n"
@printf "PAUL_INCLUDES=$(PAUL_INCLUDES)\n\n"
@printf "PAUL_THEMES=$(PAUL_THEMES)\n\n"
@printf "PL_THEME_SRC=$(PL_THEME_SRC)\n\n"
@printf "PL_INCLUDES=$(PL_INCLUDES)\n\n"
@printf "PL_THEMES=$(PL_THEMES)\n\n"

# .SILENT: $(PAUL_THEMES)
$(PAUL_THEMES): %.tmuxtheme: src/%.tmuxtheme $(PAUL_INCLUDES)
$(BUILDER) "src/$@" "$@"

# .SILENT: $(PL_THEMES)
$(PL_THEMES): %.tmuxtheme: src/%.tmuxtheme $(PL_INCLUDES)
$(BUILDER) "src/$@" "$@"

$(TESTS): %.test: src/%.test
$(PAUL_TESTS): %.test: src/%.test
$(PL_TESTS): %.test: src/%.test

.PHONY: list
list:
@LC_ALL=C $(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'

# vim: set ai et nu cin sts=0 sw=8 ts=8 tw=78 filetype=make :
29 changes: 29 additions & 0 deletions SetEnv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
DEBUG=0
# Set SOURCED=1 if script must be sourced
SOURCED=1
_R=$(tput setaf 1) # Red
_G=$(tput setaf 2) # Green
_Y=$(tput setaf 3) # Yellow
_B=$(tput setaf 4) # Blue
_N=$(tput rmso; tput sgr0; tput setaf 7) # Color Off
if ((SOURCED>0))
then
(return 0 2>/dev/null) && sourced=true || sourced=false

# Exit if script is not sourced.
if [[ ${sourced} == false ]]; then
echo -e "${_R}Error:${_N} This script cannot be executed directly, it must be sourced.\n"
echo -e "Try running"
echo -e "${_G}source ${0}${_N}"
echo -e "or"
echo -e "${_G}. ${0}${_N}"
# can also call Usage()
fi
fi

export BASE=$HOME/Projects/tmux-themepack
export INSTALLDIR="$HOME/.tmux/plugins/tmux-themepack"
((DEBUG>0)) && printf "pathmunge %s after\n" "$BASE/bin" >&2
pathmunge $BASE/bin after
# vim: set ai et nu cin sts=2 sw=2 ts=2 tw=78 filetype=sh :
17 changes: 17 additions & 0 deletions Tools/FixTemplate.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

BASE="/home/pjoslin/Projects/TMUXTHEMES/tmux-themepack/src"

for i in *;
do
if [ -f "$i" ] ;
then
DIR=$PWD
DIR=${DIR##$BASE}
mv $i /tmp ;
echo "#################### File: $DIR/$i" >> $i ;
grep -v "File: " /tmp/$i >> $i ;
echo "#################### End File: $DIR/$i" >> $i ;
fi ;
done
# vim: set ai et nu cin sts=4 sw=4 ts=4 tw=78 filetype=sh :
180 changes: 180 additions & 0 deletions Tools/Reset.all
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
set -gu @theme-clock-mode-colour
set -gu @theme-clock-mode-style
set -gu @theme-display-panes-active-colour
set -gu @theme-display-panes-colour
set -gu @theme-message-bg
set -gu @theme-message-command-bg
set -gu @theme-message-command-fg
set -gu @theme-message-fg
set -gu @theme-mode-bg
set -gu @theme-mode-fg
set -gu @theme-pane-active-border-bg
set -gu @theme-pane-active-border-fg
set -gu @theme-pane-border-bg
set -gu @theme-pane-border-fg
set -gu @theme-status-bg
set -gu @theme-status-fg
set -gu @theme-status-interval
set -gu @theme-status-justify
set -gu @theme-status-left
set -gu @theme-status-left-bg
set -gu @theme-status-left-fg
set -gu @theme-status-left-length
set -gu @theme-status-left-prefix
set -gu @theme-status-left-suffix
set -gu @theme-status-right
set -gu @theme-status-right-bg
set -gu @theme-status-right-fg
set -gu @theme-status-right-length
set -gu @theme-status-right-prefix
set -gu @theme-status-right-suffix
set -gu @theme-window-status-activity-bg
set -gu @theme-window-status-activity-fg
set -gu @theme-window-status-bell-style
set -gu @theme-window-status-current-bg
set -gu @theme-window-status-current-fg
set -gu @theme-window-status-current-format
set -gu @theme-window-status-current-prefix
set -gu @theme-window-status-current-suffix
set -gu @theme-window-status-format
set -gu @theme-window-status-prefix
set -gu @theme-window-status-separator
set -gu @theme-window-status-suffix
set -guF pane-border-format
set -gu @paul-color-black-1
set -gu @paul-color-grey-1
set -gu @paul-color-grey-2
set -gu @paul-color-grey-3
set -gu @paul-color-grey-4
set -gu @paul-color-grey-5
set -gu @paul-color-grey-6
set -gu @paul-color-main-1
set -gu @paul-color-main-2
set -gu @paul-color-main-3
set -gu @powerline-color-black-1
set -gu @powerline-color-grey-1
set -gu @powerline-color-grey-2
set -gu @powerline-color-grey-3
set -gu @powerline-color-grey-4
set -gu @powerline-color-grey-5
set -gu @powerline-color-grey-6
set -gu @powerline-color-main-1
set -gu @powerline-color-main-2
set -gu @powerline-color-main-3
set -gu @themepack-status-left-area-left-format
set -gu @themepack-status-left-area-left-prefix
set -gu @themepack-status-left-area-left-suffix
set -gu @themepack-status-left-area-middle-format
set -gu @themepack-status-left-area-middle-prefix
set -gu @themepack-status-left-area-middle-suffix
set -gu @themepack-status-left-area-right-format
set -gu @themepack-status-left-area-right-prefix
set -gu @themepack-status-left-area-right-suffix
set -gu @themepack-status-right-area-left-format
set -gu @themepack-status-right-area-left-prefix
set -gu @themepack-status-right-area-left-suffix
set -gu @themepack-status-right-area-middle-format
set -gu @themepack-status-right-area-middle-prefix
set -gu @themepack-status-right-area-middle-suffix
set -gu @themepack-status-right-area-right-format
set -gu @themepack-status-right-area-right-prefix
set -gu @themepack-status-right-area-right-suffix
set -gu @themepack-window-status-current-format
set -gu @themepack-window-status-current-prefix
set -gu @themepack-window-status-current-suffix
set -gu @themepack-window-status-format
set -gu @themepack-window-status-prefix
set -gu @themepack-window-status-suffix
set -gu @theme-status-left-prefix
set -gu @theme-status-left-suffix
set -gu @theme-status-right-prefix
set -gu @theme-status-right-suffix
set -gu @theme-window-status-current-prefix
set -gu @theme-window-status-current-suffix
set -gu @theme-window-status-prefix
set -gu @theme-window-status-suffix
set -guF @paul-color-activity-1
set -guF @paul-status-bg
set -guF @paul-status-fg
set -guF @paul-status-left-area-left-bg
set -guF @paul-status-left-area-left-fg
set -guF @paul-status-left-area-middle-bg
set -guF @paul-status-left-area-middle-fg
set -guF @paul-status-left-area-right-bg
set -guF @paul-status-left-area-right-fg
set -guF @paul-status-left-bg
set -guF @paul-status-left-fg
set -guF @paul-status-right-area-left-bg
set -guF @paul-status-right-area-left-fg
set -guF @paul-status-right-area-middle-bg
set -guF @paul-status-right-area-middle-fg
set -guF @paul-status-right-area-right-bg
set -guF @paul-status-right-area-right-fg
set -guF @paul-status-right-bg
set -guF @paul-status-right-fg
set -guF @powerline-color-activity-1
set -guF @powerline-status-bg
set -guF @powerline-status-fg
set -guF @powerline-status-left-area-left-bg
set -guF @powerline-status-left-area-left-fg
set -guF @powerline-status-left-area-middle-bg
set -guF @powerline-status-left-area-middle-fg
set -guF @powerline-status-left-area-right-bg
set -guF @powerline-status-left-area-right-fg
set -guF @powerline-status-left-bg
set -guF @powerline-status-left-fg
set -guF @powerline-status-right-area-left-bg
set -guF @powerline-status-right-area-left-fg
set -guF @powerline-status-right-area-middle-bg
set -guF @powerline-status-right-area-middle-fg
set -guF @powerline-status-right-area-right-bg
set -guF @powerline-status-right-area-right-fg
set -guF @powerline-status-right-bg
set -guF @powerline-status-right-fg
set -guF @theme-clock-mode-colour
set -guF @theme-display-panes-active-colour
set -guF @theme-display-panes-colour
set -guF @theme-message-bg
set -guF @theme-message-command-bg
set -guF @theme-message-command-fg
set -guF @theme-message-fg
set -guF @theme-mode-bg
set -guF @theme-mode-fg
set -guF @themepack-status-left-area-left-format
set -guF @themepack-status-left-area-middle-format
set -guF @themepack-status-left-area-right-format
set -guF @themepack-status-right-area-left-format
set -guF @themepack-status-right-area-middle-format
set -guF @themepack-status-right-area-right-format
set -guF @themepack-window-status-current-format
set -guF @themepack-window-status-format
set -guF @theme-pane-active-border-fg
set -guF @theme-pane-border-fg
set -guF @theme-status-bg
set -guF @theme-status-fg
set -guF @theme-status-left
set -guF @theme-status-left-bg
set -guF @theme-status-left-fg
set -guF @theme-status-right
set -guF @theme-status-right-bg
set -guF @theme-status-right-fg
set -guF @theme-window-status-activity-bg
set -guF @theme-window-status-activity-fg
set -guF @theme-window-status-current-bg
set -guF @theme-window-status-current-fg
set -guF @theme-window-status-current-format
set -guF @theme-window-status-format
set -gus @theme-pane-border-format
set -guw pane-border-status
set -gwuF clock-mode-colour
set -gwuF clock-mode-style
set -gwuF mode-style
set -gwuF pane-active-border-style
set -gwuF pane-border-style
set -gwuF window-status-activity-style
set -gwuF window-status-bell-style
set -gwuF window-status-current-format
set -gwuF window-status-current-style
set -gwuF window-status-format
set -gwuF window-status-separator
set -gwuF window-style
60 changes: 60 additions & 0 deletions Tools/UseTheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEBUG=0

get-tmux-option() {
local option value default
option="$1"
default="$2"
value="$(tmux show-option -gqv "$option")"

if ((DEBUG>0))
then
printf "option=%s default=%s value=%s\n" "$option" "$default" "$value" >&2
fi

if [ -n "$value" ]; then
echo "$value"
else
echo "$default"
fi
}

main() {
local theme
theme="$(get-tmux-option "@themepack" "basic")"

if [ -f "$CURRENT_DIR/${theme}.tmuxtheme" ]; then
tmux source-file "$CURRENT_DIR/${theme}.tmuxtheme"
else
tmux source-file "$CURRENT_DIR/powerline/${theme}.tmuxtheme"
fi
}

ErrMsg(){
printf "%b\n" "$@" >&2
}

################################################################################
# Main #
########
while getopts ":dh" opt; do
case ${opt} in
d) DEBUG=1 ;;
h) Usage; exit 0; ;;
\?)
Usage;
ErrMsg "\nInvalid option: -${OPTARG}\n"
exit 1;
;;
esac
done
shift $((OPTIND-1))
if ((DEBUG>0))
then
ErrMsg "DEBUG: ${DEBUG}\n"
fi

main "$@"
# vim: set ai et nu cin sts=2 sw=2 ts=2 tw=78 filetype=sh :
Loading