-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 943be96
Showing
6 changed files
with
393 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# common settings that generally should always be used with your language specific settings | ||
|
||
# Auto detect text files and perform LF normalization | ||
# http:https://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# | ||
|
||
# Documents | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
*.md text | ||
*.adoc text | ||
*.textile text | ||
*.mustache text | ||
*.csv text | ||
*.tab text | ||
*.tsv text | ||
*.sql text | ||
|
||
# Graphics | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.tif binary | ||
*.tiff binary | ||
*.ico binary | ||
# SVG treated as an asset (binary) by default. If you want to treat it as text, | ||
# comment-out the following line and uncomment the line after. | ||
*.svg binary | ||
#*.svg text | ||
*.eps binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -u | ||
|
||
is_app_installed() { | ||
type "$1" &>/dev/null | ||
} | ||
|
||
REPODIR="$(cd "$(dirname "$0")"; pwd -P)" | ||
cd "$REPODIR"; | ||
|
||
git submodule update --recursive --init --quiet; | ||
|
||
if ! is_app_installed tmux; then | ||
printf "$(tput setaf 1)WARNING:$(tput sgr0) \"tmux\" command is not found. \ | ||
Install \"tmux\" yourself\n" | ||
fi | ||
|
||
# .tmux may already exist (created by tmux plugin manager) | ||
rsync -aq --backup ./tmux/ "$HOME"/.tmux | ||
|
||
if [ -e "$HOME/.tmux.conf" ]; then | ||
printf "Found existing .tmux.conf in your \$HOME directory. Will backup it and overwrite with new .tmux.conf file? OK (y/n): " | ||
read -r answer | ||
if echo "$answer" | grep -iq "^n"; then | ||
printf "Install config manually using command below:\n\n"; | ||
printf "\t cd && ln -sf .tmux/tmux.conf .tmux.conf\n"; | ||
exit 1; | ||
fi | ||
fi | ||
|
||
ln -sf --backup=numbered .tmux/tmux.conf "$HOME"/.tmux.conf; | ||
printf "$(tput setaf 2)OK:$(tput sgr0) Files are copied to \$HOME/.tmux and symlink at \$HOME/.tmux.conf is created\n" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
My tmux configuration | ||
===================== | ||
|
||
Prerequisites | ||
------------- | ||
This repo only installs `tmux.conf` files and related (plugins, scripts, themes, etc). It does not however install tmux, and requires you to do it yourself. | ||
|
||
Installation | ||
------------ | ||
|
||
``` | ||
$ git clone <url> <dir> | ||
$ <dir>/install.sh | ||
``` | ||
|
||
Installation script does following: | ||
|
||
1. Init & update git submodules (tmux plugins) | ||
1. Copy files to `$HOME/.tmux` directory, preserving existing file if any (most likely tmux plugins files) | ||
1. Check if you don't have tmux installed and warn you | ||
1. Create symlink at `$HOME/.tmux.conf`, and gently prompts you, if you already have one | ||
|
||
Files | ||
----- | ||
|
||
<table> | ||
<tr> | ||
<td><code>tmux/tmux.conf</code></td> | ||
<td>Main tmux configuration file (general settings, bindings, plugins, etc)</td> | ||
</tr> | ||
<tr> | ||
<td><code>tmux/theme.conf</code></td> | ||
<td>Appearance settings and status bar setup</td> | ||
</tr> | ||
</table> | ||
|
||
Keybindings | ||
----------- | ||
|
||
- [ ] TODO: describe keybindin gscheme | ||
|
||
Screenshots | ||
----------- | ||
|
||
- [ ] TODO: put eye-catching screenshots as soon as I'm done with status bar | ||
|
||
Here what you would get: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# TODO: extract colour to variables | ||
|
||
# Status line | ||
set -g status on | ||
set -g status-interval 10 | ||
set -g status-justify centre | ||
set -g status-left-length 70 | ||
set -g status-right-length 90 | ||
|
||
|
||
wg_battery='#{battery_status_fg} #{battery_icon} #{battery_percentage} #{battery_remain}' | ||
|
||
wg_loadavg='#[fg=colour167,bg=colour235]#( \ | ||
uptime | cut -d "," -f 3- | cut -d ":" -f2 | sed -e "s/^[ \t]*//" \ | ||
)#[default]' | ||
|
||
wg_date='#[fg=colour167,bg=colour235] %h %d %H:%M #[default]' | ||
|
||
wg_session='#[fg=green]#S:#[fg=default]#I.#P' | ||
wg_host='#[fg=colour167,bg=colour235]#(echo $USER)@#H#[default]' | ||
|
||
wg_is_zoomed='#[fg=colour231,bg=colour04]#{?window_zoomed_flag,[Z],}#[default]' | ||
wg_clients_attached='#[fg=cyan]#{?session_many_attached,~#{session_attached},}#[default]' | ||
|
||
|
||
# CPU is updated to often, put stress on CPU | ||
# wg_cpu='#{cpu_fg_color}#{cpu_percentage}' | ||
# wg_cpu="#(iostat -c -y 5 1 | tail -n 2 | head -n 1)" | ||
|
||
|
||
set -g status-style fg=white,bg=colour235 | ||
set -g status-right "$wg_loadavg $wg_battery $wg_host $wg_date #{online_status}" | ||
set -g status-left "$wg_session $wg_clients_attached $wg_is_zoomed #{prefix_highlight}" | ||
|
||
|
||
setw -g window-status-style fg=white,dim | ||
setw -g window-status-current-style fg=brightwhite,nodim,bold,bg=brightred | ||
setw -g window-status-activity-style fg=black,bg=cyan | ||
|
||
|
||
# Appearence | ||
setw -g pane-active-border-style fg=red | ||
set -g message-style fg=green,bold,bg=black |
Oops, something went wrong.