mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 22:45:27 +00:00
Compare commits
243 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| acbfd34e7d | |||
| bac03a0b7b | |||
| a96bf921a2 | |||
| b5df60851f | |||
| 2e682c58fa | |||
| cb28e274ca | |||
| 4572c42eea | |||
| cec1edb269 | |||
| bfe7e93b60 | |||
| 1b80c8b7ed | |||
| c7c3493259 | |||
| 0e797d36ae | |||
|
|
0beb386f4a | ||
|
|
cc0e668cd9 | ||
|
|
d6f7aecf6c | ||
|
|
5253b69e37 | ||
| 12080f59e1 | |||
| 614827a877 | |||
| 09343033ec | |||
| c24f51adb9 | |||
| 1a74cf78c1 | |||
| e31948dcc5 | |||
| 25acc678d8 | |||
| 8c3796b433 | |||
| 048c9ac64f | |||
| 4ef3369c0e | |||
| b9c343dc27 | |||
| cfb41b8a03 | |||
| e42edc2dcf | |||
| 5a95484c58 | |||
| 988cb9cd18 | |||
|
|
681396383a | ||
|
|
f1aaf65e93 | ||
| 83bdfbf6a2 | |||
| 08c2be6f97 | |||
|
|
acf0bbe659 | ||
| e4bae620fa | |||
| b81c8f05b5 | |||
| 56427a08a8 | |||
| f2e7864583 | |||
| 9f96d553f0 | |||
| 1dee09759a | |||
| e2f6db9208 | |||
| 14270093c2 | |||
| 5015a8cd5a | |||
| 266c18e195 | |||
| 9c432ed2a0 | |||
| e6f3aae287 | |||
| a73c54a5a6 | |||
| 39ecd0495c | |||
| 4b45c89a90 | |||
| dfb7a51786 | |||
| 56ae0e1e1c | |||
| 3d753fe08c | |||
| 540054d4bb | |||
| b1a7932b72 | |||
| ced09160ab | |||
| 594ee0d03c | |||
| 68ec53e29b | |||
| 0c8b075689 | |||
| 0242bbbd73 | |||
| 31423c30b9 | |||
| fbdd2c7448 | |||
| 0aff4784b1 | |||
| 10b18e8bcc | |||
| dc0a349139 | |||
| 3ac1fac444 | |||
| 5bf4ea462b | |||
| 1d056988f4 | |||
| 2415dff0e2 | |||
| d891d5a3c5 | |||
| f48813ff85 | |||
| a87b33b8c2 | |||
| 6f854ddbfd | |||
| 748e5bb561 | |||
| 67867b57cd | |||
| 91734ffa15 | |||
| 5364bef678 | |||
| 50b4f5c60f | |||
| 7cd508a727 | |||
| bf2c665433 | |||
| f5b1bf0915 | |||
| e0c6d7e4f4 | |||
| 1937e72f17 | |||
| 228ba78341 | |||
| c8c34dcc81 | |||
| 3d65fdee43 | |||
| 1897f49906 | |||
| d86785ad47 | |||
| 1c3c04a6f3 | |||
| debb79ee09 | |||
| c1dda8a230 | |||
| 5c74383dda | |||
| da1473547a | |||
| 43df368ec1 | |||
| 6f3f977100 | |||
| ab8e654c2a | |||
| 1a4113e3cd | |||
| b3445d7e7a | |||
| 50fc1ea279 | |||
| d61f53196d | |||
| 7769af68b5 | |||
| 05aa4ba092 | |||
| a26f160326 | |||
| 00de4a7b83 | |||
| 020012eb60 | |||
| cf92bc9a69 | |||
| 1c17ee28cb | |||
| 0919a9732e | |||
| 52a941f0fa | |||
| e661f6d942 | |||
| b5160bbbfa | |||
| 2df27d2a0e | |||
|
|
0c0f3823e4 | ||
|
|
5fb433f7ac | ||
| 0fc08678a2 | |||
| ff83bc9ef1 | |||
| 492cb4dbd8 | |||
| bc608cd578 | |||
| acae4fec73 | |||
| 446d8971e7 | |||
| 2f917c9285 | |||
| 1d851708eb | |||
|
|
c3d4b51927 | ||
| 6d8c04977c | |||
| 64fc8a13d3 | |||
| 73e6f8a321 | |||
| 68727e4869 | |||
| c10654c50a | |||
| 4de181e3b2 | |||
| 8eb0d2bcab | |||
| 3154fabe26 | |||
| fb9301c095 | |||
| 906487f939 | |||
| 11c0a05c84 | |||
| 1ced69d3d7 | |||
| 168194aa74 | |||
| 51afab44ef | |||
| 31e04ce865 | |||
| 6b76bc825c | |||
| 10994347aa | |||
| 76b2236c63 | |||
| 288e63c9d9 | |||
| eb7267736e | |||
| b1c9032c7d | |||
| 2a805cf3e3 | |||
| 32566d0004 | |||
| 9fb925b38c | |||
| 3af8d8b638 | |||
| 4bb434b795 | |||
| b38b887098 | |||
| a81c8e56a8 | |||
|
|
1ffa9dfc9d | ||
|
|
d45d1107fa | ||
| edd0c4cba0 | |||
| 103aa08664 | |||
|
|
b8ba7a0681 | ||
|
|
e1db55f113 | ||
|
|
d519af562a | ||
| 7493fd6401 | |||
| 217664ffc2 | |||
| 7998705d3b | |||
| 2f043d8b37 | |||
| a103fbddbe | |||
| b583b0be83 | |||
| 52323803dc | |||
| 2026b6adfe | |||
| bb4eb1f8c7 | |||
| daff9f957a | |||
| 91c8410eb0 | |||
| 68bb53435d | |||
|
|
cd5cea172a | ||
| e3f5bbad00 | |||
| 1185524e97 | |||
| ac18c73f53 | |||
| bf4730a1f3 | |||
| 3ea0ba687c | |||
| b5df810075 | |||
| fab40dae96 | |||
| c6567f4f98 | |||
| 2ecbefecf7 | |||
| 90bc744d51 | |||
|
|
e46dadb128 | ||
| 3368217108 | |||
| 85fbc8684b | |||
| a3acd654f2 | |||
| 49362fcc9d | |||
| 742b4af0e8 | |||
| aebb0dadbd | |||
|
|
a7e68f1224 | ||
| 42706adf0b | |||
| fef9398a86 | |||
| c37df72f12 | |||
|
|
45a2330425 | ||
| 0596c51a0e | |||
| 8f4ad21ed8 | |||
| 491f733221 | |||
| 6eefbdc965 | |||
| 558b6500d3 | |||
|
|
23a34c1447 | ||
| 816ff7cd17 | |||
| fd3ba99ffc | |||
| c5454a36f3 | |||
| d32b43d7a0 | |||
| 9e3cc80694 | |||
| cd0fff756e | |||
| f8bde72337 | |||
|
|
afd28f8469 | ||
| 26ba1ac2a7 | |||
| 5d520d3f3f | |||
| 1d3ed5bfd0 | |||
| c80b577a5a | |||
| 4e2ee377f2 | |||
| d7106ae28f | |||
| a864d31e84 | |||
| b462ae20bf | |||
| 2cd1e7e0dd | |||
| c951dde930 | |||
|
|
a570cef49b | ||
| 441ba01455 | |||
| 73a00fcdf0 | |||
| 205ea28e16 | |||
| ade8162660 | |||
| 1745a15acf | |||
| ad08a2956e | |||
| 8d2083be4c | |||
| 87281a436f | |||
| 4ec9444e29 | |||
|
|
95d358ae3d | ||
|
|
cea61a5719 | ||
|
|
28c29d94f2 | ||
|
|
1028d3847c | ||
| 3498c6b739 | |||
| 83eb7d861e | |||
| 22090129ec | |||
|
|
5b0ca2a63b | ||
|
|
c5fa136a1f | ||
|
|
9a63aaff74 | ||
| 5e68077ac2 | |||
| 72b9acd710 | |||
|
|
469044bb2a | ||
|
|
96a362474c | ||
|
|
1b9dfac671 |
1
.browserslistrc
Normal file
1
.browserslistrc
Normal file
@@ -0,0 +1 @@
|
||||
extends @ivuorinen/browserslist-config
|
||||
3
.commitlintrc.json
Normal file
3
.commitlintrc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["@ivuorinen/commitlint-config"]
|
||||
}
|
||||
@@ -19,11 +19,11 @@ indent_size = 1
|
||||
indent_size = 1
|
||||
indent_style = tab
|
||||
|
||||
[local/bin/*]
|
||||
[{local/bin/*,**/*.sh,**/zshrc,config/*}]
|
||||
shell_variant = bash # --language-variant
|
||||
binary_next_line = true
|
||||
switch_case_indent = true # --case-indent
|
||||
space_redirects = true
|
||||
keep_padding = true
|
||||
keep_padding = false
|
||||
function_next_line = true # --func-next-line
|
||||
|
||||
|
||||
3
.eslintrc.json
Normal file
3
.eslintrc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["@ivuorinen"]
|
||||
}
|
||||
8
.gitattributes
vendored
8
.gitattributes
vendored
@@ -13,7 +13,7 @@
|
||||
## Handle line endings automatically for files detected as
|
||||
## text and leave all files detected as binary untouched.
|
||||
## This will handle all files NOT defined below.
|
||||
* text=auto
|
||||
* text=auto oel=lf
|
||||
|
||||
# Source code
|
||||
*.bash text eol=lf
|
||||
@@ -219,3 +219,9 @@ git/* text
|
||||
**/git/* text
|
||||
**/alias text
|
||||
ssh/* text
|
||||
|
||||
# Git Crypt special files
|
||||
*-secret filter=git-crypt diff=git-crypt
|
||||
*.key filter=git-crypt diff=git-crypt
|
||||
secrets/** filter=git-crypt diff=git-crypt
|
||||
|
||||
|
||||
128
.github/CODE_OF_CONDUCT.md
vendored
Normal file
128
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
ismo@ivuorinen.net.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
112
.github/README.md
vendored
Normal file
112
.github/README.md
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
# .dotfiles
|
||||
|
||||
Welcome to [ivuorinen](https://github.com/ivuorinen)'s .dotfiles repository.
|
||||
It's a hodgepodge of scripts and configurations, tests and mistakes I'm not
|
||||
aware of yet. As I find more interesting tools, configs and other stuff,
|
||||
this repository will live accordingly.
|
||||
|
||||
Please for the love of everything good do not use these 1:1 as your own dotfiles,
|
||||
fork or download the repo as a zip and go from there with your own configs.
|
||||
|
||||
## Setup
|
||||
|
||||
### First time setup
|
||||
|
||||
1. Clone this repository to `$HOME/.dotfiles`
|
||||
2. `./install`
|
||||
3. ???
|
||||
4. Profit
|
||||
|
||||
### Updates
|
||||
|
||||
`cd $HOME/.dotfiles && git pull && ./install`
|
||||
|
||||
## The looks
|
||||
|
||||

|
||||
|
||||
## Interesting files and locations
|
||||
|
||||
### Interesting folders
|
||||
|
||||
| Path | Description |
|
||||
| ------------------- | -------------------------------------------- |
|
||||
| `.github` | GitHub Repository configuration files. |
|
||||
| `hosts/{hostname}/` | Configs that should apply to that host only. |
|
||||
| `local/bin` | Helper scripts that I've collected or wrote. |
|
||||
| `scripts` | Setup scripts. |
|
||||
|
||||
### dotfile folders
|
||||
|
||||
| Repo | Destination | Description |
|
||||
| --------- | ----------- | ------------------------------------------- |
|
||||
| `base/` | `.*` | `$HOME` level files. |
|
||||
| `config/` | `.config/` | Configurations for applications. |
|
||||
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
||||
| `ssh/` | `.ssh/` | SSH Configurations. |
|
||||
|
||||
### dfm - the dotfiles manager
|
||||
|
||||
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
||||
|
||||
## Configuration
|
||||
|
||||
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
||||
|
||||
### XDG Variables
|
||||
|
||||
| Env | Default | Short description |
|
||||
| ------------------ | -------------------- | ---------------------------------------------- |
|
||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
|
||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
|
||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
|
||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` | App state that should persist between restarts |
|
||||
|
||||
#### XDG_BIN_HOME (`$HOME/.local/bin`)
|
||||
|
||||
`$XDG_BIN_HOME` defines directory that contains local binaries.
|
||||
|
||||
User-specific executable files may be stored in `$HOME/.local/bin`.
|
||||
Distributions should ensure this directory shows up in the UNIX `$PATH`
|
||||
environment variable, at an appropriate place.
|
||||
|
||||
#### XDG_DATA_HOME (`$HOME/.local/share`)
|
||||
|
||||
`$XDG_DATA_HOME` defines the base directory relative to which
|
||||
user-specific _data files_ should be stored.
|
||||
|
||||
If `$XDG_DATA_HOME` is either not set or empty,
|
||||
a default equal to `$HOME/.local/share` should be used.
|
||||
|
||||
#### XDG_CONFIG_HOME (`$HOME/.config`)
|
||||
|
||||
`$XDG_CONFIG_HOME` defines the base directory relative to which
|
||||
user-specific _configuration files_ should be stored.
|
||||
|
||||
If `$XDG_CONFIG_HOME` is either not set or empty,
|
||||
a default equal to `$HOME/.config` should be used.
|
||||
|
||||
#### XDG_STATE_HOME (`$HOME/.local/state`)
|
||||
|
||||
`$XDG_STATE_HOME` defines the base directory relative to which
|
||||
user-specific _state files_ should be stored.
|
||||
|
||||
If `$XDG_STATE_HOME` is either not set or empty,
|
||||
a default equal to `$HOME/.local/state` should be used.
|
||||
|
||||
The `$XDG_STATE_HOME` contains _state data_ that should
|
||||
_persist between (application) restarts_, but that is not important or
|
||||
portable enough to the user that it should be stored in `$XDG_DATA_HOME`.
|
||||
|
||||
- It may contain:
|
||||
- actions history (logs, history, recently used files, …)
|
||||
- current state of the application that can be reused
|
||||
on a restart (view, layout, open files, undo history, …)
|
||||
|
||||
#### XDG_DATA_DIRS
|
||||
|
||||
`$XDG_DATA_DIRS` defines the preference-ordered set of base directories
|
||||
to search for data files in addition to the `$XDG_DATA_HOME` base directory.
|
||||
The directories in `$XDG_DATA_DIRS` should be seperated with a colon ':'.
|
||||
|
||||
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
12
.github/SECURITY.md
vendored
Normal file
12
.github/SECURITY.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Usually only the latest daily tag is supported at all,
|
||||
because that's the current I'm using.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please send me email directly to the email in my profile.
|
||||
I'd appreciate link to the release the vulnerability was
|
||||
found in, and what is the vulnerable code/dependency.
|
||||
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@@ -1,8 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: 'weekly'
|
||||
|
||||
4
.github/renovate.json
vendored
4
.github/renovate.json
vendored
@@ -1,6 +1,4 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>ivuorinen/.github:renovate-config"
|
||||
]
|
||||
"extends": ["local>ivuorinen/.github:renovate-config"]
|
||||
}
|
||||
|
||||
BIN
.github/screenshots/tmux-astronvim-130x40.png
vendored
Normal file
BIN
.github/screenshots/tmux-astronvim-130x40.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
BIN
.github/screenshots/tmux-nvim.png
vendored
Normal file
BIN
.github/screenshots/tmux-nvim.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
BIN
.github/screenshots/tmux-powerlevel10k-130x20.png
vendored
Normal file
BIN
.github/screenshots/tmux-powerlevel10k-130x20.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
17
.github/tag-changelog-config.js
vendored
17
.github/tag-changelog-config.js
vendored
@@ -7,20 +7,21 @@ module.exports = {
|
||||
{ types: ['build', 'ci'], label: '🏗️ Build System' },
|
||||
{ types: ['refactor'], label: '🪚 Refactors' },
|
||||
{ types: ['doc', 'docs'], label: '📚 Documentation Changes' },
|
||||
{ types: ['config'], label: '🪛 Configuration Changes' },
|
||||
{ types: ['test', 'tests'], label: '🔍 Tests' },
|
||||
{ types: ['style', 'codestyle'], label: '💅 Code Style Changes' },
|
||||
{ types: ['chore', 'Chore'], label: '🧹 Chores' },
|
||||
{ types: ['style', 'codestyle', 'lint'], label: '💅 Code Style Changes' },
|
||||
{ types: ['chore', 'Chore', 'deps', 'Deps'], label: '🧹 Chores' },
|
||||
{ types: ['other', 'Other'], label: 'Other Changes' },
|
||||
],
|
||||
|
||||
excludeTypes: [],
|
||||
|
||||
renderTypeSection: function (label, commits) {
|
||||
let text = `\n## ${ label }\n\n`
|
||||
let text = `\n## ${label}\n\n`
|
||||
|
||||
commits.forEach((commit) => {
|
||||
const scope = commit.scope ? `**${ commit.scope }:** ` : ''
|
||||
text += `- ${ scope }${ commit.subject }\n`
|
||||
commits.forEach(commit => {
|
||||
const scope = commit.scope ? `**${commit.scope}:** ` : ''
|
||||
text += `- ${scope}${commit.subject}\n`
|
||||
})
|
||||
|
||||
return text
|
||||
@@ -28,8 +29,8 @@ module.exports = {
|
||||
|
||||
renderChangelog: function (release, changes) {
|
||||
const now = new Date()
|
||||
const d = now.toISOString().substring(0, 10);
|
||||
const header = `# ${ release } - ${ d }\n`;
|
||||
const d = now.toISOString().substring(0, 10)
|
||||
const header = `# ${release} - ${d}\n`
|
||||
return header + changes + '\n\n'
|
||||
},
|
||||
}
|
||||
|
||||
11
.github/workflows/changelog.yml
vendored
11
.github/workflows/changelog.yml
vendored
@@ -1,23 +1,18 @@
|
||||
---
|
||||
name: Debug Changelog # Workflow name displayed on GitHub
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Trigger manually
|
||||
|
||||
jobs:
|
||||
debug-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Create changelog text
|
||||
id: changelog
|
||||
uses: loopwerk/tag-changelog@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
config_file: .github/tag-changelog-config.js
|
||||
|
||||
- name: "Echo results"
|
||||
- name: 'Echo results'
|
||||
id: output-changelog
|
||||
run: |
|
||||
echo "${{ steps.changelog.outputs.changes }}"
|
||||
|
||||
4
.github/workflows/linters.yml
vendored
4
.github/workflows/linters.yml
vendored
@@ -3,9 +3,9 @@ on: [push]
|
||||
jobs:
|
||||
linters:
|
||||
name: Linters
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: GitHub Actions
|
||||
uses: reviewdog/action-actionlint@v1
|
||||
with:
|
||||
|
||||
13
.github/workflows/new-release.yml
vendored
13
.github/workflows/new-release.yml
vendored
@@ -1,27 +1,21 @@
|
||||
---
|
||||
name: Release Daily State # Workflow name displayed on GitHub
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Trigger manually
|
||||
schedule:
|
||||
- cron: "30 20 * * *" # UTC is 2-3 hours behind Europe/Helsinki, my timezone
|
||||
|
||||
- cron: '30 20 * * *' # UTC is 2-3 hours behind Europe/Helsinki, my timezone
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
new-daily-release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
outputs:
|
||||
created: ${{ steps.daily-version.outputs.created }}
|
||||
version: ${{ steps.daily-version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3 # Checkout our working repository
|
||||
|
||||
- uses: actions/checkout@v4 # Checkout our working repository
|
||||
- name: Create tag if necessary
|
||||
uses: fregante/daily-version-action@v2
|
||||
id: daily-version
|
||||
|
||||
- name: Create changelog text
|
||||
if: steps.daily-version.outputs.created
|
||||
id: changelog
|
||||
@@ -29,7 +23,6 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
config_file: .github/tag-changelog-config.js
|
||||
|
||||
- name: Create release
|
||||
if: steps.daily-version.outputs.created
|
||||
uses: actions/create-release@latest
|
||||
|
||||
10
.github/workflows/update-submodules.yml
vendored
10
.github/workflows/update-submodules.yml
vendored
@@ -1,29 +1,25 @@
|
||||
name: Update submodules
|
||||
on:
|
||||
schedule: [cron: 0 3 * * *]
|
||||
schedule: [{ cron: 0 3 * * * }]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-submodules:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
- name: Config Git User
|
||||
run: |
|
||||
git config --global user.name "${{ github.actor }}"
|
||||
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
|
||||
- name: Update submodules
|
||||
run: |
|
||||
if git commit -am"chore(git): Update submodules (automated)
|
||||
|
||||
14
.gitignore
vendored
14
.gitignore
vendored
@@ -1,12 +1,24 @@
|
||||
Brewfile.lock.json
|
||||
config/nvim/lazy-lock.json
|
||||
*.log
|
||||
*-secret
|
||||
*cache
|
||||
.idea
|
||||
.vscode
|
||||
config/fzf
|
||||
config/cheat/cheatsheets/pure-bash-bible/*
|
||||
config/cheat/cheatsheets/tldr/*
|
||||
config/git/credentials
|
||||
config/npm/npmrc
|
||||
config/zsh/.zcompdump
|
||||
ssh/local.d/*
|
||||
!ssh/local.d/.gitkeep
|
||||
!.gitkeep
|
||||
.env
|
||||
local/share/fonts/*
|
||||
node_modules
|
||||
.nfs*
|
||||
*.socket
|
||||
iTermServer-*
|
||||
lock
|
||||
config/iterm2/AppSupport
|
||||
|
||||
|
||||
41
.gitmodules
vendored
41
.gitmodules
vendored
@@ -14,18 +14,41 @@
|
||||
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "config/nvim"]
|
||||
path = config/nvim
|
||||
url = https://github.com/AstroNvim/AstroNvim.git
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
|
||||
[submodule "cheat-community"]
|
||||
path = config/cheat/cheatsheets/community
|
||||
url = https://github.com/cheat/cheatsheets.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tpm"]
|
||||
path = config/tmux/plugins/tpm
|
||||
url = https://github.com/tmux-plugins/tpm.git
|
||||
[submodule "tmux/tmux-continuum"]
|
||||
path = config/tmux/plugins/tmux-continuum
|
||||
url = https://github.com/tmux-plugins/tmux-continuum
|
||||
ignore = dirty
|
||||
[submodule "tmux/tmux-resurrect"]
|
||||
path = config/tmux/plugins/tmux-resurrect
|
||||
url = https://github.com/tmux-plugins/tmux-resurrect
|
||||
ignore = dirty
|
||||
[submodule "tmux/tmux-sensible"]
|
||||
path = config/tmux/plugins/tmux-sensible
|
||||
url = https://github.com/tmux-plugins/tmux-sensible.git
|
||||
ignore = dirty
|
||||
[submodule "tmux/tmux-sessionist"]
|
||||
path = config/tmux/plugins/tmux-sessionist
|
||||
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
||||
ignore = dirty
|
||||
[submodule "tmux/tmux-yank"]
|
||||
path = config/tmux/plugins/tmux-yank
|
||||
url = https://github.com/tmux-plugins/tmux-yank.git
|
||||
ignore = dirty
|
||||
[submodule "tmux/tmux-window-name"]
|
||||
path = config/tmux/plugins/tmux-window-name
|
||||
url = https://github.com/ofirgall/tmux-window-name.git
|
||||
ignore = dirty
|
||||
[submodule "dotbot-pip"]
|
||||
path = tools/dotbot-pip
|
||||
url = https://github.com/sobolevn/dotbot-pip.git
|
||||
[submodule "tmux/tmux-suspend"]
|
||||
path = config/tmux/plugins/tmux-suspend
|
||||
url = https://github.com/MunifTanjim/tmux-suspend.git
|
||||
[submodule "tmux/tmux-mode-indicator"]
|
||||
path = config/tmux/plugins/tmux-mode-indicator
|
||||
url = https://github.com/MunifTanjim/tmux-mode-indicator.git
|
||||
|
||||
6
.ignore
Normal file
6
.ignore
Normal file
@@ -0,0 +1,6 @@
|
||||
.git/**
|
||||
config/cheat/cheatsheets/community/**
|
||||
tools/dotbot/**
|
||||
tools/dotbot-brew/**
|
||||
tools/dotbot-include/**
|
||||
node_modules
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "markdownlint/style/prettier",
|
||||
"extends": "@ivuorinen/markdownlint-config",
|
||||
"code-block-style": {
|
||||
"style": "fenced"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config/cheat/cheatsheets/community/
|
||||
config/tmux/
|
||||
config/nvim/
|
||||
tools/
|
||||
# only care about files that are under our control
|
||||
config/cheat/cheatsheets/community/*
|
||||
config/tmux/plugins/*
|
||||
tools/*
|
||||
node_modules/*
|
||||
|
||||
|
||||
8
.prettierignore
Normal file
8
.prettierignore
Normal file
@@ -0,0 +1,8 @@
|
||||
.mypy_cache/*
|
||||
tools/dotbot*
|
||||
local/bin/antigen.zsh
|
||||
config/cheat/cheatsheets/community
|
||||
config/tmux/plugins/*
|
||||
lazy-lock.json
|
||||
Brewfile.lock.json
|
||||
|
||||
14
.prettierrc.js
Normal file
14
.prettierrc.js
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
...require('@ivuorinen/prettier-config'),
|
||||
trailingComma: 'all',
|
||||
// Add custom options below:
|
||||
overrides: [
|
||||
{
|
||||
files: '*.md',
|
||||
options: {
|
||||
printWidth: 120,
|
||||
proseWrap: 'preserve',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
3.11
|
||||
3.12
|
||||
|
||||
3
.releaserc.json
Normal file
3
.releaserc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["@ivuorinen/semantic-release-config"]
|
||||
}
|
||||
@@ -5,3 +5,22 @@
|
||||
external-sources=true
|
||||
includeAllWorkspaceSymbols=true
|
||||
|
||||
# SC2039: In POSIX sh, 'local' is undefined.
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2039
|
||||
disable=SC2039
|
||||
|
||||
# SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2166
|
||||
disable=SC2166
|
||||
|
||||
# SC2154: Variable is referenced but not assigned
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2154
|
||||
disable=SC2154
|
||||
|
||||
# SC1091: Not following <file>
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC1091
|
||||
disable=SC1091
|
||||
|
||||
# SC2174: When used with -p, -m only applies to the deepest directory.
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2174
|
||||
disable=SC2174
|
||||
|
||||
@@ -3,5 +3,8 @@ line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "None"
|
||||
call_parentheses = "Always"
|
||||
collapse_simple_statement = "Always"
|
||||
|
||||
[sort_requires]
|
||||
enabled = true
|
||||
|
||||
24
.yamlfmt
24
.yamlfmt
@@ -1,24 +0,0 @@
|
||||
formatter:
|
||||
type: basic
|
||||
indent: 2
|
||||
retain_line_breaks: false
|
||||
disallow_anchors: false
|
||||
max_line_length: 0
|
||||
scan_folded_as_literal: false
|
||||
indentless_arrays: false
|
||||
|
||||
doublestar: true
|
||||
|
||||
extensions:
|
||||
- yaml
|
||||
- yml
|
||||
|
||||
include:
|
||||
- ./*.{yml,yaml}
|
||||
- ./**/*.{yml,yaml}
|
||||
|
||||
exclude:
|
||||
- ./dotbot/**
|
||||
- ./dotbot-*/**
|
||||
- ./config/astronvim/**
|
||||
- ./config/nvim/**
|
||||
@@ -1,2 +0,0 @@
|
||||
# .yamlignore
|
||||
|
||||
95
README.md
95
README.md
@@ -1,95 +0,0 @@
|
||||
# .dotfiles
|
||||
|
||||
Welcome to [ivuorinen](https://github.com/ivuorinen)'s .dotfiles repository.
|
||||
It's a hodgepodge of scripts and configurations, tests and mistakes I'm not
|
||||
aware of yet. As I find more interesting tools, configs and other stuff,
|
||||
this repository will live accordingly.
|
||||
|
||||
Please for the love of everything good do not use these 1:1 as your own dotfiles,
|
||||
fork or download the repo as a zip and go from there with your own configs.
|
||||
|
||||
## Setup
|
||||
|
||||
### First time setup
|
||||
|
||||
1. Clone this repository to `$HOME/.dotfiles`
|
||||
2. `./install`
|
||||
3. ???
|
||||
4. Profit
|
||||
|
||||
### Updates
|
||||
|
||||
`cd $HOME/.dotfiles && git pull && ./install`
|
||||
|
||||
## The looks
|
||||
|
||||
## tmux with starship, the default view
|
||||
|
||||

|
||||
|
||||
## tmux + nvim (astronvim) editing this repository
|
||||
|
||||

|
||||
|
||||
## Interesting files and locations
|
||||
|
||||
### Interesting folders
|
||||
|
||||
| Path | Description |
|
||||
|---------------------|----------------------------------------------|
|
||||
| `.github` | GitHub Repository configuration files. |
|
||||
| `hosts/{hostname}/` | Configs that should apply to that host only. |
|
||||
| `local/bin` | Helper scripts that I've collected or wrote. |
|
||||
| `scripts` | Setup scripts. |
|
||||
|
||||
### dotfile folders
|
||||
|
||||
| Repo | Destination | Description |
|
||||
|-----------|-------------|---------------------------------------------|
|
||||
| `base/` | `.*` | `$HOME` level files. |
|
||||
| `config/` | `.config/` | Configurations for applications. |
|
||||
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
||||
| `ssh/` | `.ssh/` | SSH Configurations. |
|
||||
|
||||
### dfm - the dotfiles manager
|
||||
|
||||
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
||||
|
||||
## Configuration
|
||||
|
||||
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
||||
|
||||
### XDG Variables
|
||||
|
||||
| Env | Default |
|
||||
|--------------------|----------------------|
|
||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
|
||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
||||
|
||||
- `$XDG_BIN_HOME` defines directory that contains local binaries.
|
||||
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
|
||||
files should be stored.
|
||||
- If `$XDG_DATA_HOME` is either not set or empty, a default equal to
|
||||
`$HOME/.local/share` should be used.
|
||||
- `$XDG_CONFIG_HOME` defines the base directory relative to which user-specific
|
||||
configuration files should be stored.
|
||||
- If `$XDG_CONFIG_HOME` is either not set or empty, a default equal to `$HOME/.config` should be used.
|
||||
- `$XDG_STATE_HOME` defines the base directory relative
|
||||
to which user-specific state files should be stored.
|
||||
- If `$XDG_STATE_HOME` is either not set or empty, a default equal to `$HOME/.local/state` should be used.
|
||||
- The `$XDG_STATE_HOME` contains state data that should persist between (application) restarts,
|
||||
but that is not important or portable enough to the user that it should be stored in `$XDG_DATA_HOME`.
|
||||
- It may contain:
|
||||
- actions history (logs, history, recently used files, …)
|
||||
- current state of the application that can be reused
|
||||
on a restart (view, layout, open files, undo history, …)
|
||||
- User-specific executable files may be stored in `$HOME/.local/bin`.
|
||||
Distributions should ensure this directory shows up in the UNIX `$PATH`
|
||||
environment variable, at an appropriate place.
|
||||
- `$XDG_DATA_DIRS` defines the preference-ordered set of base directories
|
||||
to search for data files in addition to the `$XDG_DATA_HOME` base directory.
|
||||
The directories in `$XDG_DATA_DIRS` should be seperated with a colon ':'.
|
||||
|
||||
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
@@ -1,7 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
git submodule add --name dotbot -f https://github.com/anishathalye/dotbot.git tools/dotbot
|
||||
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git tools/dotbot-brew
|
||||
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
||||
git submodule add --name cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
||||
git submodule add --name tmux/tpm -f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm
|
||||
# dotbot and plugins
|
||||
git submodule add --name dotbot \
|
||||
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
||||
git submodule add --name dotbot-brew \
|
||||
-f https://github.com/wren/dotbot-brew.git tools/dotbot-brew
|
||||
git submodule add --name dotbot-include \
|
||||
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
||||
git submodule add --name dotbot-pip \
|
||||
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
|
||||
|
||||
# other repos
|
||||
git submodule add --name cheat-community \
|
||||
-f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
||||
|
||||
# tmux plugin manager and plugins
|
||||
git submodule add --name tmux/tmux-continuum \
|
||||
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
||||
git submodule add --name tmux/tmux-mode-indicator \
|
||||
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
||||
git submodule add --name tmux/tmux-resurrect \
|
||||
-f https://github.com/tmux-plugins/tmux-resurrect config/tmux/plugins/tmux-resurrect
|
||||
git submodule add --name tmux/tmux-sensible \
|
||||
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
||||
git submodule add --name tmux/tmux-sessionist \
|
||||
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
|
||||
git submodule add --name tmux/tmux-suspend \
|
||||
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
|
||||
git submodule add --name tmux/tmux-window-name \
|
||||
-f https://github.com/ofirgall/tmux-window-name.git config/tmux/plugins/tmux-window-name
|
||||
git submodule add --name tmux/tmux-yank \
|
||||
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
|
||||
|
||||
# Takes submodules and sets them to ignore all changes
|
||||
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do
|
||||
git config "submodule.${MODULE}.ignore" all
|
||||
done
|
||||
|
||||
# remove old submodules
|
||||
[ -d "config/tmux/plugins/tpm" ] && rm -rf config/tmux/plugins/tpm
|
||||
[ -d "config/tmux/plugins/tmux" ] && rm -rf config/tmux/plugins/tmux
|
||||
[ -d "config/tmux/plugins/tmux-menus" ] && rm -rf config/tmux/plugins/tmux-menus
|
||||
[ -d "tools/dotbot-crontab" ] && rm -rf tools/dotbot-crontab
|
||||
[ -d "tools/dotbot-snap" ] && rm -rf tools/dotbot-snap
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
113
base/bashrc
113
base/bashrc
@@ -4,20 +4,105 @@
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
# custom variables
|
||||
export XDG_BIN_HOME="$HOME/.local/bin"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||
|
||||
# Paths
|
||||
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/cargo/bin:$PATH"
|
||||
|
||||
# shellcheck source=scripts/shared.sh
|
||||
# source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
source "$DOTFILES/config/exports"
|
||||
source "$DOTFILES/config/alias"
|
||||
|
||||
# shellcheck source=../config/fzf/fzf.bash
|
||||
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
|
||||
source "${DOTFILES}/config/fzf/fzf.bash"
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
ssh-add -A 2>/dev/null
|
||||
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
|
||||
# Enable the subsequent settings only in interactive sessions
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
esac
|
||||
|
||||
# Path to your oh-my-bash installation.
|
||||
export OSH="$HOME/.local/share/oh-my-bash"
|
||||
|
||||
[ -d "$OSH" ] && {
|
||||
export OSH_THEME="powerline-multiline"
|
||||
|
||||
# PowerLine theme config
|
||||
export POWERLINE_LEFT_PROMPT="cwd scm"
|
||||
export POWERLINE_RIGHT_PROMPT="python_venv ruby in_vim battery user_info"
|
||||
|
||||
# Display red dots whilst waiting for completion.
|
||||
export COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
export DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# To disable the uses of "sudo" by oh-my-bash, please set "false" to
|
||||
# this variable. The default behavior for the empty value is "true".
|
||||
export OMB_USE_SUDO=true
|
||||
|
||||
# To enable/disable display of Python virtualenv and condaenv
|
||||
export OMB_PROMPT_SHOW_PYTHON_VENV=true # enable
|
||||
# OMB_PROMPT_SHOW_PYTHON_VENV=false # disable
|
||||
|
||||
# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
|
||||
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
|
||||
# Example format: completions=(ssh git bundler gem pip pip3)
|
||||
# Add wisely, as too many completions slow down shell startup.
|
||||
export completions=(
|
||||
git
|
||||
composer
|
||||
ssh
|
||||
)
|
||||
|
||||
# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
|
||||
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
|
||||
# Example format: aliases=(vagrant composer git-avh)
|
||||
# Add wisely, as too many aliases slow down shell startup.
|
||||
export aliases=(
|
||||
general
|
||||
)
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
export plugins=(
|
||||
git
|
||||
bashmarks
|
||||
)
|
||||
|
||||
# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
|
||||
# Example format:
|
||||
# if [ "$DISPLAY" ] || [ "$SSH" ]; then
|
||||
# plugins+=(tmux-autoattach)
|
||||
# fi
|
||||
|
||||
source "$OSH/oh-my-bash.sh"
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
[work]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo.vuorinen@vincit.fi
|
||||
|
||||
[home]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo@ivuorinen.net
|
||||
|
||||
[github]
|
||||
name = ivuorinen
|
||||
email = ivuorinen@users.noreply.github.com
|
||||
|
||||
34
base/gitprofile
Normal file
34
base/gitprofile
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"profiles": {
|
||||
"github": [
|
||||
{
|
||||
"key": "user.name",
|
||||
"value": "Ismo Vuorinen"
|
||||
},
|
||||
{
|
||||
"key": "user.email",
|
||||
"value": "ivuorinen@users.noreply.github.com"
|
||||
}
|
||||
],
|
||||
"home": [
|
||||
{
|
||||
"key": "user.email",
|
||||
"value": "ismo@ivuorinen.net"
|
||||
},
|
||||
{
|
||||
"key": "user.name",
|
||||
"value": "Ismo Vuorinen"
|
||||
}
|
||||
],
|
||||
"work": [
|
||||
{
|
||||
"key": "user.email",
|
||||
"value": "ismo.vuorinen@vincit.fi"
|
||||
},
|
||||
{
|
||||
"key": "user.name",
|
||||
"value": "Ismo Vuorinen"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,3 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
alias php="php -d error_reporting=22527"
|
||||
|
||||
|
||||
24
base/vuerc
24
base/vuerc
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"useTaobaoRegistry": false,
|
||||
"presets": {
|
||||
"v2-router-vuex-scss-prettier": {
|
||||
"useConfigFiles": false,
|
||||
"plugins": {
|
||||
"@vue/cli-plugin-babel": {},
|
||||
"@vue/cli-plugin-router": {
|
||||
"historyMode": false
|
||||
},
|
||||
"@vue/cli-plugin-vuex": {},
|
||||
"@vue/cli-plugin-eslint": {
|
||||
"config": "prettier",
|
||||
"lintOn": [
|
||||
"save"
|
||||
]
|
||||
}
|
||||
},
|
||||
"vueVersion": "2",
|
||||
"cssPreprocessor": "dart-sass"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
base/zshenv
Normal file
19
base/zshenv
Normal file
@@ -0,0 +1,19 @@
|
||||
# shellcheck shell=bash
|
||||
# vim: filetype=zsh
|
||||
|
||||
export PATH="$HOME/.local/bin:$HOME/.dotfiles/local/bin:$HOME/.local/go/bin:$PATH"
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
# custom variables
|
||||
export XDG_BIN_HOME="$HOME/.local/bin"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||
|
||||
source "$DOTFILES/config/exports"
|
||||
113
base/zshrc
Normal file → Executable file
113
base/zshrc
Normal file → Executable file
@@ -1,51 +1,96 @@
|
||||
# this is my zsh config. there are many like it, but this one is mine.
|
||||
# shellcheck shell=bash
|
||||
|
||||
autoload -U colors zsh/terminfo
|
||||
colors
|
||||
setopt correct
|
||||
|
||||
# Add completion scripts to zsh path
|
||||
FPATH="~/.config/zsh/completion:$FPATH"
|
||||
autoload -Uz compinit && compinit -i
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
# shellcheck source=shared.sh
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
# custom variables
|
||||
export XDG_BIN_HOME="$HOME/.local/bin"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/cargo/bin:$PATH"
|
||||
|
||||
source "$DOTFILES/config/exports"
|
||||
source "$DOTFILES/config/alias"
|
||||
source "$DOTFILES/config/functions"
|
||||
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -f "$file" ] && source "$file"
|
||||
[ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
export COMPLETION_WAITING_DOTS=true
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
path_append "/opt/homebrew/bin"
|
||||
if type brew &> /dev/null; then
|
||||
eval "$(brew shellenv)"
|
||||
FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}"
|
||||
fi
|
||||
|
||||
path_append "/usr/local/bin"
|
||||
path_prepend "$XDG_DATA_HOME/cargo/bin"
|
||||
path_prepend "$XDG_BIN_HOME"
|
||||
path_prepend "$HOME/.local/go/bin"
|
||||
path_prepend "$XDG_DATA_HOME/bob/nvim-bin"
|
||||
|
||||
export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
|
||||
x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
|
||||
|
||||
# Add completion scripts to zsh path
|
||||
FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH"
|
||||
|
||||
# Try to load antigen, if present
|
||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||
# shellcheck source=../../.local/bin/antigen.zsh
|
||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||
|
||||
# antigen is present
|
||||
have antigen && {
|
||||
antigen use oh-my-zsh
|
||||
antigen use oh-my-zsh
|
||||
|
||||
# config/functions
|
||||
x-default-antigen-bundles
|
||||
export ZSH_TMUX_AUTOSTART=true
|
||||
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
|
||||
export ZSH_TMUX_UNICODE=true
|
||||
export ZSH_TMUX_AUTOQUIT=false
|
||||
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
||||
|
||||
antigen apply
|
||||
}
|
||||
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||
|
||||
# starship is present
|
||||
have starship && eval "$(starship init zsh)"
|
||||
# z, the zsh version
|
||||
export ZSHZ_DATA="$XDG_STATE_HOME/z"
|
||||
antigen bundle z
|
||||
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||
# these should be always available
|
||||
antigen bundle tmux
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle command-not-found
|
||||
antigen bundle ssh-agent
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
|
||||
# these should be available if there's need
|
||||
have brew && antigen bundle brew
|
||||
have php && antigen bundle php
|
||||
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||
|
||||
# nvm is a strange beast
|
||||
zstyle ':omz:plugins:nvm' autoload yes
|
||||
antigen bundle nvm
|
||||
# antigen bundle "$DOTFILES/config/zsh/plugins/nvm-auto-use"
|
||||
|
||||
# nice to have stuff
|
||||
antigen bundle gcloud
|
||||
|
||||
# this needs to be the last item
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen apply
|
||||
|
||||
# shellcheck source=../config/fzf/fzf.zsh
|
||||
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
|
||||
&& source "${DOTFILES}/config/fzf/fzf.zsh"
|
||||
|
||||
# Start starship
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
4
config/act/actrc
Normal file
4
config/act/actrc
Normal file
@@ -0,0 +1,4 @@
|
||||
-P ubuntu-latest=catthehacker/ubuntu:act-latest
|
||||
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
|
||||
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
|
||||
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
|
||||
206
config/alacritty/alacritty.yml
Normal file
206
config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,206 @@
|
||||
---
|
||||
# Configuration for Alacritty, the GPU enhanced terminal emulator
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty it self.
|
||||
env:
|
||||
# TERM env customization.
|
||||
#
|
||||
# If this property is not set, alacritty will set it to xterm-256color.
|
||||
#
|
||||
# Note that some xterm terminfo databases don't declare support for italics.
|
||||
# You can verify this by checking for the presence of `smso` and `sitm` in
|
||||
# `infocmp xterm-256color`.
|
||||
TERM: xterm-256color
|
||||
|
||||
# Window dimensions in character columns and lines
|
||||
# (changes require restart)
|
||||
window:
|
||||
dynamic_title: true
|
||||
dimensions:
|
||||
columns: 130
|
||||
lines: 40
|
||||
|
||||
# Adds this many blank pixels of padding around the window
|
||||
# Units are physical pixels; this is not DPI aware.
|
||||
# (change requires restart)
|
||||
padding:
|
||||
x: 5
|
||||
y: 5
|
||||
|
||||
decorations: buttonless
|
||||
|
||||
opacity: 0.97
|
||||
|
||||
# When true, bold text is drawn using the bright variant of colors.
|
||||
draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Font configuration (changes require restart)
|
||||
font:
|
||||
# The normal (roman) font face to use.
|
||||
normal:
|
||||
family: JetBrainsMonoNL Nerd Font Mono
|
||||
# Style can be specified to pick a specific face.
|
||||
style: ExtraLight
|
||||
|
||||
# The bold font face
|
||||
bold:
|
||||
family: JetBrainsMonoNL Nerd Font Mono
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Bold
|
||||
|
||||
# The italic font face
|
||||
italic:
|
||||
family: JetBrainsMonoNL Nerd Font Mono
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Italic
|
||||
|
||||
# Point size of the font
|
||||
size: 14.0
|
||||
|
||||
# Offset is the extra space around each character. offset.y can be thought of
|
||||
# as modifying the linespacing, and offset.x as modifying the letter spacing.
|
||||
offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increase the x offset to move the glyph to
|
||||
# the right, increase the y offset to move the glyph upward.
|
||||
glyph_offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Should display the render timer
|
||||
debug.render_timer: false
|
||||
|
||||
# TokyoNight Alacritty Colors (storm)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x24283b'
|
||||
foreground: '0xc0caf5'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x1d202f'
|
||||
red: '0xf7768e'
|
||||
green: '0x9ece6a'
|
||||
yellow: '0xe0af68'
|
||||
blue: '0x7aa2f7'
|
||||
magenta: '0xbb9af7'
|
||||
cyan: '0x7dcfff'
|
||||
white: '0xa9b1d6'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x414868'
|
||||
red: '0xf7768e'
|
||||
green: '0x9ece6a'
|
||||
yellow: '0xe0af68'
|
||||
blue: '0x7aa2f7'
|
||||
magenta: '0xbb9af7'
|
||||
cyan: '0x7dcfff'
|
||||
white: '0xc0caf5'
|
||||
|
||||
indexed_colors:
|
||||
- { index: 16, color: '0xff9e64' }
|
||||
- { index: 17, color: '0xdb4b4b' }
|
||||
|
||||
key_bindings:
|
||||
- { key: V, mods: Command, action: Paste }
|
||||
- { key: C, mods: Command, action: Copy }
|
||||
- { key: Q, mods: Command, action: Quit }
|
||||
- { key: W, mods: Command, action: Quit }
|
||||
- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
- { key: Home, chars: "\eOH", mode: AppCursor }
|
||||
- { key: Home, chars: "\e[1~", mode: ~AppCursor }
|
||||
- { key: End, chars: "\eOF", mode: AppCursor }
|
||||
- { key: End, chars: "\e[4~", mode: ~AppCursor }
|
||||
- { key: PageUp, mods: Shift, chars: "\e[5;2~" }
|
||||
- { key: PageUp, mods: Control, chars: "\e[5;5~" }
|
||||
- { key: PageUp, chars: "\e[5~" }
|
||||
- { key: PageDown, mods: Shift, chars: "\e[6;2~" }
|
||||
- { key: PageDown, mods: Control, chars: "\e[6;5~" }
|
||||
- { key: PageDown, chars: "\e[6~" }
|
||||
- { key: Left, mods: Shift, chars: "\e[1;2D" }
|
||||
- { key: Left, mods: Control, chars: "\e[1;5D" }
|
||||
- { key: Left, mods: Alt, chars: "\e[1;3D" }
|
||||
- { key: Left, chars: "\e[D", mode: ~AppCursor }
|
||||
- { key: Left, chars: "\eOD", mode: AppCursor }
|
||||
- { key: Right, mods: Shift, chars: "\e[1;2C" }
|
||||
- { key: Right, mods: Control, chars: "\e[1;5C" }
|
||||
- { key: Right, mods: Alt, chars: "\e[1;3C" }
|
||||
- { key: Right, chars: "\e[C", mode: ~AppCursor }
|
||||
- { key: Right, chars: "\eOC", mode: AppCursor }
|
||||
- { key: Up, mods: Shift, chars: "\e[1;2A" }
|
||||
- { key: Up, mods: Control, chars: "\e[1;5A" }
|
||||
- { key: Up, mods: Alt, chars: "\e[1;3A" }
|
||||
- { key: Up, chars: "\e[A", mode: ~AppCursor }
|
||||
- { key: Up, chars: "\eOA", mode: AppCursor }
|
||||
- { key: Down, mods: Shift, chars: "\e[1;2B" }
|
||||
- { key: Down, mods: Control, chars: "\e[1;5B" }
|
||||
- { key: Down, mods: Alt, chars: "\e[1;3B" }
|
||||
- { key: Down, chars: "\e[B", mode: ~AppCursor }
|
||||
- { key: Down, chars: "\eOB", mode: AppCursor }
|
||||
- { key: Tab, mods: Shift, chars: "\e[Z" }
|
||||
- { key: F1, chars: "\eOP" }
|
||||
- { key: F2, chars: "\eOQ" }
|
||||
- { key: F3, chars: "\eOR" }
|
||||
- { key: F4, chars: "\eOS" }
|
||||
- { key: F5, chars: "\e[15~" }
|
||||
- { key: F6, chars: "\e[17~" }
|
||||
- { key: F7, chars: "\e[18~" }
|
||||
- { key: F8, chars: "\e[19~" }
|
||||
- { key: F9, chars: "\e[20~" }
|
||||
- { key: F10, chars: "\e[21~" }
|
||||
- { key: F11, chars: "\e[23~" }
|
||||
- { key: F12, chars: "\e[24~" }
|
||||
- { key: Back, chars: '' }
|
||||
- { key: Back, mods: Alt, chars: "\e" }
|
||||
- { key: Insert, chars: "\e[2~" }
|
||||
- { key: Delete, chars: "\e[3~" }
|
||||
|
||||
# shortcuts for tmux. the leader key is control-b (0x02)
|
||||
- { key: W, mods: Command, chars: "\x02&" } # close tab (kill)
|
||||
- { key: T, mods: Command, chars: "\x02c" } # new tab
|
||||
- { key: RBracket, mods: Command|Shift, chars: "\x02n" } # select next tab
|
||||
- { key: LBracket, mods: Command|Shift, chars: "\x02p" } # select previous tab
|
||||
- { key: RBracket, mods: Command, chars: "\x02o" } # select next pane
|
||||
- { key: LBracket, mods: Command, chars: "\x02;" } # select last (previously used) pane
|
||||
- { key: F, mods: Command, chars: "\x02/" } # search (upwards) (see tmux.conf)
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
|
||||
# be specified.
|
||||
#
|
||||
# Values for `mouse`:
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# Values for `action`:
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - Copy (TODO)
|
||||
mouse_bindings:
|
||||
- { mouse: Middle, action: PasteSelection }
|
||||
|
||||
mouse:
|
||||
double_click: { threshold: 300 }
|
||||
triple_click: { threshold: 300 }
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ',│`|:"'' ()[]{}<>'
|
||||
# Shell
|
||||
#
|
||||
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
|
||||
# Entries in shell.args are passed unmodified as arguments to the shell.
|
||||
#
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
139
config/alias
139
config/alias
@@ -1,13 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck source="../scripts/shared.sh"
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
# shellcheck disable=1091,2139
|
||||
DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Get installed php versions from brew and setup aliases
|
||||
function x-set-php-aliases
|
||||
{
|
||||
have brew && {
|
||||
x-have brew && {
|
||||
local php_versions=()
|
||||
while IFS="" read -r line; do php_versions+=("$line"); done < <(brew list | grep '^php')
|
||||
while IFS="" read -r line; do php_versions+=("$line"); done < <(bkt -- brew list | grep '^php')
|
||||
|
||||
php_error_reporting='-d error_reporting=22527'
|
||||
|
||||
@@ -54,10 +55,70 @@ if [[ $(uname) == 'Darwin' ]]; then
|
||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||
fi
|
||||
|
||||
# Be nice
|
||||
alias please="sudo "
|
||||
|
||||
# Color the grep output
|
||||
alias grep='grep --color'
|
||||
|
||||
! x-have eza && alias ls='ls --color=auto'
|
||||
x-have eza && {
|
||||
alias ls='eza -h -s=type --git --icons --group-directories-first'
|
||||
}
|
||||
|
||||
# Easier navigation: .., ..., ....
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
|
||||
# cd to git root directory
|
||||
alias cdgr='cd "$(git root)"'
|
||||
|
||||
# Shortcuts for listing
|
||||
alias ll="ls -la"
|
||||
alias l="ls -a"
|
||||
|
||||
# Prevent common typos
|
||||
alias cd..="cd .."
|
||||
alias sl="ls"
|
||||
|
||||
# List only directories
|
||||
alias lsd="ls -lF | grep '^d'"
|
||||
|
||||
# IP addresses
|
||||
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||
alias localip="ipconfig getifaddr en1"
|
||||
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
|
||||
|
||||
# Show/hide hidden files in Finder
|
||||
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder"
|
||||
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false; killall Finder"
|
||||
|
||||
# Pipe public key to clipboard.
|
||||
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
|
||||
|
||||
# Flush Directory Service cache
|
||||
alias flush="dscacheutil -flushcache"
|
||||
|
||||
# Update locatedb
|
||||
alias updatedb="sudo /usr/libexec/locate.updatedb"
|
||||
|
||||
# Always return full history
|
||||
alias history="history 1"
|
||||
|
||||
# tmux: automatically attach or create session with name 'main'
|
||||
alias tmux='tmux new-session -A -s main'
|
||||
# tmux: attach or create new session
|
||||
alias ta='tmux attach || tmux'
|
||||
|
||||
# watch with: differences, precise, beep and color
|
||||
alias watchx='watch -dpbc'
|
||||
# delete .DS_Store files
|
||||
alias zapds='find . -name ".DS_Store" -print -delete'
|
||||
# Recursively delete `.pyc` files
|
||||
alias zappyc="find . -type f -name '*.pyc' -ls -delete"
|
||||
# Run all zaps
|
||||
alias zapall="zapds && zappyc"
|
||||
# tail with follow flag on
|
||||
alias t='tail -f'
|
||||
# directory usage, return only the total
|
||||
@@ -76,10 +137,78 @@ alias code_scanner='docker run
|
||||
|
||||
alias zedit='$EDITOR ~/.dotfiles'
|
||||
|
||||
have irssi \
|
||||
&& alias irssi="irssi --config='$IRSSI_CONFIG_FILE' --home='$IRSSI_CONFIG_HOME'"
|
||||
alias irssi="irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_CONFIG_HOME/irssi"
|
||||
|
||||
if [[ -f "$HOME/.aliases.local" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "$HOME/.aliases.local"
|
||||
fi
|
||||
|
||||
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
||||
alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion"
|
||||
|
||||
# Alacritty preexec hook to update dynamic title
|
||||
preexec()
|
||||
{
|
||||
print -Pn "\e]0;$1%~\a"
|
||||
}
|
||||
|
||||
# Update dotfiles
|
||||
dfu()
|
||||
{
|
||||
(
|
||||
cd "$DOTFILES" && git pull --ff-only && ./install -q
|
||||
)
|
||||
}
|
||||
|
||||
# Weather in Tampere, or other city
|
||||
weather()
|
||||
{
|
||||
# https://github.com/chubin/wttr.in#usage
|
||||
local city="${1:-Tampere}"
|
||||
curl "http://wttr.in/${city// /+}?2nFQM&lang=fi"
|
||||
}
|
||||
|
||||
# Docker
|
||||
ssh-docker()
|
||||
{
|
||||
docker exec -it "$@" bash
|
||||
}
|
||||
|
||||
# All the dig info
|
||||
digga()
|
||||
{
|
||||
dig +nocmd "$1" any +multiline +noall +answer
|
||||
}
|
||||
|
||||
# Rector project to php version 8.2 by default.
|
||||
rector()
|
||||
{
|
||||
local php="${1:-82}"
|
||||
docker run -v "$(pwd)":/project rector/rector:latest process \
|
||||
"/project/$1" \
|
||||
--set "php${php}" \
|
||||
--autoload-file /project/vendor/autoload.php
|
||||
}
|
||||
|
||||
# Commit everything
|
||||
commit()
|
||||
{
|
||||
commitMessage="$*"
|
||||
|
||||
if [ "$commitMessage" = "" ]; then
|
||||
commitMessage="Automated commit"
|
||||
fi
|
||||
|
||||
git add .
|
||||
eval "git commit -a -m '${commitMessage}'"
|
||||
}
|
||||
|
||||
scheduler()
|
||||
{
|
||||
while :; do
|
||||
php artisan schedule:run
|
||||
echo "Sleeping 60 seconds..."
|
||||
sleep 60
|
||||
done
|
||||
}
|
||||
|
||||
320
config/amethyst/amethyst.yml
Normal file
320
config/amethyst/amethyst.yml
Normal file
@@ -0,0 +1,320 @@
|
||||
# Default settings for amethyst
|
||||
# Repo: `https://github.com/ianyh/Amethyst`
|
||||
#
|
||||
# Note due to issue 1419 (https://github.com/ianyh/Amethyst/issues/1419) some
|
||||
# config values may conflict and not work if they are the same as the default
|
||||
# values for amathyst. You can see these values on github at
|
||||
# https://github.com/ianyh/Amethyst/blob/development/Amethyst/default.amethyst
|
||||
# If you're experiencing conflicts and the settings are the same as the default,
|
||||
# comment out the commands in this file.
|
||||
#
|
||||
# Move this file to: `~/.amethyst.yml`
|
||||
# In order to register changes restart Amethyst.
|
||||
# If you experience issues pulling in the changes you can also quit Amethyst and run: `defaults delete com.amethyst.Amethyst.plist`
|
||||
# This removes the current preferences and causes Amethyst to restart with default preferences and pull configs from this file.
|
||||
|
||||
# layouts - Ordered list of layouts to use by layout key (default tall, wide, fullscreen, and column).
|
||||
layouts:
|
||||
- bsp
|
||||
- tall
|
||||
# - fullscreen
|
||||
# - tall-right
|
||||
# - wide
|
||||
# - two-pane
|
||||
# - middle-wide
|
||||
- 3column-left
|
||||
# - 3column-middle
|
||||
# - 3column-right
|
||||
# - 4column-left
|
||||
# - 4column-right
|
||||
# - column
|
||||
# - row
|
||||
# - floating
|
||||
- widescreen-tall
|
||||
# - widescreen-tall-right
|
||||
# - bsp
|
||||
|
||||
# First mod (default option + shift).
|
||||
mod1:
|
||||
- option
|
||||
- shift
|
||||
# - control
|
||||
# - command
|
||||
|
||||
# Second mod (default option + shift + control).
|
||||
mod2:
|
||||
- option
|
||||
- shift
|
||||
- control
|
||||
# - command
|
||||
|
||||
# Commands:
|
||||
# special key values
|
||||
# space
|
||||
# enter
|
||||
# up
|
||||
# right
|
||||
# down
|
||||
# left
|
||||
|
||||
# special characters require quotes
|
||||
# '.'
|
||||
# ','
|
||||
|
||||
# Move to the next layout in the list.
|
||||
cycle-layout:
|
||||
mod: mod1
|
||||
key: space
|
||||
|
||||
# Move to the previous layout in the list.
|
||||
cycle-layout-backward:
|
||||
mod: mod2
|
||||
key: space
|
||||
|
||||
# Shrink the main pane by a percentage of the screen dimension as defined by window-resize-step. Note that not all layouts respond to this command.
|
||||
shrink-main:
|
||||
mod: mod1
|
||||
key: h
|
||||
|
||||
# Expand the main pane by a percentage of the screen dimension as defined by window-resize-step. Note that not all layouts respond to this command.
|
||||
expand-main:
|
||||
mod: mod1
|
||||
key: l
|
||||
|
||||
# Increase the number of windows in the main pane. Note that not all layouts respond to this command.
|
||||
increase-main:
|
||||
mod: mod1
|
||||
key: ','
|
||||
|
||||
# Decrease the number of windows in the main pane. Note that not all layouts respond to this command.
|
||||
decrease-main:
|
||||
mod: mod1
|
||||
key: '.'
|
||||
|
||||
# General purpose command for custom layouts. Functionality is layout-dependent.
|
||||
# command1:
|
||||
# mod: <NONE>
|
||||
# key: <NONE>
|
||||
# General purpose command for custom layouts. Functionality is layout-dependent.
|
||||
# command2:
|
||||
# mod: <NONE>
|
||||
# key: <NONE>
|
||||
# General purpose command for custom layouts. Functionality is layout-dependent.
|
||||
# command3:
|
||||
# mod: <NONE>
|
||||
# key: <NONE>
|
||||
# General purpose command for custom layouts. Functionality is layout-dependent.
|
||||
# command4:
|
||||
# mod: <NONE>
|
||||
# key: <NONE>
|
||||
|
||||
# Focus the next window in the list going counter-clockwise.
|
||||
focus-ccw:
|
||||
mod: mod1
|
||||
key: j
|
||||
|
||||
# Focus the next window in the list going clockwise.
|
||||
focus-cw:
|
||||
mod: mod1
|
||||
key: k
|
||||
|
||||
# Focus the main window in the list.
|
||||
focus-main:
|
||||
mod: mod1
|
||||
key: m
|
||||
|
||||
# Focus the next screen in the list going counter-clockwise.
|
||||
focus-screen-ccw:
|
||||
mod: mod1
|
||||
key: p
|
||||
|
||||
# Focus the next screen in the list going clockwise.
|
||||
focus-screen-cw:
|
||||
mod: mod1
|
||||
key: n
|
||||
|
||||
# Move the currently focused window onto the next screen in the list going counter-clockwise.
|
||||
swap-screen-ccw:
|
||||
mod: mod2
|
||||
key: h
|
||||
|
||||
# Move the currently focused window onto the next screen in the list going clockwise.
|
||||
swap-screen-cw:
|
||||
mod: mod2
|
||||
key: l
|
||||
|
||||
# Swap the position of the currently focused window with the next window in the list going counter-clockwise.
|
||||
swap-ccw:
|
||||
mod: mod2
|
||||
key: j
|
||||
|
||||
# Swap the position of the currently focused window with the next window in the list going clockwise.
|
||||
swap-cw:
|
||||
mod: mod2
|
||||
key: k
|
||||
|
||||
# Swap the position of the currently focused window with the main window in the list.
|
||||
swap-main:
|
||||
mod: mod1
|
||||
key: enter
|
||||
|
||||
# Move focus to the n-th screen in the list; e.g., focus-screen-3 will move mouse focus to the 3rd screen. Note that the main window in the given screen will be focused.
|
||||
#focus-screen-n:
|
||||
# focus-screen-<screen-number>:
|
||||
# mod: mod1
|
||||
# key: y
|
||||
# Move the currently focused window to the n-th screen; e.g., throw-screen-3 will move the window to the 3rd screen.
|
||||
# throw-screen-n:
|
||||
# throw-screen-<screen-number>:
|
||||
# mod: mod1
|
||||
# key: u
|
||||
# Move the currently focused window to the n-th space; e.g., throw-space-3 will move the window to the 3rd space.
|
||||
# throw-space-<screen-number>:
|
||||
# mod: mod1
|
||||
# key: i
|
||||
|
||||
# Select tall layout
|
||||
#select-tall-layout:
|
||||
# mod: mod1
|
||||
# key: a
|
||||
|
||||
# Select wide layout
|
||||
#select-wide-layout:
|
||||
# mod: mod1
|
||||
# key: s
|
||||
|
||||
# Select fullscreen layout
|
||||
select-fullscreen-layout:
|
||||
mod: mod1
|
||||
key: d
|
||||
|
||||
# Select column layout
|
||||
select-column-layout:
|
||||
mod: mod1
|
||||
key: f
|
||||
|
||||
# Move the currently focused window to the space to the left.
|
||||
throw-space-left:
|
||||
mod: mod2
|
||||
key: left
|
||||
|
||||
# Move currently the focused window to the space to the right.
|
||||
throw-space-right:
|
||||
mod: mod2
|
||||
key: right
|
||||
|
||||
# Toggle the floating state of the currently focused window; i.e., if it was floating make it tiled and if it was tiled make it floating.
|
||||
toggle-float:
|
||||
mod: mod1
|
||||
key: t
|
||||
|
||||
# Display the layout HUD with the current layout on each screen.
|
||||
display-current-layout:
|
||||
mod: mod1
|
||||
key: i
|
||||
|
||||
# Turn on or off tiling entirely.
|
||||
toggle-tiling:
|
||||
mod: mod1
|
||||
key: t
|
||||
|
||||
# Rerun the current layout's algorithm.
|
||||
reevaluate-windows:
|
||||
mod: mod1
|
||||
key: z
|
||||
|
||||
# Turn on or off focus-follows-mouse.
|
||||
toggle-focus-follows-mouse:
|
||||
mod: mod2
|
||||
key: x
|
||||
|
||||
# Automatically quit and reopen Amethyst.
|
||||
relaunch-amethyst:
|
||||
mod: mod2
|
||||
key: z
|
||||
|
||||
# disable screen padding on builtin display
|
||||
disable-padding-on-builtin-display: false
|
||||
|
||||
# Boolean flag for whether or not to add margins betwen windows (default false).
|
||||
window-margins: false
|
||||
|
||||
# Boolean flag for whether or not to set window margins if there is only one window on the screen, assuming window margins are enabled (default false).
|
||||
smart-window-margins: true
|
||||
|
||||
# # Add 10px margin between windows
|
||||
# window-margins: true
|
||||
# window-margin-size: 5
|
||||
# The size of the margins between windows (in px, default 0).
|
||||
window-margin-size: 0
|
||||
|
||||
# The max number of windows that may be visible on a screen at one time before
|
||||
# additional windows are minimized. A value of 0 disables the feature.
|
||||
window-max-count: 0
|
||||
|
||||
# The smallest height that a window can be sized to regardless of its layout frame (in px, default 0).
|
||||
window-minimum-height: 0
|
||||
|
||||
# The smallest width that a window can be sized to regardless of its layout frame (in px, default 0)
|
||||
window-minimum-width: 0
|
||||
|
||||
# List of bundle identifiers for applications to either be automatically floating or automatically tiled based on floating-is-blacklist (default []).
|
||||
floating: []
|
||||
|
||||
# Boolean flag determining behavior of the floating list.
|
||||
# true if the applications should be floating and all others tiled. false if the applications should be tiled and all others floating (default true).
|
||||
floating-is-blacklist: false
|
||||
|
||||
# true if screen frames should exclude the status bar. false if the screen frames should include the status bar (default false).
|
||||
ignore-menu-bar: false
|
||||
|
||||
# true if windows smaller than a 500px square should be floating by default (default true)
|
||||
float-small-windows: true
|
||||
|
||||
# true if the mouse should move position to the center of a window when it becomes focused (default false). Note that this is largely incompatible with focus-follows-mouse.
|
||||
mouse-follows-focus: false
|
||||
|
||||
# true if the windows underneath the mouse should become focused as the mouse moves (default false). Note that this is largely incompatible with mouse-follows-focus
|
||||
focus-follows-mouse: false
|
||||
|
||||
# true if dragging and dropping windows on to each other should swap their positions (default false).
|
||||
mouse-swaps-windows: true
|
||||
|
||||
# true if changing the frame of a window with the mouse should update the layout to accommodate the change (default false). Note that not all layouts will be able to respond to the change.
|
||||
mouse-resizes-windows: true
|
||||
|
||||
# true to display the name of the layout when a new layout is selected (default true).
|
||||
enables-layout-hud: true
|
||||
|
||||
# true to display the name of the layout when moving to a new space (default true).
|
||||
enables-layout-hud-on-space-change: true
|
||||
|
||||
# true to get updates to beta versions of the software (default false).
|
||||
use-canary-build: false
|
||||
|
||||
# true to insert new windows into the first position and false to insert new windows into the last position (default false).
|
||||
new-windows-to-main: false
|
||||
|
||||
# true to automatically move to a space when throwing a window to it (default true).
|
||||
follow-space-thrown-windows: true
|
||||
|
||||
# The integer percentage of the screen dimension to increment and decrement main pane ratios by (default 5).
|
||||
window-resize-step: 5
|
||||
|
||||
# Padding to apply between windows and the left edge of the screen (in px, default 0).
|
||||
screen-padding-left: 0
|
||||
|
||||
# Padding to apply between windows and the right edge of the screen (in px, default 0).
|
||||
screen-padding-right: 0
|
||||
|
||||
# Padding to apply between windows and the top edge of the screen (in px, default 0).
|
||||
screen-padding-top: 0
|
||||
|
||||
# Padding to apply between windows and the bottom edge of the screen (in px, default 0).
|
||||
screen-padding-bottom: 0
|
||||
|
||||
# true to maintain layout state across application executions (default true).
|
||||
restore-layouts-on-launch: true
|
||||
|
||||
# true to display some optional debug information in the layout HUD (default false).
|
||||
debug-layout-info: true
|
||||
35
config/amethyst/layouts/almost-maximize.js
Normal file
35
config/amethyst/layouts/almost-maximize.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Almost Maximize
|
||||
* Almost maximizes the window to the screen, leaving a small margin.
|
||||
*
|
||||
* @author Ville Viklund <https://github.com/ville6000>
|
||||
*
|
||||
* @param {Object} windows - All windows in the current space.
|
||||
* @param {Object} screenFrame - The frame of the current screen.
|
||||
* @param {Object} state - The state of the current space.
|
||||
* @param {Object} extendedFrames - The frames of the windows in the current space.
|
||||
* @return {Object} - The frames for the windows in the current space.
|
||||
*/
|
||||
function layout() {
|
||||
return {
|
||||
name: 'Almost Maximize',
|
||||
getFrameAssignments: (windows, screenFrame, state, extendedFrames) => {
|
||||
const width = screenFrame.width * 0.95
|
||||
const height = screenFrame.height * 0.95
|
||||
const x = (screenFrame.width - width) / 2
|
||||
const y = (screenFrame.height - height) / 2
|
||||
const windowFrames = {}
|
||||
|
||||
windows.forEach(window => {
|
||||
windowFrames[window.id] = {
|
||||
Y: screenFrame.y + y,
|
||||
x: screenFrame.x + x,
|
||||
width,
|
||||
height,
|
||||
}
|
||||
})
|
||||
|
||||
return windowFrames
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -1,3 +0,0 @@
|
||||
return { -- a table of overrides/changes to the duskfox theme
|
||||
Normal = { bg = "#000000" },
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
return { -- this table overrides highlights in all themes
|
||||
-- Normal = { bg = "#000000" },
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
return {
|
||||
-- Configure AstroNvim updates
|
||||
updater = {
|
||||
remote = "origin", -- remote to use
|
||||
channel = "stable", -- "stable" or "nightly"
|
||||
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
|
||||
branch = "nightly", -- branch name (NIGHTLY ONLY)
|
||||
commit = nil, -- commit hash (NIGHTLY ONLY)
|
||||
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
|
||||
skip_prompts = false, -- skip prompts about breaking changes
|
||||
show_changelog = true, -- show the changelog after performing an update
|
||||
auto_quit = true, -- automatically quit the current session after a successful update
|
||||
remotes = { -- easily add new remotes to track
|
||||
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
|
||||
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
|
||||
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
|
||||
},
|
||||
},
|
||||
-- Set colorscheme to use
|
||||
colorscheme = "catppuccin", -- or astrondark
|
||||
-- Diagnostics configuration (for vim.diagnostics.config({...}))
|
||||
-- when diagnostics are on
|
||||
diagnostics = {
|
||||
virtual_text = false,
|
||||
underline = true,
|
||||
},
|
||||
lsp = {
|
||||
-- customize lsp formatting options
|
||||
formatting = {
|
||||
-- control auto formatting on save
|
||||
format_on_save = {
|
||||
-- enable or disable format on save globally
|
||||
enabled = true,
|
||||
-- enable format on save for specified filetypes only
|
||||
allow_filetypes = {
|
||||
-- "go",
|
||||
},
|
||||
-- disable format on save for specified filetypes
|
||||
ignore_filetypes = {
|
||||
-- "python",
|
||||
},
|
||||
},
|
||||
-- disable formatting capabilities for the listed language servers
|
||||
disabled = {
|
||||
-- "sumneko_lua",
|
||||
},
|
||||
-- default format timeout
|
||||
timeout_ms = 1000,
|
||||
-- -- fully override the default formatting function
|
||||
-- filter = function(client) -- fully override the default formatting function
|
||||
-- return true
|
||||
-- end
|
||||
},
|
||||
-- enable servers that you already have installed without mason
|
||||
servers = {
|
||||
-- "pyright"
|
||||
},
|
||||
},
|
||||
-- Configure require("lazy").setup() options
|
||||
lazy = {
|
||||
defaults = { lazy = true },
|
||||
performance = {
|
||||
rtp = {
|
||||
-- customize default disabled vim plugins
|
||||
disabled_plugins = {
|
||||
"tohtml",
|
||||
"gzip",
|
||||
"matchit",
|
||||
"zipPlugin",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"matchparen",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- This function is run last and is a good place to configuring
|
||||
-- augroups/autocommands and custom filetypes also this just pure lua so
|
||||
-- anything that doesn't fit in the normal config locations above can go here
|
||||
polish = function()
|
||||
-- Set up custom filetypes
|
||||
-- vim.filetype.add {
|
||||
-- extension = {
|
||||
-- foo = "fooscript",
|
||||
-- },
|
||||
-- filename = {
|
||||
-- ["Foofile"] = "fooscript",
|
||||
-- },
|
||||
-- pattern = {
|
||||
-- ["~/%.config/foo/.*"] = "fooscript",
|
||||
-- },
|
||||
-- }
|
||||
end,
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
-- Mapping data with "desc" stored directly by vim.keymap.set().
|
||||
--
|
||||
-- Please use this mappings table to set keyboard mapping since this is the
|
||||
-- lower level configuration and more robust one. (which-key will
|
||||
-- automatically pick-up stored data by this setting.)
|
||||
return {
|
||||
-- first key is the mode
|
||||
n = {
|
||||
-- second key is the lefthand side of the map
|
||||
-- mappings seen under group name "Buffer"
|
||||
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
|
||||
["<leader>bD"] = {
|
||||
function()
|
||||
require("astronvim.utils.status").heirline.buffer_picker(
|
||||
function(bufnr) require("astronvim.utils.buffer").close(bufnr) end
|
||||
)
|
||||
end,
|
||||
desc = "Pick to close",
|
||||
},
|
||||
-- tables with the `name` key will be registered with which-key if it's installed
|
||||
-- this is useful for naming menus
|
||||
["<leader>b"] = { name = "Buffers" },
|
||||
-- quick save
|
||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||
},
|
||||
t = {
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<esc>"] = false,
|
||||
},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
-- set vim options here (vim.<first_key>.<second_key> = value)
|
||||
return {
|
||||
opt = {
|
||||
-- set to true or false etc.
|
||||
relativenumber = true, -- sets vim.opt.relativenumber
|
||||
number = true, -- sets vim.opt.number
|
||||
spell = false, -- sets vim.opt.spell
|
||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||
wrap = true, -- sets vim.opt.wrap
|
||||
},
|
||||
g = {
|
||||
-- sets vim.g.mapleader
|
||||
mapleader = " ",
|
||||
-- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
|
||||
autoformat_enabled = true,
|
||||
-- enable completion at start
|
||||
cmp_enabled = true,
|
||||
-- enable autopairs at start
|
||||
autopairs_enabled = true,
|
||||
-- set the visibility of diagnostics in the UI
|
||||
-- (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
|
||||
diagnostics_mode = 3,
|
||||
-- disable icons in the UI (disable if no nerd font is available,
|
||||
-- requires :PackerSync after changing)
|
||||
icons_enabled = true,
|
||||
-- disable notifications when toggling UI elements
|
||||
ui_notifications_enabled = true,
|
||||
},
|
||||
}
|
||||
-- If you need more control, you can use the function()...end notation
|
||||
-- return function(local_vim)
|
||||
-- local_vim.opt.relativenumber = true
|
||||
-- local_vim.g.mapleader = " "
|
||||
-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
|
||||
-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
|
||||
--
|
||||
-- return local_vim
|
||||
-- end
|
||||
@@ -1,51 +0,0 @@
|
||||
return {
|
||||
-- Add the community repository of plugin specifications
|
||||
"AstroNvim/astrocommunity",
|
||||
-- example of imporing a plugin, comment out to use it or add your own.
|
||||
-- available plugins can be found at
|
||||
-- https://github.com/AstroNvim/astrocommunity
|
||||
{
|
||||
import = "astrocommunity.colorscheme.catppuccin",
|
||||
opts = {
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
dim_inactive = {
|
||||
enabled = true,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
}
|
||||
},
|
||||
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
|
||||
{
|
||||
"m4xshen/smartcolumn.nvim",
|
||||
opts = {
|
||||
colorcolumn = { "80", "100", "120" },
|
||||
disabled_filetypes = { "help", "text", "markdown", "json" },
|
||||
},
|
||||
},
|
||||
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
opts = {
|
||||
auto_open = true,
|
||||
position = "right"
|
||||
}
|
||||
},
|
||||
{ import = "astrocommunity.editing-support.refactoring-nvim" },
|
||||
{ import = "astrocommunity.editing-support.neogen" },
|
||||
{ import = "astrocommunity.editing-support.nvim-regexplainer" },
|
||||
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
|
||||
{ import = "astrocommunity.indent.mini-indentscope" },
|
||||
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
|
||||
{ import = "astrocommunity.motion.harpoon" },
|
||||
{ import = "astrocommunity.pack.php" },
|
||||
{ import = "astrocommunity.project.neoconf-nvim" },
|
||||
{ import = "astrocommunity.project.nvim-spectre" },
|
||||
{ import = "astrocommunity.project.project-nvim" },
|
||||
{ import = "astrocommunity.test.neotest" },
|
||||
{ import = "astrocommunity.utility.neodim" },
|
||||
{ import = "astrocommunity.utility.transparent-nvim" },
|
||||
}
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
return {
|
||||
-- customize alpha options
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
opts = function(_, opts)
|
||||
-- customize the dashboard header
|
||||
opts.section.header.val = {
|
||||
" ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ",
|
||||
" ▄▀░░░░░░░░░░░░▄░░░░░░░▀▄ ",
|
||||
" █░░▄░░░░▄░░░░░░░░░░░░░░█ ",
|
||||
" █░░░░░░░░░░░░▄█▄▄░░▄░░░█ ▄▄▄ ",
|
||||
"▄▄▄▄▄ █░░░░░░▀░░░░▀█░░▀▄░░░░░█▀▀░██ ",
|
||||
"██▄▀██▄█░░░▄░░░░░░░██░░░░▀▀▀▀▀░░░░██ ",
|
||||
" ▀██▄▀██░░░░░░░░▀░██▀░░░░░░░░░░░░░▀██",
|
||||
" ▀████░▀░░░░▄░░░██░░░▄█░░░░▄░▄█░░██",
|
||||
" ▀█░░░░▄░░░░░██░░░░▄░░░▄░░▄░░░██",
|
||||
" ▄█▄░░░░░░░░░░░▀▄░░▀▀▀▀▀▀▀▀░░▄▀ ",
|
||||
" █▀▀█████████▀▀▀▀████████████▀ ",
|
||||
" ████▀ ███▀ ▀███ ▀██▀ ",
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
-- You can disable default plugins as follows:
|
||||
-- { "max397574/better-escape.nvim", enabled = false },
|
||||
--
|
||||
-- You can also easily customize additional setup of plugins
|
||||
-- that is outside of the plugin's setup call
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function(plugin, opts)
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "plugins.configs.luasnip" (plugin, opts)
|
||||
-- add more custom luasnip configuration such
|
||||
-- as filetype extend or custom snippets
|
||||
local luasnip = require "luasnip"
|
||||
luasnip.filetype_extend("javascript", { "javascriptreact" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = function(_, opts)
|
||||
require "plugins.neo-tree"
|
||||
opts.filesystem.filtered_items = {
|
||||
visible = false,
|
||||
show_hidden_count = true,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
hide_by_name = {
|
||||
'.idea',
|
||||
'.DS_Store'
|
||||
},
|
||||
never_show = {
|
||||
'.git',
|
||||
'.idea',
|
||||
'.mypy_cache',
|
||||
'.DS_Store',
|
||||
'thumbs.db'
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "windwp/nvim-autopairs",
|
||||
-- config = function(plugin, opts)
|
||||
-- -- include the default astronvim config that calls the setup call
|
||||
-- require "plugins.configs.nvim-autopairs"(plugin, opts)
|
||||
-- -- add more custom autopairs configuration such as custom rules
|
||||
-- local npairs = require "nvim-autopairs"
|
||||
-- local Rule = require "nvim-autopairs.rule"
|
||||
-- local cond = require "nvim-autopairs.conds"
|
||||
-- npairs.add_rules(
|
||||
-- {
|
||||
-- Rule("$", "$", { "tex", "latex" })
|
||||
-- -- don't add a pair if the next character is %
|
||||
-- :with_pair(cond.not_after_regex "%%")
|
||||
-- -- don't add a pair if the previous character is xxx
|
||||
-- :with_pair(
|
||||
-- cond.not_before_regex("xxx", 3)
|
||||
-- )
|
||||
-- -- don't move right when repeat character
|
||||
-- :with_move(cond.none())
|
||||
-- -- don't delete if the next character is xx
|
||||
-- :with_del(cond.not_after_regex "xx")
|
||||
-- -- disable adding a newline when you press <cr>
|
||||
-- :with_cr(cond.none()),
|
||||
-- },
|
||||
-- -- disable for .vim files, but it work for another filetypes
|
||||
-- Rule("a", "a", "-vim")
|
||||
-- )
|
||||
-- end,
|
||||
-- },
|
||||
-- By adding to the which-key config and using our helper
|
||||
-- function you can add more which-key registered bindings
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function(plugin, opts)
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "plugins.configs.which-key" (plugin, opts)
|
||||
-- Add bindings which show up as group name
|
||||
local wk = require "which-key"
|
||||
wk.register(
|
||||
{
|
||||
b = { name = "Buffer" },
|
||||
},
|
||||
{ mode = "n", prefix = "<leader>" }
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
-- customize mason plugins
|
||||
return {
|
||||
-- use mason-lspconfig to configure LSP installations
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- overrides `require("mason-lspconfig").setup(...)`
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"diagnosticls",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- use mason-null-ls to configure Formatters/Linter
|
||||
-- installation for null-ls sources
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
-- overrides `require("mason-null-ls").setup(...)`
|
||||
opts = {
|
||||
automatic_setup = true,
|
||||
automatic_installation = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
automatic_setup = true,
|
||||
ensure_installed = { "python", "php", "js", "bash" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
return {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
opts = function(_, config)
|
||||
-- config variable is the default configuration table for the setup function call
|
||||
local null_ls = require "null-ls"
|
||||
|
||||
-- Check supported formatters and linters
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
config.sources = {
|
||||
-- Set a formatter
|
||||
null_ls.builtins.code_actions.eslint,
|
||||
null_ls.builtins.code_actions.refactoring,
|
||||
null_ls.builtins.code_actions.shellcheck,
|
||||
null_ls.builtins.diagnostics.actionlint,
|
||||
null_ls.builtins.diagnostics.alex,
|
||||
null_ls.builtins.diagnostics.ansiblelint,
|
||||
null_ls.builtins.diagnostics.dotenv_linter,
|
||||
null_ls.builtins.diagnostics.editorconfig_checker,
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
null_ls.builtins.diagnostics.jsonlint,
|
||||
null_ls.builtins.diagnostics.luacheck,
|
||||
null_ls.builtins.diagnostics.php,
|
||||
null_ls.builtins.diagnostics.phpcs,
|
||||
null_ls.builtins.diagnostics.phpstan,
|
||||
null_ls.builtins.diagnostics.psalm,
|
||||
null_ls.builtins.diagnostics.semgrep,
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
null_ls.builtins.diagnostics.stylelint,
|
||||
null_ls.builtins.diagnostics.tfsec,
|
||||
null_ls.builtins.diagnostics.trail_space,
|
||||
null_ls.builtins.diagnostics.tsc,
|
||||
null_ls.builtins.diagnostics.vacuum,
|
||||
null_ls.builtins.diagnostics.vint,
|
||||
null_ls.builtins.diagnostics.vulture,
|
||||
null_ls.builtins.diagnostics.yamllint,
|
||||
null_ls.builtins.diagnostics.zsh,
|
||||
null_ls.builtins.formatting.blade_formatter,
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
null_ls.builtins.formatting.eslint,
|
||||
null_ls.builtins.formatting.fixjson,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.jq,
|
||||
null_ls.builtins.formatting.phpcsfixer,
|
||||
null_ls.builtins.formatting.shfmt.with {
|
||||
args = { "-i", "1", "-bn", "-ci", "-sr", "-kb", "-fn" },
|
||||
},
|
||||
null_ls.builtins.formatting.stylelint,
|
||||
}
|
||||
return config -- return final config table
|
||||
end,
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"gitignore",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"json5",
|
||||
"latex",
|
||||
"lua",
|
||||
"markdown",
|
||||
"php",
|
||||
"phpdoc",
|
||||
"python",
|
||||
"scss",
|
||||
"terraform",
|
||||
"todotxt",
|
||||
"toml",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
return {
|
||||
-- You can also add new plugins here as well:
|
||||
-- Add plugins, the lazy syntax
|
||||
"andweeb/presence.nvim",
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "BufRead",
|
||||
config = function() require("lsp_signature").setup() end,
|
||||
},
|
||||
{
|
||||
"wakatime/vim-wakatime",
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
},
|
||||
}
|
||||
@@ -1,24 +1,19 @@
|
||||
---
|
||||
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
|
||||
# editor: $EDITOR
|
||||
|
||||
# Should 'cheat' always colorize output?
|
||||
colorize: true
|
||||
|
||||
# Which 'chroma' colorscheme should be applied to the output?
|
||||
# Options are available here:
|
||||
# https://github.com/alecthomas/chroma/tree/master/styles
|
||||
style: "catppuccin"
|
||||
|
||||
style: 'catppuccin'
|
||||
# Which 'chroma' "formatter" should be applied?
|
||||
# One of: "terminal", "terminal256", "terminal16m"
|
||||
formatter: terminal256
|
||||
|
||||
# Through which pager should output be piped?
|
||||
# 'less -FRX' is recommended on Unix systems
|
||||
# 'more' is recommended on Windows
|
||||
pager: less -FRX
|
||||
|
||||
# Cheatpaths are paths at which cheatsheets are available on your local
|
||||
# filesystem.
|
||||
#
|
||||
@@ -63,23 +58,22 @@ cheatpaths:
|
||||
# 'readonly': shall user-created ('cheat -e') cheatsheets be saved here?
|
||||
- name: community
|
||||
path: ~/.config/cheat/cheatsheets/community
|
||||
tags: [ community ]
|
||||
tags: [community]
|
||||
readonly: true
|
||||
# If you have personalized cheatsheets, list them last. They will take
|
||||
# precedence over the more global cheatsheets.
|
||||
- name: personal
|
||||
path: ~/.dotfiles/config/cheat/cheatsheets/personal
|
||||
tags: [ personal ]
|
||||
tags: [personal]
|
||||
readonly: false
|
||||
- name: pure-bash-bible
|
||||
path: ~/.dotfiles/config/cheat/cheatsheets/pure-bash-bible
|
||||
tags: [ pure-bash-bible ]
|
||||
tags: [pure-bash-bible]
|
||||
readonly: true
|
||||
- name: tldr
|
||||
path: ~/.dotfiles/config/cheat/cheatsheets/tldr
|
||||
tags: [ tldr ]
|
||||
tags: [tldr]
|
||||
readonly: true
|
||||
|
||||
# While it requires no configuration here, it's also worth noting that
|
||||
# cheat will automatically append directories named '.cheat' within the
|
||||
# current working directory to the 'cheatpath'. This can be very useful if
|
||||
|
||||
@@ -1,43 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=zsh
|
||||
# shellcheck shell=bash
|
||||
# vim: filetype=zsh
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
path_append "$DOTFILES/local/bin"
|
||||
# if cargo directory exists, add it to path
|
||||
if [[ -d "$HOME/.local/share/cargo/bin" ]]; then
|
||||
export PATH="$HOME/.local/share/cargo/bin:$PATH"
|
||||
fi
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
# Cache commands using bkt if installed
|
||||
if command -v bkt >&/dev/null; then
|
||||
bkt()
|
||||
{
|
||||
command bkt --cache-dir="$XDG_CACHE_HOME/bkt" "$@"
|
||||
}
|
||||
else
|
||||
# If bkt isn't installed skip its arguments and just execute directly.
|
||||
# Optionally write a msg to stderr suggesting users install bkt.
|
||||
bkt()
|
||||
{
|
||||
while [[ "$1" == --* ]]; do shift; done
|
||||
"$@"
|
||||
}
|
||||
fi
|
||||
|
||||
# custom variables
|
||||
export XDG_BIN_HOME="$HOME/.local/bin"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||
# shorthand for checking if the system has the bin in path,
|
||||
# this version does not use caching
|
||||
# usage: have_command php && php -v
|
||||
function have_command
|
||||
{
|
||||
command -v "$1" >&/dev/null
|
||||
}
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
# shorthand for checking if the system has the bin in path,
|
||||
# this version uses caching
|
||||
# usage: have php && php -v
|
||||
function have
|
||||
{
|
||||
bkt -- which "$1" >&/dev/null
|
||||
}
|
||||
|
||||
path_append "/usr/local/bin"
|
||||
path_prepend "$HOMEBREW_SBIN"
|
||||
path_prepend "$HOMEBREW_BIN"
|
||||
path_prepend "$XDG_BIN_HOME"
|
||||
function brew_installed
|
||||
{
|
||||
bkt -- brew list
|
||||
}
|
||||
|
||||
# brew, https://brew.sh
|
||||
have brew && {
|
||||
path_append "$(brew --prefix python)/bin"
|
||||
path_append "$(brew --prefix coreutils)/libexec/gnubin"
|
||||
path_append "$(brew --prefix ruby)/bin"
|
||||
path_append "$(gem environment gemdir)/bin"
|
||||
# shorthand for checking if brew package is installed
|
||||
# usage: have_brew php && php -v
|
||||
function have_brew
|
||||
{
|
||||
! have brew && return 125
|
||||
|
||||
if bkt -- brew list "$1" &> /dev/null; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
source "$DOTFILES/config/exports-shell"
|
||||
source "$DOTFILES/config/exports-apps"
|
||||
|
||||
have nvim && export EDITOR="nvim"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# shellcheck enable=external-sources
|
||||
# shellcheck disable=1091
|
||||
# vim: filetype=zsh
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
# shellcheck disable=1091,2139
|
||||
# vim: filetype=bash
|
||||
|
||||
# Antigen configuration
|
||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||
@@ -13,122 +12,109 @@ export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
have ansible && {
|
||||
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
|
||||
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
|
||||
x-dc "$ANSIBLE_HOME"
|
||||
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
|
||||
}
|
||||
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
|
||||
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
|
||||
x-dc "$ANSIBLE_HOME"
|
||||
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
|
||||
|
||||
# brew configuration
|
||||
have brew && {
|
||||
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
||||
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
}
|
||||
# bob manages nvim versions
|
||||
x-path-prepend "$XDG_DATA_HOME/bob/nvim-bin"
|
||||
x-have nvim && export EDITOR="nvim"
|
||||
|
||||
export HOMEBREW_NO_ENV_HINTS=true
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
have composer && {
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
}
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
x-path-append "$COMPOSER_BIN"
|
||||
|
||||
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
||||
have docker && {
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
x-dc "$DOCKER_CONFIG"
|
||||
# Docker: Disable snyk ad
|
||||
export DOCKER_SCAN_SUGGEST=false
|
||||
}
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
x-dc "$DOCKER_CONFIG"
|
||||
# Docker: Disable snyk ad
|
||||
export DOCKER_SCAN_SUGGEST=false
|
||||
|
||||
# ffmpeg
|
||||
have ffmpeg && {
|
||||
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
|
||||
x-dc "$FFMPEG_DATADIR"
|
||||
}
|
||||
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
|
||||
x-have ffmpeg && x-dc "$FFMPEG_DATADIR"
|
||||
|
||||
# gcloud
|
||||
have gcloud && {
|
||||
GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
[[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||
[[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
}
|
||||
# GnuPG
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
|
||||
# gem, rubygems
|
||||
have gem && {
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
export PATH="$GEM_HOME/bin:$PATH"
|
||||
path_append "$GEM_PATH/bin"
|
||||
}
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
have go && {
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
x-dc "$GOPATH"
|
||||
}
|
||||
|
||||
# irssi
|
||||
have irssi && {
|
||||
# These variables are used in ./alias with --config and --home
|
||||
export IRSSI_CONFIG_HOME="$XDG_CONFIG_HOME/irssi"
|
||||
export IRSSI_CONFIG_FILE="$IRSSI_CONFIG_HOME/config"
|
||||
x-dc "$IRSSI_CONFIG_HOME"
|
||||
}
|
||||
# Go
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
|
||||
# nb, https://xwmx.github.io/nb/
|
||||
have nb && {
|
||||
export NB_DIR="$XDG_STATE_HOME/nb"
|
||||
x-dc "$NB_DIR"
|
||||
}
|
||||
export NBRC_PATH="$XDG_CONFIG_HOME/nbrc"
|
||||
export NB_DIR="$XDG_STATE_HOME/nb"
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# Add npm packages to path
|
||||
have node && {
|
||||
# NPM: Add npm packages to path
|
||||
x-have node && {
|
||||
NVM_NODE_BIN_DIR="$(dirname "$(which node)")"
|
||||
path_append "$NVM_NODE_BIN_DIR"
|
||||
x-path-append "$NVM_NODE_BIN_DIR"
|
||||
}
|
||||
|
||||
# op (1Password cli) is present
|
||||
have op && {
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
x-dc "$OP_CACHE"
|
||||
eval "$(op completion zsh)"
|
||||
compdef _op op
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
x-have op && {
|
||||
[ "$DOTFILES_CURRENT_SHELL" = "zsh" ] && {
|
||||
eval "$(op completion zsh)"
|
||||
compdef _op op
|
||||
}
|
||||
}
|
||||
|
||||
# Python
|
||||
#
|
||||
# pyenv, python environments
|
||||
have pyenv && {
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
x-dc "$PYENV_ROOT"
|
||||
path_append "$PYENV_ROOT/bin"
|
||||
|
||||
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
x-have pyenv && {
|
||||
x-path-append "$PYENV_ROOT/shims"
|
||||
eval "$(pyenv init -)"
|
||||
}
|
||||
|
||||
# Ruby
|
||||
#
|
||||
# including: bundler, rbenv
|
||||
export GEM_HOME="${XDG_DATA_HOME}"/gem
|
||||
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}"/gem
|
||||
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
|
||||
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
|
||||
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
|
||||
export RBENV_ROOT="$XDG_STATE_HOME/rbenv"
|
||||
x-dc "$RBENV_ROOT"
|
||||
x-have gem && x-path-append "${GEM_HOME}/bin"
|
||||
x-have rbenv && {
|
||||
[ "$DOTFILES_CURRENT_SHELL" = "zsh" ] && eval "$(rbenv init - zsh)"
|
||||
[ "$DOTFILES_CURRENT_SHELL" = "bash" ] && eval "$(rbenv init - bash)"
|
||||
}
|
||||
|
||||
# Rust / cargo
|
||||
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||
x-path-append "$CARGO_HOME/bin"
|
||||
|
||||
# screen
|
||||
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
||||
|
||||
# sonarlint
|
||||
export SONARLINT_USER_HOME="$XDG_DATA_HOME/sonarlint"
|
||||
|
||||
# tldr / tealdeer
|
||||
export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer/"
|
||||
|
||||
# tmux
|
||||
export TMUX_CONF="$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
x-dc "$WAKATIME_HOME"
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
|
||||
|
||||
# Misc
|
||||
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
||||
export TMUX_CONF="$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
export BAT_THEME="ansi"
|
||||
export CHEAT_USE_FZF=true
|
||||
export SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history
|
||||
|
||||
20
config/exports-lakka
Normal file
20
config/exports-lakka
Normal file
@@ -0,0 +1,20 @@
|
||||
# lakka exports
|
||||
|
||||
## LUA
|
||||
have luarocks && $(luarocks path --bin)
|
||||
|
||||
path_prepend "$HOME/.local/go/bin"
|
||||
|
||||
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
||||
alias nano='nano -wS -$'
|
||||
alias gpg=gpg2
|
||||
|
||||
ACME_PATH="$HOME/.acme.sh"
|
||||
# shellcheck source=$HOME/.acme.sh/acme.sh.env
|
||||
[[ -s "$ACME_PATH/acme.sh.env" ]] && . "$ACME_PATH/acme.sh.env"
|
||||
|
||||
export RVM_PATH="$HOME/.rvm"
|
||||
export PATH="$RVM_PATH/bin:$PATH"
|
||||
# shellcheck source=$HOME/.rvm/scripts/rvm
|
||||
[[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function*
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=1091,2046
|
||||
# vim: filetype=zsh
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
# vim: filetype=bash
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
# custom variables
|
||||
export XDG_BIN_HOME="$HOME/.local/bin"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||
|
||||
export LC_ALL=fi_FI.UTF-8
|
||||
|
||||
@@ -22,9 +34,16 @@ export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
|
||||
# And include the parameter for ZSH
|
||||
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
|
||||
|
||||
# Less history location
|
||||
export LESSHISTFILE="$XDG_STATE_HOME"/less/history
|
||||
|
||||
# Highlight section titles in manual pages
|
||||
export LESS_TERMCAP_md="$ORANGE"
|
||||
|
||||
# zsh autoloaded terminfo
|
||||
export TERMINFO="$XDG_DATA_HOME"/terminfo
|
||||
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
|
||||
|
||||
# Don’t clear the screen after quitting a manual page
|
||||
export MANPAGER="less -X"
|
||||
|
||||
@@ -35,29 +54,3 @@ export GREP_OPTIONS="--color=auto"
|
||||
# update the values of LINES and COLUMNS.
|
||||
hash shopt 2> /dev/null && shopt -s checkwinsize
|
||||
|
||||
# Load iterm2 shell integration
|
||||
# https://iterm2.com/documentation-shell-integration.html
|
||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \
|
||||
&& source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||
|
||||
# Set dircolors based on the file, if it exists
|
||||
have dircolors && eval $(dircolors "$XDG_CONFIG_HOME/dircolors")
|
||||
|
||||
# If we are using zsh, color our dir lists and such
|
||||
if [ "$SHELL" = "$(which zsh)" ]; then
|
||||
x-dc "$XDG_CACHE_HOME/zsh"
|
||||
x-dc "$XDG_STATE_HOME/zsh"
|
||||
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
|
||||
zstyle ':completion:*' list-colors "$LS_COLORS"
|
||||
|
||||
# fzf
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||
fi
|
||||
|
||||
# If we are using bash
|
||||
if [ "$SHELL" = "$(which bash)" ]; then
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] \
|
||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
|
||||
fi
|
||||
|
||||
104
config/functions
104
config/functions
@@ -1,107 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# shell functions
|
||||
#
|
||||
# shellcheck source="../scripts/shared.sh"
|
||||
source "$DOTFILES/scripts/shared.sh"
|
||||
|
||||
# Weather in Tampere, or other city
|
||||
weather()
|
||||
{
|
||||
# https://github.com/chubin/wttr.in#usage
|
||||
local city="${1:-Tampere}"
|
||||
curl "http://wttr.in/${city// /+}?2nFQM&lang=fi"
|
||||
}
|
||||
|
||||
# Docker
|
||||
ssh-docker()
|
||||
{
|
||||
docker exec -it "$@" bash
|
||||
}
|
||||
|
||||
# Create a new directory and enter it
|
||||
mkd()
|
||||
{
|
||||
mkdir -p "$@" && cd "$@" || exit
|
||||
}
|
||||
|
||||
# All the dig info
|
||||
digga()
|
||||
{
|
||||
dig +nocmd "$1" any +multiline +noall +answer
|
||||
}
|
||||
|
||||
# Rector project to php version 8.0 by default.
|
||||
rector()
|
||||
{
|
||||
local php="${1:-80}"
|
||||
docker run -v "$(pwd)":/project rector/rector:latest process \
|
||||
"/project/$1" \
|
||||
--set "php${php}" \
|
||||
--autoload-file /project/vendor/autoload.php
|
||||
}
|
||||
|
||||
# Commit everything
|
||||
commit()
|
||||
{
|
||||
commitMessage="$*"
|
||||
|
||||
if [ "$commitMessage" = "" ]; then
|
||||
commitMessage="Automated commit"
|
||||
fi
|
||||
|
||||
git add .
|
||||
eval "git commit -a -m '${commitMessage}'"
|
||||
}
|
||||
|
||||
scheduler()
|
||||
{
|
||||
while :; do
|
||||
php artisan schedule:run
|
||||
echo "Sleeping 60 seconds..."
|
||||
sleep 60
|
||||
done
|
||||
}
|
||||
|
||||
silent()
|
||||
{
|
||||
"$@" >&/dev/null
|
||||
}
|
||||
|
||||
ask()
|
||||
{
|
||||
while true; do
|
||||
read -p "$1 ([y]/n) " -r
|
||||
REPLY=${REPLY:-"y"}
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
return 1
|
||||
elif [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Defines default antigen bundles
|
||||
x-default-antigen-bundles()
|
||||
{
|
||||
# these should be always available
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle command-not-found
|
||||
antigen bundle ssh-agent
|
||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
|
||||
# these should be available if there's need
|
||||
have brew && antigen bundle brew
|
||||
have docker && antigen bundle docker
|
||||
have docker-compose && antigen bundle sroze/docker-compose-zsh-plugin
|
||||
have jq && antigen bundle reegnz/jq-zsh-plugin
|
||||
have nvm && antigen bundle nvm
|
||||
have nvm && antigen bundle $DOTFILES/config/zsh/plugins/nvm-auto-use
|
||||
have php && antigen bundle php
|
||||
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||
have rvm && antigen bundle unixorn/rvm-plugin
|
||||
}
|
||||
|
||||
382
config/fzf/completion.bash
Executable file
382
config/fzf/completion.bash
Executable file
@@ -0,0 +1,382 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ completion.bash
|
||||
#
|
||||
# - $FZF_TMUX (default: 0)
|
||||
# - $FZF_TMUX_OPTS (default: empty)
|
||||
# - $FZF_COMPLETION_TRIGGER (default: '**')
|
||||
# - $FZF_COMPLETION_OPTS (default: empty)
|
||||
|
||||
if [[ $- =~ i ]]; then
|
||||
|
||||
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
|
||||
if ! declare -f _fzf_compgen_path > /dev/null; then
|
||||
_fzf_compgen_path() {
|
||||
echo "$1"
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
if ! declare -f _fzf_compgen_dir > /dev/null; then
|
||||
_fzf_compgen_dir() {
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
###########################################################
|
||||
|
||||
# To redraw line after fzf closes (printf '\e[5n')
|
||||
bind '"\e[0n": redraw-current-line' 2> /dev/null
|
||||
|
||||
__fzf_comprun() {
|
||||
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
|
||||
_fzf_comprun "$@"
|
||||
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
|
||||
shift
|
||||
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
|
||||
else
|
||||
shift
|
||||
fzf "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
__fzf_orig_completion() {
|
||||
local l comp f cmd
|
||||
while read -r l; do
|
||||
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
|
||||
comp="${BASH_REMATCH[1]}"
|
||||
f="${BASH_REMATCH[2]}"
|
||||
cmd="${BASH_REMATCH[3]}"
|
||||
[[ "$f" = _fzf_* ]] && continue
|
||||
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
|
||||
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
|
||||
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_fzf_opts_completion() {
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="
|
||||
-x --extended
|
||||
-e --exact
|
||||
--algo
|
||||
-i +i
|
||||
-n --nth
|
||||
--with-nth
|
||||
-d --delimiter
|
||||
+s --no-sort
|
||||
--tac
|
||||
--tiebreak
|
||||
-m --multi
|
||||
--no-mouse
|
||||
--bind
|
||||
--cycle
|
||||
--no-hscroll
|
||||
--jump-labels
|
||||
--height
|
||||
--literal
|
||||
--reverse
|
||||
--margin
|
||||
--inline-info
|
||||
--prompt
|
||||
--pointer
|
||||
--marker
|
||||
--header
|
||||
--header-lines
|
||||
--ansi
|
||||
--tabstop
|
||||
--color
|
||||
--no-bold
|
||||
--history
|
||||
--history-size
|
||||
--preview
|
||||
--preview-window
|
||||
-q --query
|
||||
-1 --select-1
|
||||
-0 --exit-0
|
||||
-f --filter
|
||||
--print-query
|
||||
--expect
|
||||
--sync"
|
||||
|
||||
case "${prev}" in
|
||||
--tiebreak)
|
||||
COMPREPLY=( $(compgen -W "length begin end index" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
--color)
|
||||
COMPREPLY=( $(compgen -W "dark light 16 bw" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
--history)
|
||||
COMPREPLY=()
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" =~ ^-|\+ ]]; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
_fzf_handle_dynamic_completion() {
|
||||
local cmd orig_var orig ret orig_cmd orig_complete
|
||||
cmd="$1"
|
||||
shift
|
||||
orig_cmd="$1"
|
||||
orig_var="_fzf_orig_completion_$cmd"
|
||||
orig="${!orig_var-}"
|
||||
orig="${orig##*#}"
|
||||
if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then
|
||||
$orig "$@"
|
||||
elif [[ -n "${_fzf_completion_loader-}" ]]; then
|
||||
orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)
|
||||
_completion_loader "$@"
|
||||
ret=$?
|
||||
# _completion_loader may not have updated completion for the command
|
||||
if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
|
||||
__fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
|
||||
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
|
||||
eval "${orig_complete/ -F / -o nospace -F }"
|
||||
else
|
||||
eval "$orig_complete"
|
||||
fi
|
||||
fi
|
||||
return $ret
|
||||
fi
|
||||
}
|
||||
|
||||
__fzf_generic_path_completion() {
|
||||
local cur base dir leftover matches trigger cmd
|
||||
cmd="${COMP_WORDS[0]}"
|
||||
if [[ $cmd == \\* ]]; then
|
||||
cmd="${cmd:1}"
|
||||
fi
|
||||
cmd="${cmd//[^A-Za-z0-9_=]/_}"
|
||||
COMPREPLY=()
|
||||
trigger=${FZF_COMPLETION_TRIGGER-'**'}
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [[ "$cur" == *"$trigger" ]]; then
|
||||
base=${cur:0:${#cur}-${#trigger}}
|
||||
eval "base=$base"
|
||||
|
||||
dir=
|
||||
[[ $base = *"/"* ]] && dir="$base"
|
||||
while true; do
|
||||
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
|
||||
leftover=${base/#"$dir"}
|
||||
leftover=${leftover/#\/}
|
||||
[[ -z "$dir" ]] && dir='.'
|
||||
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
|
||||
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
|
||||
printf "%q " "${item%$3}$3"
|
||||
done)
|
||||
matches=${matches% }
|
||||
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
|
||||
if [[ -n "$matches" ]]; then
|
||||
COMPREPLY=( "$matches" )
|
||||
else
|
||||
COMPREPLY=( "$cur" )
|
||||
fi
|
||||
printf '\e[5n'
|
||||
return 0
|
||||
fi
|
||||
dir=$(dirname "$dir")
|
||||
[[ "$dir" =~ /$ ]] || dir="$dir"/
|
||||
done
|
||||
else
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
_fzf_handle_dynamic_completion "$cmd" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
_fzf_complete() {
|
||||
# Split arguments around --
|
||||
local args rest str_arg i sep
|
||||
args=("$@")
|
||||
sep=
|
||||
for i in "${!args[@]}"; do
|
||||
if [[ "${args[$i]}" = -- ]]; then
|
||||
sep=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -n "$sep" ]]; then
|
||||
str_arg=
|
||||
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
|
||||
args=("${args[@]:0:$sep}")
|
||||
else
|
||||
str_arg=$1
|
||||
args=()
|
||||
shift
|
||||
rest=("$@")
|
||||
fi
|
||||
|
||||
local cur selected trigger cmd post
|
||||
post="$(caller 0 | awk '{print $2}')_post"
|
||||
type -t "$post" > /dev/null 2>&1 || post=cat
|
||||
|
||||
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
|
||||
trigger=${FZF_COMPLETION_TRIGGER-'**'}
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [[ "$cur" == *"$trigger" ]]; then
|
||||
cur=${cur:0:${#cur}-${#trigger}}
|
||||
|
||||
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
|
||||
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
|
||||
if [[ -n "$selected" ]]; then
|
||||
COMPREPLY=("$selected")
|
||||
else
|
||||
COMPREPLY=("$cur")
|
||||
fi
|
||||
printf '\e[5n'
|
||||
return 0
|
||||
else
|
||||
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
_fzf_path_completion() {
|
||||
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
|
||||
}
|
||||
|
||||
# Deprecated. No file only completion.
|
||||
_fzf_file_completion() {
|
||||
_fzf_path_completion "$@"
|
||||
}
|
||||
|
||||
_fzf_dir_completion() {
|
||||
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
|
||||
}
|
||||
|
||||
_fzf_complete_kill() {
|
||||
_fzf_proc_completion "$@"
|
||||
}
|
||||
|
||||
_fzf_proc_completion() {
|
||||
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
|
||||
command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||
|
||||
command ps -eo user,pid,ppid,time,args # For BusyBox
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_proc_completion_post() {
|
||||
awk '{print $2}'
|
||||
}
|
||||
|
||||
_fzf_host_completion() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
|
||||
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
|
||||
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
|
||||
awk '{if (length($2) > 0) {print $2}}' | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_var_completion() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_alias_completion() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
alias | sed -En 's|^alias ([^=]+).*|\1|p'
|
||||
)
|
||||
}
|
||||
|
||||
# fzf options
|
||||
complete -o default -F _fzf_opts_completion fzf
|
||||
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
|
||||
# itself. As a quick improvement we take fzf's completion. Adding the few extra
|
||||
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
|
||||
complete -o default -F _fzf_opts_completion fzf-tmux
|
||||
|
||||
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
|
||||
a_cmds="
|
||||
awk bat cat diff diff3
|
||||
emacs emacsclient ex file ftp g++ gcc gvim head hg hx java
|
||||
javac ld less more mvim nvim patch perl python ruby
|
||||
sed sftp sort source tail tee uniq vi view vim wc xdg-open
|
||||
basename bunzip2 bzip2 chmod chown curl cp dirname du
|
||||
find git grep gunzip gzip hg jar
|
||||
ln ls mv open rm rsync scp
|
||||
svn tar unzip zip"
|
||||
|
||||
# Preserve existing completion
|
||||
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null)
|
||||
|
||||
if type _completion_loader > /dev/null 2>&1; then
|
||||
_fzf_completion_loader=1
|
||||
fi
|
||||
|
||||
__fzf_defc() {
|
||||
local cmd func opts orig_var orig def
|
||||
cmd="$1"
|
||||
func="$2"
|
||||
opts="$3"
|
||||
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
|
||||
orig="${!orig_var-}"
|
||||
if [[ -n "$orig" ]]; then
|
||||
printf -v def "$orig" "$func"
|
||||
eval "$def"
|
||||
else
|
||||
complete -F "$func" $opts "$cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
# Anything
|
||||
for cmd in $a_cmds; do
|
||||
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
|
||||
done
|
||||
|
||||
# Directory
|
||||
for cmd in $d_cmds; do
|
||||
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
|
||||
done
|
||||
|
||||
unset cmd d_cmds a_cmds
|
||||
|
||||
_fzf_setup_completion() {
|
||||
local kind fn cmd
|
||||
kind=$1
|
||||
fn=_fzf_${1}_completion
|
||||
if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then
|
||||
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
|
||||
return 1
|
||||
fi
|
||||
shift
|
||||
__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)
|
||||
for cmd in "$@"; do
|
||||
case "$kind" in
|
||||
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
|
||||
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
|
||||
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
|
||||
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Environment variables / Aliases / Hosts / Process
|
||||
_fzf_setup_completion 'var' export unset printenv
|
||||
_fzf_setup_completion 'alias' unalias
|
||||
_fzf_setup_completion 'host' ssh telnet
|
||||
_fzf_setup_completion 'proc' kill
|
||||
|
||||
fi
|
||||
325
config/fzf/completion.zsh
Executable file
325
config/fzf/completion.zsh
Executable file
@@ -0,0 +1,325 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ completion.zsh
|
||||
#
|
||||
# - $FZF_TMUX (default: 0)
|
||||
# - $FZF_TMUX_OPTS (default: '-d 40%')
|
||||
# - $FZF_COMPLETION_TRIGGER (default: '**')
|
||||
# - $FZF_COMPLETION_OPTS (default: empty)
|
||||
|
||||
# Both branches of the following `if` do the same thing -- define
|
||||
# __fzf_completion_options such that `eval $__fzf_completion_options` sets
|
||||
# all options to the same values they currently have. We'll do just that at
|
||||
# the bottom of the file after changing options to what we prefer.
|
||||
#
|
||||
# IMPORTANT: Until we get to the `emulate` line, all words that *can* be quoted
|
||||
# *must* be quoted in order to prevent alias expansion. In addition, code must
|
||||
# be written in a way works with any set of zsh options. This is very tricky, so
|
||||
# careful when you change it.
|
||||
#
|
||||
# Start by loading the builtin zsh/parameter module. It provides `options`
|
||||
# associative array that stores current shell options.
|
||||
if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then
|
||||
# This is the fast branch and it gets taken on virtually all Zsh installations.
|
||||
#
|
||||
# ${(kv)options[@]} expands to array of keys (option names) and values ("on"
|
||||
# or "off"). The subsequent expansion# with (j: :) flag joins all elements
|
||||
# together separated by spaces. __fzf_completion_options ends up with a value
|
||||
# like this: "options=(shwordsplit off aliases on ...)".
|
||||
__fzf_completion_options="options=(${(j: :)${(kv)options[@]}})"
|
||||
else
|
||||
# This branch is much slower because it forks to get the names of all
|
||||
# zsh options. It's possible to eliminate this fork but it's not worth the
|
||||
# trouble because this branch gets taken only on very ancient or broken
|
||||
# zsh installations.
|
||||
() {
|
||||
# That `()` above defines an anonymous function. This is essentially a scope
|
||||
# for local parameters. We use it to avoid polluting global scope.
|
||||
'local' '__fzf_opt'
|
||||
__fzf_completion_options="setopt"
|
||||
# `set -o` prints one line for every zsh option. Each line contains option
|
||||
# name, some spaces, and then either "on" or "off". We just want option names.
|
||||
# Expansion with (@f) flag splits a string into lines. The outer expansion
|
||||
# removes spaces and everything that follow them on every line. __fzf_opt
|
||||
# ends up iterating over option names: shwordsplit, aliases, etc.
|
||||
for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do
|
||||
if [[ -o "$__fzf_opt" ]]; then
|
||||
# Option $__fzf_opt is currently on, so remember to set it back on.
|
||||
__fzf_completion_options+=" -o $__fzf_opt"
|
||||
else
|
||||
# Option $__fzf_opt is currently off, so remember to set it back off.
|
||||
__fzf_completion_options+=" +o $__fzf_opt"
|
||||
fi
|
||||
done
|
||||
# The value of __fzf_completion_options here looks like this:
|
||||
# "setopt +o shwordsplit -o aliases ..."
|
||||
}
|
||||
fi
|
||||
|
||||
# Enable the default zsh options (those marked with <Z> in `man zshoptions`)
|
||||
# but without `aliases`. Aliases in functions are expanded when functions are
|
||||
# defined, so if we disable aliases here, we'll be sure to have no pesky
|
||||
# aliases in any of our functions. This way we won't need prefix every
|
||||
# command with `command` or to quote every word to defend against global
|
||||
# aliases. Note that `aliases` is not the only option that's important to
|
||||
# control. There are several others that could wreck havoc if they are set
|
||||
# to values we don't expect. With the following `emulate` command we
|
||||
# sidestep this issue entirely.
|
||||
'emulate' 'zsh' '-o' 'no_aliases'
|
||||
|
||||
# This brace is the start of try-always block. The `always` part is like
|
||||
# `finally` in lesser languages. We use it to *always* restore user options.
|
||||
{
|
||||
|
||||
# Bail out if not interactive shell.
|
||||
[[ -o interactive ]] || return 0
|
||||
|
||||
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
|
||||
if ! declare -f _fzf_compgen_path > /dev/null; then
|
||||
_fzf_compgen_path() {
|
||||
echo "$1"
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
if ! declare -f _fzf_compgen_dir > /dev/null; then
|
||||
_fzf_compgen_dir() {
|
||||
command find -L "$1" \
|
||||
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
|
||||
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
|
||||
}
|
||||
fi
|
||||
|
||||
###########################################################
|
||||
|
||||
__fzf_comprun() {
|
||||
if [[ "$(type _fzf_comprun 2>&1)" =~ function ]]; then
|
||||
_fzf_comprun "$@"
|
||||
elif [ -n "${TMUX_PANE-}" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "${FZF_TMUX_OPTS-}" ]; }; then
|
||||
shift
|
||||
if [ -n "${FZF_TMUX_OPTS-}" ]; then
|
||||
fzf-tmux ${(Q)${(Z+n+)FZF_TMUX_OPTS}} -- "$@"
|
||||
else
|
||||
fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%} -- "$@"
|
||||
fi
|
||||
else
|
||||
shift
|
||||
fzf "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Extract the name of the command. e.g. foo=1 bar baz**<tab>
|
||||
__fzf_extract_command() {
|
||||
local token tokens
|
||||
tokens=(${(z)1})
|
||||
for token in $tokens; do
|
||||
token=${(Q)token}
|
||||
if [[ "$token" =~ [[:alnum:]] && ! "$token" =~ "=" ]]; then
|
||||
echo "$token"
|
||||
return
|
||||
fi
|
||||
done
|
||||
echo "${tokens[1]}"
|
||||
}
|
||||
|
||||
__fzf_generic_path_completion() {
|
||||
local base lbuf cmd compgen fzf_opts suffix tail dir leftover matches
|
||||
base=$1
|
||||
lbuf=$2
|
||||
cmd=$(__fzf_extract_command "$lbuf")
|
||||
compgen=$3
|
||||
fzf_opts=$4
|
||||
suffix=$5
|
||||
tail=$6
|
||||
|
||||
setopt localoptions nonomatch
|
||||
eval "base=$base"
|
||||
[[ $base = *"/"* ]] && dir="$base"
|
||||
while [ 1 ]; do
|
||||
if [[ -z "$dir" || -d ${dir} ]]; then
|
||||
leftover=${base/#"$dir"}
|
||||
leftover=${leftover/#\/}
|
||||
[ -z "$dir" ] && dir='.'
|
||||
[ "$dir" != "/" ] && dir="${dir/%\//}"
|
||||
matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-}" __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" | while read item; do
|
||||
item="${item%$suffix}$suffix"
|
||||
echo -n "${(q)item} "
|
||||
done)
|
||||
matches=${matches% }
|
||||
if [ -n "$matches" ]; then
|
||||
LBUFFER="$lbuf$matches$tail"
|
||||
fi
|
||||
zle reset-prompt
|
||||
break
|
||||
fi
|
||||
dir=$(dirname "$dir")
|
||||
dir=${dir%/}/
|
||||
done
|
||||
}
|
||||
|
||||
_fzf_path_completion() {
|
||||
__fzf_generic_path_completion "$1" "$2" _fzf_compgen_path \
|
||||
"-m" "" " "
|
||||
}
|
||||
|
||||
_fzf_dir_completion() {
|
||||
__fzf_generic_path_completion "$1" "$2" _fzf_compgen_dir \
|
||||
"" "/" ""
|
||||
}
|
||||
|
||||
_fzf_feed_fifo() (
|
||||
command rm -f "$1"
|
||||
mkfifo "$1"
|
||||
cat <&0 > "$1" &
|
||||
)
|
||||
|
||||
_fzf_complete() {
|
||||
setopt localoptions ksh_arrays
|
||||
# Split arguments around --
|
||||
local args rest str_arg i sep
|
||||
args=("$@")
|
||||
sep=
|
||||
for i in {0..${#args[@]}}; do
|
||||
if [[ "${args[$i]-}" = -- ]]; then
|
||||
sep=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -n "$sep" ]]; then
|
||||
str_arg=
|
||||
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
|
||||
args=("${args[@]:0:$sep}")
|
||||
else
|
||||
str_arg=$1
|
||||
args=()
|
||||
shift
|
||||
rest=("$@")
|
||||
fi
|
||||
|
||||
local fifo lbuf cmd matches post
|
||||
fifo="${TMPDIR:-/tmp}/fzf-complete-fifo-$$"
|
||||
lbuf=${rest[0]}
|
||||
cmd=$(__fzf_extract_command "$lbuf")
|
||||
post="${funcstack[1]}_post"
|
||||
type $post > /dev/null 2>&1 || post=cat
|
||||
|
||||
_fzf_feed_fifo "$fifo"
|
||||
matches=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "$cmd" "${args[@]}" -q "${(Q)prefix}" < "$fifo" | $post | tr '\n' ' ')
|
||||
if [ -n "$matches" ]; then
|
||||
LBUFFER="$lbuf$matches"
|
||||
fi
|
||||
command rm -f "$fifo"
|
||||
}
|
||||
|
||||
_fzf_complete_telnet() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0' |
|
||||
awk '{if (length($2) > 0) {print $2}}' | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_ssh() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
setopt localoptions nonomatch
|
||||
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
|
||||
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
|
||||
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
|
||||
awk '{if (length($2) > 0) {print $2}}' | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_export() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
declare -xp | sed 's/=.*//' | sed 's/.* //'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_unset() {
|
||||
_fzf_complete -m -- "$@" < <(
|
||||
declare -xp | sed 's/=.*//' | sed 's/.* //'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_unalias() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
alias | sed 's/=.*//'
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_kill() {
|
||||
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
|
||||
command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||
|
||||
command ps -eo user,pid,ppid,time,args # For BusyBox
|
||||
)
|
||||
}
|
||||
|
||||
_fzf_complete_kill_post() {
|
||||
awk '{print $2}'
|
||||
}
|
||||
|
||||
fzf-completion() {
|
||||
local tokens cmd prefix trigger tail matches lbuf d_cmds
|
||||
setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
|
||||
|
||||
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
|
||||
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags
|
||||
tokens=(${(z)LBUFFER})
|
||||
if [ ${#tokens} -lt 1 ]; then
|
||||
zle ${fzf_default_completion:-expand-or-complete}
|
||||
return
|
||||
fi
|
||||
|
||||
cmd=$(__fzf_extract_command "$LBUFFER")
|
||||
|
||||
# Explicitly allow for empty trigger.
|
||||
trigger=${FZF_COMPLETION_TRIGGER-'**'}
|
||||
[ -z "$trigger" -a ${LBUFFER[-1]} = ' ' ] && tokens+=("")
|
||||
|
||||
# When the trigger starts with ';', it becomes a separate token
|
||||
if [[ ${LBUFFER} = *"${tokens[-2]-}${tokens[-1]}" ]]; then
|
||||
tokens[-2]="${tokens[-2]-}${tokens[-1]}"
|
||||
tokens=(${tokens[0,-2]})
|
||||
fi
|
||||
|
||||
lbuf=$LBUFFER
|
||||
tail=${LBUFFER:$(( ${#LBUFFER} - ${#trigger} ))}
|
||||
|
||||
# Trigger sequence given
|
||||
if [ ${#tokens} -gt 1 -a "$tail" = "$trigger" ]; then
|
||||
d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir})
|
||||
|
||||
[ -z "$trigger" ] && prefix=${tokens[-1]} || prefix=${tokens[-1]:0:-${#trigger}}
|
||||
[ -n "${tokens[-1]}" ] && lbuf=${lbuf:0:-${#tokens[-1]}}
|
||||
|
||||
if eval "type _fzf_complete_${cmd} > /dev/null"; then
|
||||
prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf}
|
||||
zle reset-prompt
|
||||
elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then
|
||||
_fzf_dir_completion "$prefix" "$lbuf"
|
||||
else
|
||||
_fzf_path_completion "$prefix" "$lbuf"
|
||||
fi
|
||||
# Fall back to default completion
|
||||
else
|
||||
zle ${fzf_default_completion:-expand-or-complete}
|
||||
fi
|
||||
}
|
||||
|
||||
[ -z "$fzf_default_completion" ] && {
|
||||
binding=$(bindkey '^I')
|
||||
[[ $binding =~ 'undefined-key' ]] || fzf_default_completion=$binding[(s: :w)2]
|
||||
unset binding
|
||||
}
|
||||
|
||||
zle -N fzf-completion
|
||||
bindkey '^I' fzf-completion
|
||||
|
||||
} always {
|
||||
# Restore the original options.
|
||||
eval $__fzf_completion_options
|
||||
'unset' '__fzf_completion_options'
|
||||
}
|
||||
9
config/fzf/fzf.bash
Normal file → Executable file
9
config/fzf/fzf.bash
Normal file → Executable file
@@ -1,13 +1,12 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.bash" 2> /dev/null
|
||||
# shellcheck source=completion.bash
|
||||
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.bash"
|
||||
# shellcheck source=key-bindings.bash
|
||||
source "$HOME/.dotfiles/config/fzf/key-bindings.bash"
|
||||
|
||||
9
config/fzf/fzf.zsh
Normal file → Executable file
9
config/fzf/fzf.zsh
Normal file → Executable file
@@ -1,13 +1,12 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.zsh" 2> /dev/null
|
||||
# shellcheck source=completion.zsh
|
||||
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.zsh" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.zsh"
|
||||
# shellcheck source=key-bindings.zsh
|
||||
source "$HOME/.dotfiles/config/fzf/key-bindings.zsh"
|
||||
|
||||
103
config/fzf/key-bindings.bash
Executable file
103
config/fzf/key-bindings.bash
Executable file
@@ -0,0 +1,103 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.bash
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
__fzf_select__() {
|
||||
local cmd opts
|
||||
cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type f -print \
|
||||
-o -type d -print \
|
||||
-o -type l -print 2> /dev/null | cut -b3-"}"
|
||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
|
||||
eval "$cmd" |
|
||||
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
|
||||
while read -r item; do
|
||||
printf '%q ' "$item" # escape special chars
|
||||
done
|
||||
}
|
||||
|
||||
if [[ $- =~ i ]]; then
|
||||
|
||||
__fzfcmd() {
|
||||
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
|
||||
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
|
||||
}
|
||||
|
||||
fzf-file-widget() {
|
||||
local selected="$(__fzf_select__ "$@")"
|
||||
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
|
||||
READLINE_POINT=$(( READLINE_POINT + ${#selected} ))
|
||||
}
|
||||
|
||||
__fzf_cd__() {
|
||||
local cmd opts dir
|
||||
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | cut -b3-"}"
|
||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
|
||||
dir=$(set +o pipefail; eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)) && printf 'builtin cd -- %q' "$dir"
|
||||
}
|
||||
|
||||
__fzf_history__() {
|
||||
local output opts script
|
||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
|
||||
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
|
||||
output=$(
|
||||
set +o pipefail
|
||||
builtin fc -lnr -2147483648 |
|
||||
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
|
||||
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
|
||||
) || return
|
||||
READLINE_LINE=${output#*$'\t'}
|
||||
if [[ -z "$READLINE_POINT" ]]; then
|
||||
echo "$READLINE_LINE"
|
||||
else
|
||||
READLINE_POINT=0x7fffffff
|
||||
fi
|
||||
}
|
||||
|
||||
# Required to refresh the prompt after fzf
|
||||
bind -m emacs-standard '"\er": redraw-current-line'
|
||||
|
||||
bind -m vi-command '"\C-z": emacs-editing-mode'
|
||||
bind -m vi-insert '"\C-z": emacs-editing-mode'
|
||||
bind -m emacs-standard '"\C-z": vi-editing-mode'
|
||||
|
||||
if (( BASH_VERSINFO[0] < 4 )); then
|
||||
# CTRL-T - Paste the selected file path into the command line
|
||||
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
|
||||
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
|
||||
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
|
||||
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
|
||||
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
|
||||
else
|
||||
# CTRL-T - Paste the selected file path into the command line
|
||||
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
|
||||
bind -m vi-command -x '"\C-t": fzf-file-widget'
|
||||
bind -m vi-insert -x '"\C-t": fzf-file-widget'
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
bind -m emacs-standard -x '"\C-r": __fzf_history__'
|
||||
bind -m vi-command -x '"\C-r": __fzf_history__'
|
||||
bind -m vi-insert -x '"\C-r": __fzf_history__'
|
||||
fi
|
||||
|
||||
# ALT-C - cd into the selected directory
|
||||
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
|
||||
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
|
||||
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
|
||||
|
||||
fi
|
||||
172
config/fzf/key-bindings.fish
Executable file
172
config/fzf/key-bindings.fish
Executable file
@@ -0,0 +1,172 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.fish
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
function fzf_key_bindings
|
||||
|
||||
# Store current token in $dir as root for the 'find' command
|
||||
function fzf-file-widget -d "List files and folders"
|
||||
set -l commandline (__fzf_parse_commandline)
|
||||
set -l dir $commandline[1]
|
||||
set -l fzf_query $commandline[2]
|
||||
set -l prefix $commandline[3]
|
||||
|
||||
# "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not
|
||||
# $dir itself, even if hidden.
|
||||
test -n "$FZF_CTRL_T_COMMAND"; or set -l FZF_CTRL_T_COMMAND "
|
||||
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||
-o -type f -print \
|
||||
-o -type d -print \
|
||||
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
|
||||
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
begin
|
||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS"
|
||||
eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)' -m --query "'$fzf_query'"' | while read -l r; set result $result $r; end
|
||||
end
|
||||
if [ -z "$result" ]
|
||||
commandline -f repaint
|
||||
return
|
||||
else
|
||||
# Remove last token from commandline.
|
||||
commandline -t ""
|
||||
end
|
||||
for i in $result
|
||||
commandline -it -- $prefix
|
||||
commandline -it -- (string escape $i)
|
||||
commandline -it -- ' '
|
||||
end
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
function fzf-history-widget -d "Show command history"
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
begin
|
||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --scheme=history --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS +m"
|
||||
|
||||
set -l FISH_MAJOR (echo $version | cut -f1 -d.)
|
||||
set -l FISH_MINOR (echo $version | cut -f2 -d.)
|
||||
|
||||
# history's -z flag is needed for multi-line support.
|
||||
# history's -z flag was added in fish 2.4.0, so don't use it for versions
|
||||
# before 2.4.0.
|
||||
if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ];
|
||||
history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
|
||||
and commandline -- $result
|
||||
else
|
||||
history | eval (__fzfcmd) -q '(commandline)' | read -l result
|
||||
and commandline -- $result
|
||||
end
|
||||
end
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
function fzf-cd-widget -d "Change directory"
|
||||
set -l commandline (__fzf_parse_commandline)
|
||||
set -l dir $commandline[1]
|
||||
set -l fzf_query $commandline[2]
|
||||
set -l prefix $commandline[3]
|
||||
|
||||
test -n "$FZF_ALT_C_COMMAND"; or set -l FZF_ALT_C_COMMAND "
|
||||
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
begin
|
||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS"
|
||||
eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result
|
||||
|
||||
if [ -n "$result" ]
|
||||
cd -- $result
|
||||
|
||||
# Remove last token from commandline.
|
||||
commandline -t ""
|
||||
commandline -it -- $prefix
|
||||
end
|
||||
end
|
||||
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
function __fzfcmd
|
||||
test -n "$FZF_TMUX"; or set FZF_TMUX 0
|
||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||
if [ -n "$FZF_TMUX_OPTS" ]
|
||||
echo "fzf-tmux $FZF_TMUX_OPTS -- "
|
||||
else if [ $FZF_TMUX -eq 1 ]
|
||||
echo "fzf-tmux -d$FZF_TMUX_HEIGHT -- "
|
||||
else
|
||||
echo "fzf"
|
||||
end
|
||||
end
|
||||
|
||||
bind \ct fzf-file-widget
|
||||
bind \cr fzf-history-widget
|
||||
bind \ec fzf-cd-widget
|
||||
|
||||
if bind -M insert > /dev/null 2>&1
|
||||
bind -M insert \ct fzf-file-widget
|
||||
bind -M insert \cr fzf-history-widget
|
||||
bind -M insert \ec fzf-cd-widget
|
||||
end
|
||||
|
||||
function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath, fzf query, and optional -option= prefix'
|
||||
set -l commandline (commandline -t)
|
||||
|
||||
# strip -option= from token if present
|
||||
set -l prefix (string match -r -- '^-[^\s=]+=' $commandline)
|
||||
set commandline (string replace -- "$prefix" '' $commandline)
|
||||
|
||||
# eval is used to do shell expansion on paths
|
||||
eval set commandline $commandline
|
||||
|
||||
if [ -z $commandline ]
|
||||
# Default to current directory with no --query
|
||||
set dir '.'
|
||||
set fzf_query ''
|
||||
else
|
||||
set dir (__fzf_get_dir $commandline)
|
||||
|
||||
if [ "$dir" = "." -a (string sub -l 1 -- $commandline) != '.' ]
|
||||
# if $dir is "." but commandline is not a relative path, this means no file path found
|
||||
set fzf_query $commandline
|
||||
else
|
||||
# Also remove trailing slash after dir, to "split" input properly
|
||||
set fzf_query (string replace -r "^$dir/?" -- '' "$commandline")
|
||||
end
|
||||
end
|
||||
|
||||
echo $dir
|
||||
echo $fzf_query
|
||||
echo $prefix
|
||||
end
|
||||
|
||||
function __fzf_get_dir -d 'Find the longest existing filepath from input string'
|
||||
set dir $argv
|
||||
|
||||
# Strip all trailing slashes. Ignore if $dir is root dir (/)
|
||||
if [ (string length -- $dir) -gt 1 ]
|
||||
set dir (string replace -r '/*$' -- '' $dir)
|
||||
end
|
||||
|
||||
# Iteratively check if dir exists and strip tail end of path
|
||||
while [ ! -d "$dir" ]
|
||||
# If path is absolute, this can keep going until ends up at /
|
||||
# If path is relative, this can keep going until entire input is consumed, dirname returns "."
|
||||
set dir (dirname -- "$dir")
|
||||
end
|
||||
|
||||
echo $dir
|
||||
end
|
||||
|
||||
end
|
||||
120
config/fzf/key-bindings.zsh
Executable file
120
config/fzf/key-bindings.zsh
Executable file
@@ -0,0 +1,120 @@
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.zsh
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
|
||||
# The code at the top and the bottom of this file is the same as in completion.zsh.
|
||||
# Refer to that file for explanation.
|
||||
if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then
|
||||
__fzf_key_bindings_options="options=(${(j: :)${(kv)options[@]}})"
|
||||
else
|
||||
() {
|
||||
__fzf_key_bindings_options="setopt"
|
||||
'local' '__fzf_opt'
|
||||
for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do
|
||||
if [[ -o "$__fzf_opt" ]]; then
|
||||
__fzf_key_bindings_options+=" -o $__fzf_opt"
|
||||
else
|
||||
__fzf_key_bindings_options+=" +o $__fzf_opt"
|
||||
fi
|
||||
done
|
||||
}
|
||||
fi
|
||||
|
||||
'emulate' 'zsh' '-o' 'no_aliases'
|
||||
|
||||
{
|
||||
|
||||
[[ -o interactive ]] || return 0
|
||||
|
||||
# CTRL-T - Paste the selected file path(s) into the command line
|
||||
__fsel() {
|
||||
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type f -print \
|
||||
-o -type d -print \
|
||||
-o -type l -print 2> /dev/null | cut -b3-"}"
|
||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||
local item
|
||||
eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-}" $(__fzfcmd) -m "$@" | while read item; do
|
||||
echo -n "${(q)item} "
|
||||
done
|
||||
local ret=$?
|
||||
echo
|
||||
return $ret
|
||||
}
|
||||
|
||||
__fzfcmd() {
|
||||
[ -n "${TMUX_PANE-}" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "${FZF_TMUX_OPTS-}" ]; } &&
|
||||
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
|
||||
}
|
||||
|
||||
fzf-file-widget() {
|
||||
LBUFFER="${LBUFFER}$(__fsel)"
|
||||
local ret=$?
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-file-widget
|
||||
bindkey -M emacs '^T' fzf-file-widget
|
||||
bindkey -M vicmd '^T' fzf-file-widget
|
||||
bindkey -M viins '^T' fzf-file-widget
|
||||
|
||||
# ALT-C - cd into the selected directory
|
||||
fzf-cd-widget() {
|
||||
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | cut -b3-"}"
|
||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||
local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-}" $(__fzfcmd) +m)"
|
||||
if [[ -z "$dir" ]]; then
|
||||
zle redisplay
|
||||
return 0
|
||||
fi
|
||||
zle push-line # Clear buffer. Auto-restored on next prompt.
|
||||
BUFFER="builtin cd -- ${(q)dir}"
|
||||
zle accept-line
|
||||
local ret=$?
|
||||
unset dir # ensure this doesn't end up appearing in prompt expansion
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-cd-widget
|
||||
bindkey -M emacs '\ec' fzf-cd-widget
|
||||
bindkey -M vicmd '\ec' fzf-cd-widget
|
||||
bindkey -M viins '\ec' fzf-cd-widget
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
fzf-history-widget() {
|
||||
local selected num
|
||||
setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null
|
||||
selected=( $(fc -rl 1 | awk '{ cmd=$0; sub(/^[ \t]*[0-9]+\**[ \t]+/, "", cmd); if (!seen[cmd]++) print $0 }' |
|
||||
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort,ctrl-z:ignore ${FZF_CTRL_R_OPTS-} --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
|
||||
local ret=$?
|
||||
if [ -n "$selected" ]; then
|
||||
num=$selected[1]
|
||||
if [ -n "$num" ]; then
|
||||
zle vi-fetch-history -n $num
|
||||
fi
|
||||
fi
|
||||
zle reset-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-history-widget
|
||||
bindkey -M emacs '^R' fzf-history-widget
|
||||
bindkey -M vicmd '^R' fzf-history-widget
|
||||
bindkey -M viins '^R' fzf-history-widget
|
||||
|
||||
} always {
|
||||
eval $__fzf_key_bindings_options
|
||||
'unset' '__fzf_key_bindings_options'
|
||||
}
|
||||
19
config/gh-changelog/config.yaml
Normal file
19
config/gh-changelog/config.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
check_for_updates: true
|
||||
excluded_labels:
|
||||
- maintenance
|
||||
- dependencies
|
||||
file_name: CHANGELOG.md
|
||||
logger: spinner
|
||||
no_color: false
|
||||
sections:
|
||||
added:
|
||||
- feature
|
||||
- enhancement
|
||||
changed:
|
||||
- backwards-incompatible
|
||||
fixed:
|
||||
- bug
|
||||
- bugfix
|
||||
- documentation
|
||||
show_unreleased: true
|
||||
skip_entries_without_label: false
|
||||
54
config/gh-dash/config.yml
Normal file
54
config/gh-dash/config.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
prSections:
|
||||
- title: My Pull Requests
|
||||
filters: is:open author:@me
|
||||
- title: Needs My Review
|
||||
filters: is:open review-requested:@me
|
||||
- title: Involved
|
||||
filters: is:open involves:@me -author:@me
|
||||
issuesSections:
|
||||
- title: My Issues
|
||||
filters: is:open author:@me
|
||||
- title: Assigned
|
||||
filters: is:open assignee:@me
|
||||
- title: Involved
|
||||
filters: is:open involves:@me -author:@me
|
||||
defaults:
|
||||
preview:
|
||||
open: true
|
||||
width: 50
|
||||
prsLimit: 20
|
||||
issuesLimit: 20
|
||||
view: prs
|
||||
layout:
|
||||
prs:
|
||||
updatedAt:
|
||||
width: 7
|
||||
repo:
|
||||
width: 15
|
||||
author:
|
||||
width: 15
|
||||
assignees:
|
||||
width: 20
|
||||
hidden: true
|
||||
base:
|
||||
width: 15
|
||||
hidden: true
|
||||
lines:
|
||||
width: 16
|
||||
issues:
|
||||
updatedAt:
|
||||
width: 7
|
||||
repo:
|
||||
width: 15
|
||||
creator:
|
||||
width: 10
|
||||
assignees:
|
||||
width: 20
|
||||
hidden: true
|
||||
refetchIntervalMinutes: 30
|
||||
keybindings:
|
||||
issues: []
|
||||
prs: []
|
||||
repoPaths: {}
|
||||
pager:
|
||||
diff: ''
|
||||
3
config/gh/hosts.yml
Normal file
3
config/gh/hosts.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
github.com:
|
||||
user: ivuorinen
|
||||
git_protocol: https
|
||||
@@ -5,3 +5,9 @@
|
||||
name = Ismo Vuorinen
|
||||
email = ismo@ivuorinen.net
|
||||
|
||||
[github]
|
||||
user = ivuorinen
|
||||
|
||||
[include]
|
||||
path = ~/.config/git/overrides/config
|
||||
|
||||
|
||||
2
config/git/overrides/.gitignore
vendored
Normal file
2
config/git/overrides/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!.gitkeep
|
||||
config
|
||||
0
config/git/overrides/.gitkeep
Normal file
0
config/git/overrides/.gitkeep
Normal file
@@ -11,9 +11,6 @@
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[alias]
|
||||
branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
|
||||
branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'"
|
||||
|
||||
32
config/gpg-tui/gpg-tui.toml
Normal file
32
config/gpg-tui/gpg-tui.toml
Normal file
@@ -0,0 +1,32 @@
|
||||
[general]
|
||||
splash = false
|
||||
tick_rate = 250
|
||||
color = "gray"
|
||||
style = "plain"
|
||||
file_explorer = "xplr"
|
||||
detail_level = "minimum"
|
||||
# key_bindings = [
|
||||
# { keys = [ "?" ], command = ":help" },
|
||||
# { keys = [ "o" ], command = ":options" },
|
||||
# { keys = [ "n" ], command = ":normal" },
|
||||
# { keys = [ "v" ], command = ":visual" },
|
||||
# { keys = [ "c" ], command = ":copy" },
|
||||
# { keys = [ "p", "C-v" ], command = ":paste" },
|
||||
# { keys = [ "x" ], command = ":export" },
|
||||
# { keys = [ "s" ], command = ":set prompt :sign" },
|
||||
# { keys = [ "e" ], command = ":set prompt :edit" },
|
||||
# { keys = [ "i" ], command = ":set prompt :import"},
|
||||
# { keys = [ "f" ], command = ":set prompt :receive" },
|
||||
# { keys = [ "u" ], command = ":set prompt :send" },
|
||||
# { keys = [ "g" ], command = ":generate" },
|
||||
# { keys = [ "d", "backspace" ], command = ":delete" },
|
||||
# { keys = [ "C-r" ], command = ":refresh" },
|
||||
# ]
|
||||
|
||||
[gpg]
|
||||
armor = false
|
||||
# homedir = "~/.gnupg"
|
||||
# outdir = "~/.gnupg/out"
|
||||
# outfile = "{type}_{query}.{ext}"
|
||||
# default_key = "0xA1B2C3XY"
|
||||
|
||||
@@ -16,32 +16,70 @@ tap "teamookla/speedtest"
|
||||
tap "xwmx/taps"
|
||||
# Run your GitHub Actions locally
|
||||
brew "act"
|
||||
# Mozilla CA certificate store
|
||||
brew "ca-certificates"
|
||||
# YAML Parser
|
||||
brew "libyaml"
|
||||
# Cryptography and SSL/TLS Toolkit
|
||||
brew "openssl@3"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.11"
|
||||
# Automate deployment, configuration, and upgrading
|
||||
brew "ansible"
|
||||
# Checks ansible playbooks for practices and behaviour
|
||||
brew "ansible-lint"
|
||||
# Generic-purpose lossless compression algorithm by Google
|
||||
brew "brotli"
|
||||
# Library and utilities for processing GIFs
|
||||
brew "giflib"
|
||||
# Performance-portable, length-agnostic SIMD with runtime dispatch
|
||||
brew "highway"
|
||||
# Library of 2D and 3D vector, matrix, and math operations
|
||||
brew "imath"
|
||||
# JPEG image codec that aids compression and decompression
|
||||
brew "jpeg-turbo"
|
||||
# Zstandard is a real-time compression algorithm
|
||||
brew "zstd"
|
||||
# New file format for still image compression
|
||||
brew "jpeg-xl"
|
||||
# Codec library for encoding and decoding AV1 video streams
|
||||
brew "aom"
|
||||
# Apache Portable Runtime library
|
||||
brew "apr"
|
||||
# Companion library to apr, the Apache Portable Runtime library
|
||||
brew "apr-util"
|
||||
# Password hashing library and CLI utility
|
||||
brew "argon2"
|
||||
# Open Source Kubernetes Marketplace
|
||||
brew "arkade"
|
||||
# Automatic configure script builder
|
||||
brew "autoconf"
|
||||
# GNU multiple precision arithmetic library
|
||||
brew "gmp"
|
||||
# GNU File, Shell, and Text utilities
|
||||
brew "coreutils", link: false
|
||||
brew "coreutils"
|
||||
# Extendable version manager with support for Ruby, Node.js, Erlang & more
|
||||
brew "asdf"
|
||||
# Spell checker with better logic than ispell
|
||||
brew "aspell"
|
||||
# Official Amazon AWS command-line interface
|
||||
brew "awscli"
|
||||
# Bourne-Again SHell, a UNIX command interpreter
|
||||
brew "bash"
|
||||
# Clone of cat(1) with syntax highlighting and Git integration
|
||||
brew "bat"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# Yet another cross-platform graphical process/system monitor
|
||||
brew "bottom"
|
||||
# Switch Apache / Valet / CLI configs between PHP versions
|
||||
brew "brew-php-switcher"
|
||||
# Software library to render fonts
|
||||
brew "freetype"
|
||||
# XML-based font configuration API for X Windows
|
||||
brew "fontconfig"
|
||||
# GNU internationalization (i18n) and localization (l10n) library
|
||||
brew "gettext"
|
||||
# Core application library for C
|
||||
brew "glib"
|
||||
# Manage compile and link flags for libraries
|
||||
@@ -67,17 +105,15 @@ brew "dog"
|
||||
# Lightning-fast linter for .env files written in Rust
|
||||
brew "dotenv-linter"
|
||||
# Tool to verify that your files are in harmony with your .editorconfig
|
||||
brew "editorconfig-checker"
|
||||
brew "editorconfig-checker", link: false
|
||||
# Useful examples at the command-line
|
||||
brew "eg-examples"
|
||||
# C/C++ and Java libraries for Unicode and globalization
|
||||
brew "icu4c"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Development kit for the Java programming language
|
||||
brew "openjdk"
|
||||
# Spellchecker wrapping library
|
||||
brew "enchant"
|
||||
# Run arbitrary commands when files change
|
||||
brew "entr"
|
||||
# Perl lib for reading and writing EXIF metadata
|
||||
brew "exiftool"
|
||||
# Simple, fast and user-friendly alternative to find
|
||||
brew "fd"
|
||||
# Banner-like program prints strings as ASCII art
|
||||
@@ -91,11 +127,13 @@ brew "fzf"
|
||||
# Graphics library to dynamically manipulate images
|
||||
brew "gd"
|
||||
# Disk usage analyzer with console interface written in Go
|
||||
brew "gdu"
|
||||
brew "gdu", link: false
|
||||
# GitHub command-line tool
|
||||
brew "gh"
|
||||
# Distributed revision control system
|
||||
brew "git"
|
||||
# Enable transparent encryption/decryption of files in a git repo
|
||||
brew "git-crypt"
|
||||
# Small git utilities
|
||||
brew "git-extras"
|
||||
# See your latest local git branches, formatted real fancy
|
||||
@@ -114,8 +152,14 @@ brew "gnutls"
|
||||
brew "gnupg"
|
||||
# Open source programming language to build simple/reliable/efficient software
|
||||
brew "go"
|
||||
# Library access to GnuPG
|
||||
brew "gpgme"
|
||||
# Manage your GnuPG keys with ease!
|
||||
brew "gpg-tui"
|
||||
# Image manipulation
|
||||
brew "netpbm"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Framework for layout and rendering of i18n text
|
||||
brew "pango"
|
||||
# Library to render SVG files using Cairo
|
||||
@@ -138,8 +182,12 @@ brew "hugo"
|
||||
brew "libheif"
|
||||
# Tools and libraries to manipulate images in many formats
|
||||
brew "imagemagick"
|
||||
# Modular IRC client
|
||||
brew "irssi"
|
||||
# Lightweight and flexible command-line JSON processor
|
||||
brew "jq"
|
||||
# Network authentication protocol
|
||||
brew "krb5"
|
||||
# Lazier way to manage everything docker
|
||||
brew "lazydocker"
|
||||
# Postgres C API library
|
||||
@@ -150,10 +198,16 @@ brew "libvoikko"
|
||||
brew "lolcat"
|
||||
# Package manager for the Lua programming language
|
||||
brew "luarocks"
|
||||
# LZMA-based compression program similar to gzip or bzip2
|
||||
brew "lzip"
|
||||
# Swiss Army Knife for macOS
|
||||
brew "m-cli"
|
||||
# Mac App Store command-line interface
|
||||
brew "mas"
|
||||
# Mongrel of mail user agents (part elm, pine, mush, mh, etc.)
|
||||
brew "mutt"
|
||||
# NCurses Disk Usage
|
||||
brew "ncdu"
|
||||
# Ambitious Vim-fork focused on extensibility and agility
|
||||
brew "neovim"
|
||||
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
|
||||
@@ -162,6 +216,8 @@ brew "nginx"
|
||||
brew "nmap"
|
||||
# Manage multiple Node.js versions
|
||||
brew "nvm"
|
||||
# Development kit for the Java programming language
|
||||
brew "openjdk@11"
|
||||
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
|
||||
brew "openapi-generator"
|
||||
# Development kit for the Java programming language
|
||||
@@ -184,22 +240,28 @@ brew "pyenv-virtualenv"
|
||||
brew "python@3.10"
|
||||
# Interpreted, interactive, object-oriented programming language
|
||||
brew "python@3.8"
|
||||
# Ruby version manager
|
||||
brew "rbenv"
|
||||
# RC file (dotfile) management
|
||||
brew "rcm"
|
||||
# Search tool like grep and The Silver Searcher
|
||||
brew "ripgrep"
|
||||
# Powerful, clean, object-oriented scripting language
|
||||
brew "ruby"
|
||||
# Safe, concurrent, practical language
|
||||
brew "rust"
|
||||
# Static analysis and lint tool, for (ba)sh scripts
|
||||
brew "shellcheck"
|
||||
# Autoformat shell script source code
|
||||
brew "shfmt"
|
||||
# Cross-shell prompt for astronauts
|
||||
brew "starship"
|
||||
# Support CI generation of SBOMs via golang tooling
|
||||
brew "spdx-sbom-generator"
|
||||
# Version control system designed to be a better CVS
|
||||
brew "subversion"
|
||||
# Feature-rich console based todo list manager
|
||||
brew "task"
|
||||
# Terminal user interface for taskwarrior
|
||||
brew "taskwarrior-tui"
|
||||
# Very fast implementation of tldr in Rust
|
||||
brew "tealdeer"
|
||||
# Send macOS User Notifications from the command-line
|
||||
brew "terminal-notifier"
|
||||
# Thin wrapper for Terraform e.g. for locking state
|
||||
@@ -212,8 +274,6 @@ brew "tfenv"
|
||||
brew "tfsec"
|
||||
# Programmatically correct mistyped console commands
|
||||
brew "thefuck"
|
||||
# Simplified and community-driven man pages
|
||||
brew "tldr"
|
||||
# Terminal multiplexer
|
||||
brew "tmux"
|
||||
# Display directories as trees (with optional color/HTML output)
|
||||
@@ -228,12 +288,16 @@ brew "virtualenv"
|
||||
brew "wakatime-cli"
|
||||
# Executes a program periodically, showing output fullscreen
|
||||
brew "watch"
|
||||
# Watch files and take action when they change
|
||||
brew "watchman"
|
||||
# Internet file retriever
|
||||
brew "wget"
|
||||
# Personal information dashboard for your terminal
|
||||
brew "wtfutil"
|
||||
# Check your $HOME for unwanted files and directories
|
||||
brew "xdg-ninja"
|
||||
brew "xdg-ninja", args: ["HEAD"]
|
||||
# Hackable, minimal, fast TUI file explorer
|
||||
brew "xplr"
|
||||
# JavaScript package manager
|
||||
brew "yarn"
|
||||
# A vulnerability scanner for container images and filesystems
|
||||
@@ -262,8 +326,12 @@ brew "shivammathur/php/php@7.4"
|
||||
brew "shivammathur/php/php@8.0"
|
||||
# Ookla Speedtest
|
||||
brew "teamookla/speedtest/speedtest"
|
||||
# Command-line helper for the 1Password password manager
|
||||
# Command-line interface for 1Password
|
||||
cask "1password-cli"
|
||||
# GPU-accelerated terminal emulator
|
||||
cask "alacritty"
|
||||
# Automatic tiling window manager similar to xmonad
|
||||
cask "amethyst"
|
||||
# Turn audio CDs and files into audiobooks
|
||||
cask "audiobook-builder"
|
||||
# Text editor
|
||||
@@ -274,8 +342,8 @@ cask "dbeaver-community"
|
||||
cask "dbngin"
|
||||
# App to build and share containerized applications and microservices
|
||||
cask "docker"
|
||||
# Reimagine your terminal
|
||||
cask "fig"
|
||||
# UI toolkit for building applications for mobile, web and desktop
|
||||
cask "flutter"
|
||||
# Unofficial overcast.fm podcast app
|
||||
cask "fog"
|
||||
# Typeface made for developers
|
||||
@@ -304,10 +372,10 @@ cask "jetbrains-toolbox"
|
||||
cask "lens"
|
||||
# Keep all tasks from your todo apps on your menu bar
|
||||
cask "monofocus"
|
||||
# Neovim Client
|
||||
cask "neovide"
|
||||
# Reverse proxy, secure introspectable tunnels to localhost
|
||||
cask "ngrok"
|
||||
# Simple application that will prevent iTunes or Apple Music from launching
|
||||
cask "notunes"
|
||||
# Knowledge base that works on top of a local folder of plain text Markdown files
|
||||
cask "obsidian"
|
||||
# Scheduling application focusing on organization
|
||||
@@ -336,6 +404,8 @@ cask "rsyncosx"
|
||||
cask "rsyncui"
|
||||
# MySQL/MariaDB database management
|
||||
cask "sequel-ace"
|
||||
# Plugin for AWS CLI to start and end sessions that connect to managed instances
|
||||
cask "session-manager-plugin"
|
||||
# Collection of apps available by subscription
|
||||
cask "setapp"
|
||||
# Team communication and collaboration software
|
||||
@@ -359,10 +429,14 @@ mas "Actions", id: 1586435171
|
||||
mas "Audiobook Builder", id: 1437681957
|
||||
mas "Ivory", id: 6444602274
|
||||
mas "Keynote", id: 409183694
|
||||
mas "LastPass", id: 926036361
|
||||
mas "Numbers", id: 409203825
|
||||
mas "Pages", id: 409201541
|
||||
mas "Pixelmator Pro", id: 1289583905
|
||||
mas "Tailscale", id: 1475387142
|
||||
mas "Xcode", id: 497799835
|
||||
vscode "4ops.terraform"
|
||||
vscode "adamiBs.terraform-live-graph"
|
||||
vscode "akamud.vscode-theme-onelight"
|
||||
vscode "amiralizadeh9480.laravel-extra-intellisense"
|
||||
vscode "andrewleedham.vscode-css-modules"
|
||||
@@ -372,6 +446,7 @@ vscode "bmewburn.vscode-intelephense-client"
|
||||
vscode "Box-Of-Hats.bemhelper"
|
||||
vscode "bradlc.vscode-tailwindcss"
|
||||
vscode "christian-kohler.npm-intellisense"
|
||||
vscode "christian-kohler.path-intellisense"
|
||||
vscode "DavidAnson.vscode-markdownlint"
|
||||
vscode "dbaeumer.vscode-eslint"
|
||||
vscode "DotJoshJohnson.xml"
|
||||
@@ -379,13 +454,18 @@ vscode "eamodio.gitlens"
|
||||
vscode "EditorConfig.EditorConfig"
|
||||
vscode "esbenp.prettier-vscode"
|
||||
vscode "formulahendry.auto-close-tag"
|
||||
vscode "formulahendry.auto-rename-tag"
|
||||
vscode "formulahendry.code-runner"
|
||||
vscode "foxundermoon.shell-format"
|
||||
vscode "gencer.html-slim-scss-css-class-completion"
|
||||
vscode "GitHub.copilot"
|
||||
vscode "GitHub.copilot-chat"
|
||||
vscode "github.vscode-github-actions"
|
||||
vscode "GitHub.vscode-pull-request-github"
|
||||
vscode "GraphQL.vscode-graphql"
|
||||
vscode "GraphQL.vscode-graphql-execution"
|
||||
vscode "GraphQL.vscode-graphql-syntax"
|
||||
vscode "hashicorp.terraform"
|
||||
vscode "heybourn.headwind"
|
||||
vscode "JohnnyMorganz.stylua"
|
||||
vscode "jumpinjackie.vscode-map-preview"
|
||||
@@ -394,8 +474,10 @@ vscode "liamhammett.inline-parameters"
|
||||
vscode "macieklad.tailwind-sass-syntax"
|
||||
vscode "MehediDracula.php-namespace-resolver"
|
||||
vscode "mikestead.dotenv"
|
||||
vscode "MisterJ.vue-volar-extention-pack"
|
||||
vscode "MrChetan.phpstorm-parameter-hints-in-vscode"
|
||||
vscode "mrorz.language-gettext"
|
||||
vscode "ms-azuretools.vscode-azureterraform"
|
||||
vscode "ms-azuretools.vscode-docker"
|
||||
vscode "ms-python.python"
|
||||
vscode "ms-python.vscode-pylance"
|
||||
@@ -405,25 +487,29 @@ vscode "ms-toolsai.vscode-jupyter-cell-tags"
|
||||
vscode "ms-toolsai.vscode-jupyter-slideshow"
|
||||
vscode "ms-vscode-remote.remote-containers"
|
||||
vscode "ms-vscode-remote.remote-wsl"
|
||||
vscode "ms-vscode.azure-account"
|
||||
vscode "ms-vscode.cpptools"
|
||||
vscode "msjsdiag.vscode-react-native"
|
||||
vscode "mtxr.sqltools"
|
||||
vscode "neilbrayfield.php-docblocker"
|
||||
vscode "nemesarial.dust"
|
||||
vscode "nhoizey.gremlins"
|
||||
vscode "octref.vetur"
|
||||
vscode "oderwat.indent-rainbow"
|
||||
vscode "pflannery.vscode-versionlens"
|
||||
vscode "phiter.phpstorm-snippets"
|
||||
vscode "sibiraj-s.vscode-scss-formatter"
|
||||
vscode "SonarSource.sonarlint-vscode"
|
||||
vscode "stylelint.vscode-stylelint"
|
||||
vscode "sumneko.lua"
|
||||
vscode "syler.sass-indented"
|
||||
vscode "timonwong.shellcheck"
|
||||
vscode "tootone.org-mode"
|
||||
vscode "valeryanm.vscode-phpsab"
|
||||
vscode "Vue.volar"
|
||||
vscode "Vue.vscode-typescript-vue-plugin"
|
||||
vscode "WakaTime.vscode-wakatime"
|
||||
vscode "wix.vscode-import-cost"
|
||||
vscode "XadillaX.viml"
|
||||
vscode "xdebug.php-debug"
|
||||
vscode "xdebug.php-pack"
|
||||
vscode "yinfei.luahelper"
|
||||
11
config/homebrew/brew.env
Normal file
11
config/homebrew/brew.env
Normal file
@@ -0,0 +1,11 @@
|
||||
# shellcheck shell=bash
|
||||
# vim: filetype=zsh
|
||||
# dotenv-linter:off LowercaseKey, KeyWithoutValue, ExtraBlankLine, EndingBlankLine
|
||||
#
|
||||
# Homebrew configuration
|
||||
|
||||
export HOMEBREW_AUTOREMOVE=true
|
||||
export HOMEBREW_AUTO_UPDATE_SECS=86400
|
||||
export HOMEBREW_CLEANUP_MAX_AGE_DAYS=30
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
328
config/irssi/config
Normal file
328
config/irssi/config
Normal file
@@ -0,0 +1,328 @@
|
||||
# vim:noext ft=conf;
|
||||
servers = (
|
||||
{
|
||||
address = "irc.cc.tut.fi";
|
||||
chatnet = "IRCNet";
|
||||
port = "6667";
|
||||
own_host = "kapsi.fi";
|
||||
family = "inet";
|
||||
autoconnect = "no";
|
||||
},
|
||||
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
|
||||
{
|
||||
address = "ssl.efnet.org";
|
||||
chatnet = "EFNet";
|
||||
port = "9999";
|
||||
use_tls = "yes";
|
||||
tls_verify = "no";
|
||||
},
|
||||
{
|
||||
address = "irc.esper.net";
|
||||
chatnet = "EsperNet";
|
||||
port = "6697";
|
||||
use_tls = "yes";
|
||||
tls_verify = "yes";
|
||||
},
|
||||
{
|
||||
address = "irc.libera.chat";
|
||||
chatnet = "liberachat";
|
||||
port = "6697";
|
||||
use_tls = "yes";
|
||||
tls_verify = "yes";
|
||||
},
|
||||
{
|
||||
address = "irc.gamesurge.net";
|
||||
chatnet = "GameSurge";
|
||||
port = "6667";
|
||||
},
|
||||
{
|
||||
address = "ssl.ircnet.ovh";
|
||||
chatnet = "IRCnet";
|
||||
port = "6697";
|
||||
use_tls = "yes";
|
||||
tls_verify = "yes";
|
||||
},
|
||||
{ address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
|
||||
{
|
||||
address = "irc.ircsource.net";
|
||||
chatnet = "IRCSource";
|
||||
port = "6667";
|
||||
},
|
||||
{ address = "irc.netfuze.net"; chatnet = "NetFuze"; port = "6667"; },
|
||||
{
|
||||
address = "irc.oftc.net";
|
||||
chatnet = "OFTC";
|
||||
port = "6697";
|
||||
use_tls = "yes";
|
||||
tls_verify = "yes";
|
||||
},
|
||||
{
|
||||
address = "irc.quakenet.org";
|
||||
chatnet = "QuakeNet";
|
||||
port = "6667";
|
||||
},
|
||||
{
|
||||
address = "irc.rizon.net";
|
||||
chatnet = "Rizon";
|
||||
port = "6697";
|
||||
use_tls = "yes";
|
||||
tls_verify = "yes";
|
||||
},
|
||||
{ address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; },
|
||||
{
|
||||
address = "irc.undernet.org";
|
||||
chatnet = "Undernet";
|
||||
port = "6667";
|
||||
}
|
||||
);
|
||||
|
||||
chatnets = {
|
||||
DALnet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "20";
|
||||
max_whois = "30";
|
||||
};
|
||||
EFNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "4";
|
||||
max_whois = "1";
|
||||
};
|
||||
EsperNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "4";
|
||||
max_whois = "1";
|
||||
};
|
||||
liberachat = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "4";
|
||||
max_whois = "1";
|
||||
};
|
||||
GameSurge = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "1";
|
||||
max_whois = "1";
|
||||
};
|
||||
IRCnet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "1";
|
||||
max_whois = "1";
|
||||
};
|
||||
IRCSource = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "4";
|
||||
max_whois = "1";
|
||||
};
|
||||
NetFuze = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "1";
|
||||
max_whois = "1";
|
||||
};
|
||||
OFTC = { type = "IRC"; max_kicks = "1"; max_msgs = "1"; max_whois = "1"; };
|
||||
QuakeNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "1";
|
||||
max_whois = "1";
|
||||
};
|
||||
Rizon = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "1";
|
||||
max_whois = "1";
|
||||
};
|
||||
SILC = { type = "SILC"; };
|
||||
Undernet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "1";
|
||||
max_whois = "1";
|
||||
};
|
||||
};
|
||||
|
||||
channels = (
|
||||
{ name = "#lobby"; chatnet = "EsperNet"; autojoin = "No"; },
|
||||
{ name = "#libera"; chatnet = "liberachat"; autojoin = "No"; },
|
||||
{ name = "#irssi"; chatnet = "liberachat"; autojoin = "No"; },
|
||||
{ name = "#gamesurge"; chatnet = "GameSurge"; autojoin = "No"; },
|
||||
{ name = "#irssi"; chatnet = "IRCNet"; autojoin = "No"; },
|
||||
{ name = "#ircsource"; chatnet = "IRCSource"; autojoin = "No"; },
|
||||
{ name = "#netfuze"; chatnet = "NetFuze"; autojoin = "No"; },
|
||||
{ name = "#oftc"; chatnet = "OFTC"; autojoin = "No"; },
|
||||
{ name = "silc"; chatnet = "SILC"; autojoin = "No"; }
|
||||
);
|
||||
|
||||
aliases = {
|
||||
ATAG = "WINDOW SERVER";
|
||||
ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{visible_name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";
|
||||
B = "BAN";
|
||||
BACK = "AWAY";
|
||||
BANS = "BAN";
|
||||
BYE = "QUIT";
|
||||
C = "CLEAR";
|
||||
CALC = "EXEC - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
|
||||
CHAT = "DCC CHAT";
|
||||
CS = "QUOTE CS";
|
||||
DATE = "TIME";
|
||||
DEHIGHLIGHT = "DEHILIGHT";
|
||||
DESCRIBE = "ACTION";
|
||||
DHL = "DEHILIGHT";
|
||||
EXEMPTLIST = "MODE $C +e";
|
||||
EXIT = "QUIT";
|
||||
GOTO = "SCROLLBACK GOTO";
|
||||
HIGHLIGHT = "HILIGHT";
|
||||
HL = "HILIGHT";
|
||||
HOST = "USERHOST";
|
||||
INVITELIST = "MODE $C +I";
|
||||
J = "JOIN";
|
||||
K = "KICK";
|
||||
KB = "KICKBAN";
|
||||
KN = "KNOCKOUT";
|
||||
LAST = "LASTLOG";
|
||||
LEAVE = "PART";
|
||||
M = "MSG";
|
||||
MS = "QUOTE MS";
|
||||
MUB = "UNBAN *";
|
||||
N = "NAMES";
|
||||
NMSG = "^MSG";
|
||||
NS = "QUOTE NS";
|
||||
OS = "QUOTE OS";
|
||||
P = "PART";
|
||||
Q = "QUERY";
|
||||
RESET = "SET -default";
|
||||
RUN = "SCRIPT LOAD";
|
||||
SAY = "MSG *";
|
||||
SB = "SCROLLBACK";
|
||||
SBAR = "STATUSBAR";
|
||||
SHELP = "QUOTE HELP";
|
||||
SIGNOFF = "QUIT";
|
||||
SV = "MSG * Irssi $J ($V) - https://irssi.org";
|
||||
T = "TOPIC";
|
||||
UB = "UNBAN";
|
||||
UMODE = "MODE $N";
|
||||
UNSET = "SET -clear";
|
||||
W = "WHO";
|
||||
WC = "WINDOW CLOSE";
|
||||
WG = "WINDOW GOTO";
|
||||
WJOIN = "JOIN -window";
|
||||
WI = "WHOIS";
|
||||
WII = "WHOIS $0 $0";
|
||||
WL = "WINDOW LIST";
|
||||
WN = "WINDOW NEW HIDDEN";
|
||||
WQUERY = "QUERY -window";
|
||||
WW = "WHOWAS";
|
||||
};
|
||||
|
||||
statusbar = {
|
||||
|
||||
items = {
|
||||
|
||||
barstart = "{sbstart}";
|
||||
barend = "{sbend}";
|
||||
|
||||
topicbarstart = "{topicsbstart}";
|
||||
topicbarend = "{topicsbend}";
|
||||
|
||||
time = "{sb $Z}";
|
||||
user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";
|
||||
|
||||
window = "{sb $winref:$tag/$itemname{sbmode $M}}";
|
||||
window_empty = "{sb $winref{sbservertag $tag}}";
|
||||
|
||||
prompt = "{prompt $[.15]itemname}";
|
||||
prompt_empty = "{prompt $winname}";
|
||||
|
||||
topic = " $topic";
|
||||
topic_empty = " Irssi v$J - https://irssi.org";
|
||||
|
||||
lag = "{sb Lag: $0-}";
|
||||
act = "{sb Act: $0-}";
|
||||
more = "-- more --";
|
||||
};
|
||||
|
||||
default = {
|
||||
|
||||
window = {
|
||||
|
||||
disabled = "no";
|
||||
type = "window";
|
||||
placement = "bottom";
|
||||
position = "1";
|
||||
visible = "active";
|
||||
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
time = { };
|
||||
user = { };
|
||||
window = { };
|
||||
window_empty = { };
|
||||
lag = { priority = "-1"; };
|
||||
act = { priority = "10"; };
|
||||
more = { priority = "-1"; alignment = "right"; };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
|
||||
window_inact = {
|
||||
|
||||
type = "window";
|
||||
placement = "bottom";
|
||||
position = "1";
|
||||
visible = "inactive";
|
||||
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
window = { };
|
||||
window_empty = { };
|
||||
more = { priority = "-1"; alignment = "right"; };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
|
||||
prompt = {
|
||||
|
||||
type = "root";
|
||||
placement = "bottom";
|
||||
position = "100";
|
||||
visible = "always";
|
||||
|
||||
items = {
|
||||
prompt = { priority = "-1"; };
|
||||
prompt_empty = { priority = "-1"; };
|
||||
input = { priority = "10"; };
|
||||
};
|
||||
};
|
||||
|
||||
topic = {
|
||||
|
||||
type = "root";
|
||||
placement = "top";
|
||||
position = "1";
|
||||
visible = "always";
|
||||
|
||||
items = {
|
||||
topicbarstart = { priority = "100"; };
|
||||
topic = { };
|
||||
topic_empty = { };
|
||||
topicbarend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
core = {
|
||||
real_name = "Ismo Vuorinen";
|
||||
user_name = "ivuorinen";
|
||||
nick = "ivuorinen";
|
||||
};
|
||||
"fe-common/core" = { theme = "lyynx"; };
|
||||
"fe-text" = { actlist_sort = "refnum"; };
|
||||
};
|
||||
@@ -120,7 +120,7 @@ abstracts = {
|
||||
# the basic styling of how to print message, $0 = nick mode, $1 = nick
|
||||
msgnick = "%K<%n$0$1-%K>%n %|";
|
||||
|
||||
# message from you is printed. "msgownnick" specifies the styling of the
|
||||
# message from you is printed. "ownnick" specifies the styling of the
|
||||
# nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
|
||||
# whole line.
|
||||
|
||||
@@ -251,6 +251,7 @@ abstracts = {
|
||||
# default background for all statusbars. You can also give
|
||||
# the default foreground color for statusbar items.
|
||||
sb_background = "%4%w";
|
||||
window_border = "%4%w";
|
||||
|
||||
# default backround for "default" statusbar group
|
||||
#sb_default_bg = "%4";
|
||||
@@ -261,8 +262,8 @@ abstracts = {
|
||||
# background for topicbar (same default)
|
||||
#sb_topic_bg = "%4";
|
||||
|
||||
# text at the beginning of statusbars. sb-item already puts
|
||||
# space there,so we don't use anything by default.
|
||||
# text at the beginning of statusbars. "sb" already puts a space there,
|
||||
# so we don't use anything by default.
|
||||
sbstart = "";
|
||||
# text at the end of statusbars. Use space so that it's never
|
||||
# used for anything.
|
||||
258
config/irssi/lyynx.theme
Normal file
258
config/irssi/lyynx.theme
Normal file
@@ -0,0 +1,258 @@
|
||||
# LyyNx.theme
|
||||
# started this by editing agon.theme, but later i noticed that there
|
||||
# was nothing left from agon :)
|
||||
# so here it is. i use it with transparent aterm, tint - lightblue,
|
||||
# shading - 99, foreground - lightyellow
|
||||
|
||||
default_color = "-1";
|
||||
info_eol = "false";
|
||||
replaces = { "[]=" = "%K$*%n"; };
|
||||
|
||||
abstracts = {
|
||||
##
|
||||
## generic
|
||||
##
|
||||
|
||||
# text to insert at the beginning of each non-message line
|
||||
line_start = ". ";
|
||||
|
||||
# timestamp styling, nothing by default
|
||||
timestamp = "%w$*%n";
|
||||
|
||||
# any kind of text that needs hilighting, default is to bold
|
||||
hilight = "%_$*%_";
|
||||
|
||||
# any kind of error message, default is bright red
|
||||
error = "%r$*%n";
|
||||
|
||||
# channel name is printed
|
||||
channel = "%w$0-%n";
|
||||
|
||||
# nick is printed
|
||||
nick = "%_%n$*%_";
|
||||
|
||||
# nick host is printed
|
||||
nickhost = "$*";
|
||||
|
||||
# server name is printed
|
||||
server = "%_$*%_";
|
||||
|
||||
# some kind of comment is printed
|
||||
comment = "$*";
|
||||
|
||||
# reason for something is printed (part, quit, kick, ..)
|
||||
reason = "{comment}";
|
||||
|
||||
# mode change is printed ([+o nick])
|
||||
mode = "{comment $*}";
|
||||
|
||||
##
|
||||
## channel specific messages
|
||||
##
|
||||
|
||||
# highlighted nick/host is printed (joins)
|
||||
channick_hilight = "%c$0-%n";
|
||||
chanhost_hilight = "{nickhost %w$0-%n}";
|
||||
|
||||
# nick/host is printed (parts, quits, etc.)
|
||||
channick = "%c$*";
|
||||
chanhost = "%w{nickhost $*}";
|
||||
|
||||
# highlighted channel name is printed
|
||||
channelhilight = "%n$*%n";
|
||||
|
||||
# ban/ban exception/invite list mask is printed
|
||||
ban = "%n$*%n";
|
||||
|
||||
##
|
||||
## messages
|
||||
##
|
||||
|
||||
# the basic styling of how to print message, $0 = nick mode, $1 = nick
|
||||
msgnick = "%_%n$0%n$1-%w:%n ";
|
||||
|
||||
# message from you is printed. "msgownnick" specifies the styling of the
|
||||
# nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
|
||||
# whole line.
|
||||
|
||||
# Example1: You want the message text to be green:
|
||||
# ownmsgnick = "{msgnick $0 $1-}%g";
|
||||
# Example2.1: You want < and> chars to be yellow:
|
||||
# ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
|
||||
# (you'll also have to remove <> from replaces list above)
|
||||
# Example2.2: But you still want to keep <> grey for other messages:
|
||||
# pubmsgnick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
|
||||
# ownprivmsgnick = "%K{msgnick $*%K}%n";
|
||||
# privmsgnick = "%K{msgnick %R$*%K}%n";
|
||||
|
||||
# $0 = nick mod, $1 = nick
|
||||
ownmsgnick = "%n{msgnick %n$0$1-%n}%w";
|
||||
ownnick = "%w$*%n";
|
||||
|
||||
# public message in channel, $0 = nick mode, $1 = nick
|
||||
pubmsgnick = "{msgnick %n$0 %b$1-}";
|
||||
pubnick = "%w$*%n";
|
||||
|
||||
# public message in channel meant for me, $0 = nick mode, $1 = nick
|
||||
pubmsgmenick = "{msgnick $0 $1-}";
|
||||
menick = "%w$*";
|
||||
|
||||
# public highlighted message in channel
|
||||
# $0 = highlight color, $1 = nick mode, $2 = nick
|
||||
pubmsghinick = "{msgnick $1 $0$2-%n}";
|
||||
|
||||
# channel name is printed with message
|
||||
msgchannel = "%K:%c$*%n";
|
||||
|
||||
# private message, $0 = nick, $1 = host
|
||||
privmsg = "[%n$0%K(%W$1-%K)%n] ";
|
||||
|
||||
# private message from you, $0 = "msg", $1 = target nick
|
||||
ownprivmsg = "[%n$0%K(%n$1-%K)%n] ";
|
||||
|
||||
# own private message in query
|
||||
ownprivmsgnick = "{msgnick $*}%W";
|
||||
ownprivnick = "%n$*%W";
|
||||
|
||||
# private message in query
|
||||
privmsgnick = "{msgnick $*}";
|
||||
|
||||
##
|
||||
## Actions (/ME stuff)
|
||||
##
|
||||
|
||||
# used internally by this theme
|
||||
action_core = "%c * $*";
|
||||
|
||||
# generic one that's used by most actions
|
||||
action = "{action_core $*} ";
|
||||
|
||||
# own action, both private/public
|
||||
ownaction = "{action $*}";
|
||||
|
||||
# own action with target, both private/public
|
||||
ownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# private action sent by others
|
||||
pvtaction = "%W (*) $*%n ";
|
||||
pvtaction_query = "{action $*}";
|
||||
|
||||
# public action sent by others
|
||||
pubaction = "{action $*}";
|
||||
|
||||
|
||||
##
|
||||
## other IRC events
|
||||
##
|
||||
|
||||
# whois
|
||||
whois = "$[8]0: $1-";
|
||||
|
||||
# notices
|
||||
ownnotice = "[%n$0%K(%R$1-%K)]%n ";
|
||||
notice = "%K-%C$*%K-%n ";
|
||||
pubnotice_channel = "%K:%m$*";
|
||||
pvtnotice_host = "%K(%m$*%K)";
|
||||
servernotice = "%g!$*%n ";
|
||||
|
||||
# CTCPs
|
||||
ownctcp = "[%y$0%K(%n$1-%K)] ";
|
||||
ctcp = "%Y$*%n";
|
||||
|
||||
# wallops
|
||||
wallop = "%W$*%n: ";
|
||||
wallop_nick = "%n$*";
|
||||
wallop_action = "%W * $*%n ";
|
||||
|
||||
# netsplits
|
||||
netsplit = "%n$*%n";
|
||||
netjoin = "%C$*%n";
|
||||
|
||||
# /names list
|
||||
names_prefix = "";
|
||||
names_nick = "%_$0%_$1- ";
|
||||
names_nick_op = "{names_nick $*}";
|
||||
names_nick_halfop = "{names_nick $*}";
|
||||
names_nick_voice = "{names_nick $*}";
|
||||
names_users = "%c$*%n";
|
||||
names_channel = "%C$*%n";
|
||||
|
||||
# DCC
|
||||
dcc = "%g$*%n";
|
||||
dccfile = "%_$*%_";
|
||||
|
||||
# DCC chat, own msg/action
|
||||
dccownmsg = "[%n$0%K($1-%K)%n] ";
|
||||
dccownnick = "%n$*%n";
|
||||
dccownquerynick = "%W$*%n";
|
||||
dccownaction = "{action $*}";
|
||||
dccownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# DCC chat, others
|
||||
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
|
||||
dccquerynick = "%G$*%n";
|
||||
dccaction = "%W (*dcc*) $*%n %|";
|
||||
|
||||
##
|
||||
## statusbar
|
||||
##
|
||||
|
||||
# default background for all statusbars. You can also give
|
||||
# the default foreground color for statusbar items.
|
||||
sb_background = "%N%w";
|
||||
|
||||
# default backround for "default" statusbar group
|
||||
#sb_default_bg = "%4";
|
||||
# background for prompt / input line
|
||||
sb_prompt_bg = "%n";
|
||||
# background for info statusbar
|
||||
sb_info_bg = "%8";
|
||||
# background for topicbar (same default)
|
||||
#sb_topic_bg = "%4";
|
||||
|
||||
# text at the beginning of statusbars. sb-item already puts
|
||||
# space there,so we don't use anything by default.
|
||||
sbstart = "";
|
||||
# text at the end of statusbars. Use space so that it's never
|
||||
# used for anything.
|
||||
sbend = " ";
|
||||
|
||||
topicsbstart = "{sbstart $*}";
|
||||
topicsbend = "{sbend $*}";
|
||||
|
||||
prompt = "$* ";
|
||||
|
||||
sb = " %n$*%n";
|
||||
sbmode = "";
|
||||
#sbaway = " (%g[away]%n)";
|
||||
sbservertag = " $0";
|
||||
sbnickmode = "$0";
|
||||
|
||||
# activity in statusbar
|
||||
|
||||
# ',' separator
|
||||
sb_act_sep = "%K$*";
|
||||
# normal text
|
||||
sb_act_text = "%w$*";
|
||||
# public message
|
||||
sb_act_msg = "%c$*";
|
||||
# hilight
|
||||
sb_act_hilight = "%C$*";
|
||||
# hilight with specified color, $0 = color, $1 = text
|
||||
sb_act_hilight_color = "$0$1-%n";
|
||||
};
|
||||
formats = {
|
||||
"fe-common/core" = {
|
||||
join = "%g{channick $0} {chanhost $1} %cgot in {channel $2}";
|
||||
part = "%g{channick $0} {chanhost $1} %cgot out of%n $2";
|
||||
kick = "%g{channick $2} kicked %g{channick $0} ($3)";
|
||||
quit = "%g{channick $0} {chanhost $1} %cleft irc%n ($2)";
|
||||
line_start_irssi = "{line_start}";
|
||||
nick_changed = "%g{channick $0} --> {channick $1}";
|
||||
new_topic = "%g{nick $0} topic change -> {channel $1} to: $2";
|
||||
endofnames = "$1 nicks totaly - $2 ops, $3 voices and $4 normal";
|
||||
timestamp = "{timestamp %%H:%%M:%%S} ";
|
||||
};
|
||||
};
|
||||
129
config/irssi/scripts/autorun/autoaway.pl
Normal file
129
config/irssi/scripts/autorun/autoaway.pl
Normal file
@@ -0,0 +1,129 @@
|
||||
# /AUTOAWAY <n> - Mark user away after <n> seconds of inactivity
|
||||
# /AWAY - play nice with autoaway
|
||||
# New, brighter, whiter version of my autoaway script. Actually works :)
|
||||
# (c) 2000 Larry Daffner (vizzie@airmail.net)
|
||||
# You may freely use, modify and distribute this script, as long as
|
||||
# 1) you leave this notice intact
|
||||
# 2) you don't pretend my code is yours
|
||||
# 3) you don't pretend your code is mine
|
||||
#
|
||||
# share and enjoy!
|
||||
|
||||
# A simple script. /autoaway <n> will mark you as away automatically if
|
||||
# you have not typed any commands in <n> seconds. (<n>=0 disables the feature)
|
||||
# It will also automatically unmark you away the next time you type a command.
|
||||
# Note that using the /away command will disable the autoaway mechanism, as
|
||||
# well as the autoreturn. (when you unmark yourself, the autoaway wil
|
||||
# restart again)
|
||||
|
||||
# Thanks to Adam Monsen for multiserver and config file fix
|
||||
|
||||
use strict;
|
||||
use Irssi;
|
||||
use Irssi::Irc;
|
||||
|
||||
use vars qw($VERSION %IRSSI);
|
||||
$VERSION = "0.5";
|
||||
%IRSSI = (
|
||||
authors => 'Larry "Vizzie" Daffner',
|
||||
contact => 'vizzie@airmail.net',
|
||||
name => 'Automagic away setting',
|
||||
description => 'Automatically goes away after defined inactivity',
|
||||
license => 'BSD',
|
||||
url => 'http://www.flamingpackets.net/~vizzie/irssi/',
|
||||
changed => '2018-12-02',
|
||||
);
|
||||
|
||||
my ($autoaway_sec, $autoaway_to_tag, $autoaway_state);
|
||||
$autoaway_state = 0;
|
||||
|
||||
#
|
||||
# /AUTOAWAY - set the autoaway timeout
|
||||
#
|
||||
sub cmd_autoaway {
|
||||
my ($data, $server, $channel) = @_;
|
||||
|
||||
if (!($data =~ /^[0-9]+$/)) {
|
||||
Irssi::print("autoaway: usage: /autoaway <seconds>");
|
||||
return 1;
|
||||
}
|
||||
|
||||
$autoaway_sec = $data;
|
||||
|
||||
if ($autoaway_sec) {
|
||||
Irssi::settings_set_int("autoaway_timeout", $autoaway_sec);
|
||||
Irssi::print("autoaway timeout set to $autoaway_sec seconds");
|
||||
} else {
|
||||
Irssi::print("autoway disabled");
|
||||
}
|
||||
|
||||
if (defined($autoaway_to_tag)) {
|
||||
Irssi::timeout_remove($autoaway_to_tag);
|
||||
$autoaway_to_tag = undef;
|
||||
}
|
||||
|
||||
if ($autoaway_sec) {
|
||||
$autoaway_to_tag =
|
||||
Irssi::timeout_add($autoaway_sec*1000, "auto_timeout", "");
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# away = Set us away or back, within the autoaway system
|
||||
sub cmd_away {
|
||||
my ($data, $server, $channel) = @_;
|
||||
|
||||
if ($data eq "") {
|
||||
$autoaway_state = 0;
|
||||
} else {
|
||||
if ($autoaway_state eq 0) {
|
||||
Irssi::timeout_remove($autoaway_to_tag);
|
||||
$autoaway_to_tag = undef;
|
||||
$autoaway_state = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub auto_timeout {
|
||||
my ($data, $server) = @_;
|
||||
|
||||
# we're in the process.. don't touch anything.
|
||||
$autoaway_state = 3;
|
||||
foreach my $server (Irssi::servers()) {
|
||||
$server->command("/AWAY autoaway after $autoaway_sec seconds");
|
||||
}
|
||||
|
||||
Irssi::timeout_remove($autoaway_to_tag);
|
||||
$autoaway_state = 1;
|
||||
}
|
||||
|
||||
sub reset_timer {
|
||||
if ($autoaway_state eq 1) {
|
||||
$autoaway_state = 3;
|
||||
foreach my $server (Irssi::servers()) {
|
||||
$server->command("/AWAY");
|
||||
}
|
||||
|
||||
$autoaway_state = 0;
|
||||
}
|
||||
if ($autoaway_state eq 0) {
|
||||
if (defined($autoaway_to_tag)) {
|
||||
Irssi::timeout_remove($autoaway_to_tag);
|
||||
$autoaway_to_tag = undef();
|
||||
}
|
||||
if ($autoaway_sec) {
|
||||
$autoaway_to_tag = Irssi::timeout_add($autoaway_sec*1000, "auto_timeout", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Irssi::settings_add_int("misc", "autoaway_timeout", 0);
|
||||
|
||||
$autoaway_sec = Irssi::settings_get_int("autoaway_timeout");
|
||||
reset_timer();
|
||||
|
||||
Irssi::command_bind('autoaway', 'cmd_autoaway');
|
||||
Irssi::command_bind('away', 'cmd_away');
|
||||
Irssi::signal_add('send command', 'reset_timer');
|
||||
|
||||
# vim:set expandtab ts=2 sw=2:
|
||||
39
config/irssi/scripts/autorun/autowhois.pl
Normal file
39
config/irssi/scripts/autorun/autowhois.pl
Normal file
@@ -0,0 +1,39 @@
|
||||
# /WHOIS all the users who send you a private message.
|
||||
# v1.1 for irssi 0.7.98 by Timo Sirainen
|
||||
use strict;
|
||||
use Irssi;
|
||||
use vars qw($VERSION %IRSSI);
|
||||
$VERSION = "1.1";
|
||||
%IRSSI = (
|
||||
authors => "Timo \'cras\' Sirainen",
|
||||
contact => "tss\@iki.fi",
|
||||
name => "autowhois",
|
||||
description => "/WHOIS all the users who send you a private message.",
|
||||
license => "Public Domain",
|
||||
url => "http://irssi.org/",
|
||||
changed => "2002-03-04T22:47+0100",
|
||||
changes => "v1.1: don't /WHOIS if query exists for the nick already"
|
||||
);
|
||||
|
||||
# History:
|
||||
# v1.1: don't /WHOIS if query exists for the nick already
|
||||
|
||||
my ($lastfrom, $lastquery);
|
||||
|
||||
sub msg_private_first {
|
||||
my ($server, $msg, $nick, $address) = @_;
|
||||
|
||||
$lastquery = $server->query_find($nick);
|
||||
}
|
||||
|
||||
sub msg_private {
|
||||
my ($server, $msg, $nick, $address) = @_;
|
||||
|
||||
return if $lastquery || $lastfrom eq $nick;
|
||||
|
||||
$lastfrom = $nick;
|
||||
$server->command("whois $nick");
|
||||
}
|
||||
|
||||
Irssi::signal_add_first('message private', 'msg_private_first');
|
||||
Irssi::signal_add('message private', 'msg_private');
|
||||
115
config/irssi/scripts/autorun/go.pl
Normal file
115
config/irssi/scripts/autorun/go.pl
Normal file
@@ -0,0 +1,115 @@
|
||||
use strict;
|
||||
use vars qw($VERSION %IRSSI);
|
||||
use Irssi;
|
||||
use Irssi::Irc;
|
||||
|
||||
# Usage:
|
||||
# /script load go.pl
|
||||
# If you are in #irssi you can type /go #irssi or /go irssi or even /go ir ...
|
||||
# also try /go ir<tab> and /go <tab> (that's two spaces)
|
||||
#
|
||||
# The following settings exist:
|
||||
#
|
||||
# /SET go_match_case_sensitive [ON|OFF]
|
||||
# Match window/item names sensitively (the default). Turning this off
|
||||
# means e.g. "/go foo" would jump to a window named "Foobar", too.
|
||||
#
|
||||
# /SET go_match_anchored [ON|OFF]
|
||||
# Match window/names only at the start of the word (the default). Turning
|
||||
# this off will mean that strings can match anywhere in the window/names.
|
||||
# The leading '#' of channel names is optional either way.
|
||||
#
|
||||
# /SET go_complete_case_sensitive [ON|OFF]
|
||||
# When using tab-completion, match case-insensitively (the default).
|
||||
# Turning this on means that "/go foo<tab>" will *not* suggest "Foobar".
|
||||
#
|
||||
# /SET go_complete_anchored [ON|OFF]
|
||||
# Match window/names only at the start of the word. The default is 'off',
|
||||
# which causes completion to match anywhere in the window/names during
|
||||
# completion. The leading '#' of channel names is optional either way.
|
||||
#
|
||||
|
||||
$VERSION = '1.1.1';
|
||||
|
||||
%IRSSI = (
|
||||
authors => 'nohar',
|
||||
contact => 'nohar@freenode',
|
||||
name => 'go to window',
|
||||
description => 'Implements /go command that activates a window given a name/partial name. It features a nice completion.',
|
||||
license => 'GPLv2 or later',
|
||||
changed => '2019-02-25'
|
||||
);
|
||||
|
||||
sub _make_regexp {
|
||||
my ($name, $ci, $aw) = @_;
|
||||
my $re = "\Q${name}\E";
|
||||
$re = "(?i:$re)" unless $ci;
|
||||
$re = "^#?$re" if $aw;
|
||||
return $re;
|
||||
}
|
||||
|
||||
sub signal_complete_go {
|
||||
my ($complist, $window, $word, $linestart, $want_space) = @_;
|
||||
my $channel = $window->get_active_name();
|
||||
my $k = Irssi::parse_special('$k');
|
||||
|
||||
return unless ($linestart =~ /^\Q${k}\Ego\b/i);
|
||||
|
||||
my $re = _make_regexp($word,
|
||||
Irssi::settings_get_bool('go_complete_case_sensitive'),
|
||||
Irssi::settings_get_bool('go_complete_anchored'));
|
||||
@$complist = ();
|
||||
foreach my $w (Irssi::windows) {
|
||||
my $name = $w->get_active_name();
|
||||
if ($word ne "") {
|
||||
if ($name =~ $re) {
|
||||
push(@$complist, $name)
|
||||
}
|
||||
} else {
|
||||
push(@$complist, $name);
|
||||
}
|
||||
}
|
||||
Irssi::signal_stop();
|
||||
};
|
||||
|
||||
sub cmd_go
|
||||
{
|
||||
my($chan,$server,$witem) = @_;
|
||||
|
||||
my $case_sensitive = Irssi::settings_get_bool('go_match_case_sensitive');
|
||||
my $match_anchored = Irssi::settings_get_bool('go_match_anchored');
|
||||
|
||||
$chan =~ s/ *//g;
|
||||
my $re = _make_regexp($chan, $case_sensitive, $match_anchored);
|
||||
|
||||
my @matches;
|
||||
foreach my $w (Irssi::windows) {
|
||||
my $name = $w->get_active_name();
|
||||
if (($case_sensitive && $name eq $chan) ||
|
||||
(!$case_sensitive && CORE::fc $name eq CORE::fc $chan)) {
|
||||
$w->set_active();
|
||||
return;
|
||||
} elsif ($name =~ /$re/) {
|
||||
push(@matches, $w);
|
||||
}
|
||||
}
|
||||
if (@matches) {
|
||||
$matches[0]->set_active();
|
||||
}
|
||||
}
|
||||
|
||||
Irssi::command_bind("go", "cmd_go");
|
||||
Irssi::signal_add_first('complete word', 'signal_complete_go');
|
||||
Irssi::settings_add_bool('go', 'go_match_case_sensitive', 1);
|
||||
Irssi::settings_add_bool('go', 'go_complete_case_sensitive', 0);
|
||||
Irssi::settings_add_bool('go', 'go_match_anchored', 1);
|
||||
Irssi::settings_add_bool('go', 'go_complete_anchored', 0);
|
||||
|
||||
# Changelog
|
||||
#
|
||||
# 2017-02-02 1.1 martin f. krafft <madduck@madduck.net>
|
||||
# - made case-sensitivity of match configurable
|
||||
# - made anchoring of search strings configurable
|
||||
#
|
||||
# 2019-02-025 1.1.1 dylan lloyd <dylan@disinclined.org>
|
||||
# - prefer exact channel matches
|
||||
113
config/irssi/scripts/autorun/highlite.pl
Normal file
113
config/irssi/scripts/autorun/highlite.pl
Normal file
@@ -0,0 +1,113 @@
|
||||
use strict;
|
||||
use Irssi;
|
||||
use Irssi::Irc;
|
||||
|
||||
use vars qw($VERSION %IRSSI);
|
||||
|
||||
$VERSION = "1.0";
|
||||
%IRSSI = (
|
||||
"authors" => "Mantis",
|
||||
"contact" => "mantis\@inta-link.com",
|
||||
"name" => "highlite",
|
||||
"description" => "shows events happening in all channels you are in that may concern you",
|
||||
"url" => "http://www.inta-link.com/",
|
||||
"license" => "GNU GPL v2",
|
||||
"changed" => "2003-01-03"
|
||||
);
|
||||
|
||||
sub msg_join
|
||||
{
|
||||
my ($server, $channame, $nick, $host) = @_;
|
||||
$channame =~ s/^://;
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
$windowname->print("%B%0JOIN : " . $nick . " : " . $channame . " : " . $host, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
}
|
||||
|
||||
sub msg_part
|
||||
{
|
||||
my ($server, $channame, $nick, $host) = @_;
|
||||
$channame =~ s/^://;
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
$windowname->print("%b%0PART : " . $nick . " : " . $channame . " : " . $host, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
}
|
||||
|
||||
sub msg_quit
|
||||
{
|
||||
my ($server, $nick, $host, $quitmsg) = @_;
|
||||
|
||||
if (substr($quitmsg, 0, 14) eq "Read error to ")
|
||||
{
|
||||
$quitmsg = "[ General Read Error ]";
|
||||
}
|
||||
if (substr($quitmsg, 0, 17) eq "Ping timeout for ")
|
||||
{
|
||||
$quitmsg = "[ General Ping Timeout Error ]";
|
||||
}
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
$windowname->print("%R%0QUIT : " . $nick . " : " . $host . " : " . $quitmsg, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
|
||||
$quitmsg = "";
|
||||
}
|
||||
|
||||
sub msg_topic
|
||||
{
|
||||
my ($server, $channame, $topicmsg, $nick, $host) = @_;
|
||||
$channame =~ s/^://;
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
$windowname->print("%G%0TOPIC : " . $nick . " : " . $channame . " : " . $topicmsg, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
}
|
||||
|
||||
sub msg_nick
|
||||
{
|
||||
my ($server, $nick, $old_nick, $host) = @_;
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
$windowname->print("%m%0NICK : " . $old_nick . " : " . $nick . " : " . $host, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
}
|
||||
|
||||
sub msg_kick
|
||||
{
|
||||
my ($server, $channame, $kicked, $nick, $host, $reason) = @_;
|
||||
$channame =~ s/^://;
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
$windowname->print("%Y%0KICK : " . $kicked . " : " . $channame . " : " . $nick . " : " . $reason, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
}
|
||||
|
||||
sub sig_printtext {
|
||||
my ($dest, $text, $stripped) = @_;
|
||||
|
||||
if (($dest->{level} & (MSGLEVEL_HILIGHT|MSGLEVEL_MSGS)) && ($dest->{level} & MSGLEVEL_NOHILIGHT) == 0)
|
||||
{
|
||||
if ($dest->{level} & MSGLEVEL_PUBLIC)
|
||||
{
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
|
||||
$windowname->print("%W%0HIGHLITE : " . $dest->{target} . " : " . $text, MSGLEVEL_CLIENTCRAP) if ($windowname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $windowname = Irssi::window_find_name('highlite');
|
||||
if (!$windowname)
|
||||
{
|
||||
Irssi::command("window new hidden");
|
||||
Irssi::command("window name highlite");
|
||||
}
|
||||
|
||||
Irssi::signal_add(
|
||||
{
|
||||
'message join' => \&msg_join,
|
||||
'message part' => \&msg_part,
|
||||
'message quit' => \&msg_quit,
|
||||
'message topic' => \&msg_topic,
|
||||
'print text', 'sig_printtext',
|
||||
'message nick' => \&msg_nick,
|
||||
'message kick' => \&msg_kick
|
||||
}
|
||||
);
|
||||
|
||||
257
config/irssi/scripts/autorun/nickcolor.pl
Normal file
257
config/irssi/scripts/autorun/nickcolor.pl
Normal file
@@ -0,0 +1,257 @@
|
||||
use strict;
|
||||
use Irssi 20020101.0250 ();
|
||||
use vars qw($VERSION %IRSSI);
|
||||
$VERSION = "2.1";
|
||||
%IRSSI = (
|
||||
authors => "Timo Sirainen, Ian Peters, David Leadbeater, Bruno Cattáneo",
|
||||
contact => "tss\@iki.fi",
|
||||
name => "Nick Color",
|
||||
description => "assign a different color for each nick",
|
||||
license => "Public Domain",
|
||||
url => "http://irssi.org/",
|
||||
changed => "Mon 08 Jan 21:28:53 BST 2018",
|
||||
);
|
||||
|
||||
# Tweaks to this plugin are:
|
||||
# - Moved irssi folder under $XDG_CONFIG_HOME/irssi/
|
||||
# - changed TABs to spaces
|
||||
|
||||
# Settings:
|
||||
# nickcolor_colors: List of color codes to use.
|
||||
# e.g. /set nickcolor_colors 2 3 4 5 6 7 9 10 11 12 13
|
||||
# (avoid 8, as used for hilights in the default theme).
|
||||
#
|
||||
# nickcolor_enable_prefix: Enables prefix for same nick.
|
||||
#
|
||||
# nickcolor_enable_truncate: Enables nick truncation.
|
||||
#
|
||||
# nickcolor_prefix_text: Prefix text for succesive messages.
|
||||
# e.g. /set nickcolor_prefix_text -
|
||||
#
|
||||
# nickcolor_truncate_value: Truncate nick value.
|
||||
# e.g. /set nickcolor_truncate_value -7
|
||||
# This will truncate nicknames at 7 characters and make them right aligned
|
||||
|
||||
my %saved_colors;
|
||||
my %session_colors = {};
|
||||
my %saved_nicks; # To store each channel's last nickname
|
||||
|
||||
sub load_colors {
|
||||
open my $color_fh, "<", "$ENV{XDG_CONFIG_HOME}/irssi/saved_colors";
|
||||
while (<$color_fh>) {
|
||||
chomp;
|
||||
my($nick, $color) = split ":";
|
||||
$saved_colors{$nick} = $color;
|
||||
}
|
||||
}
|
||||
|
||||
sub save_colors {
|
||||
open COLORS, ">", "$ENV{XDG_CONFIG_HOME}/irssi/saved_colors";
|
||||
|
||||
foreach my $nick (keys %saved_colors) {
|
||||
print COLORS "$nick:$saved_colors{$nick}\n";
|
||||
}
|
||||
|
||||
close COLORS;
|
||||
}
|
||||
|
||||
# If someone we've colored (either through the saved colors, or the hash
|
||||
# function) changes their nick, we'd like to keep the same color associated
|
||||
# with them (but only in the session_colors, ie a temporary mapping).
|
||||
|
||||
sub sig_nick {
|
||||
my ($server, $newnick, $nick, $address) = @_;
|
||||
my $color;
|
||||
|
||||
$newnick = substr ($newnick, 1) if ($newnick =~ /^:/);
|
||||
|
||||
if ($color = $saved_colors{$nick}) {
|
||||
$session_colors{$newnick} = $color;
|
||||
} elsif ($color = $session_colors{$nick}) {
|
||||
$session_colors{$newnick} = $color;
|
||||
}
|
||||
}
|
||||
|
||||
# This gave reasonable distribution values when run across
|
||||
# /usr/share/dict/words
|
||||
|
||||
sub simple_hash {
|
||||
my ($string) = @_;
|
||||
chomp $string;
|
||||
my @chars = split //, $string;
|
||||
my $counter;
|
||||
|
||||
foreach my $char (@chars) {
|
||||
$counter += ord $char;
|
||||
}
|
||||
|
||||
my @colors = split / /, Irssi::settings_get_str('nickcolor_colors');
|
||||
$counter = $colors[$counter % @colors];
|
||||
|
||||
return $counter;
|
||||
}
|
||||
|
||||
# process public (others) messages
|
||||
sub sig_public {
|
||||
my ($server, $msg, $nick, $address, $target) = @_;
|
||||
|
||||
my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix');
|
||||
my $enable_truncate = Irssi::settings_get_bool('nickcolor_enable_truncate');
|
||||
my $prefix_text = Irssi::settings_get_str('nickcolor_prefix_text');
|
||||
my $truncate_value = Irssi::settings_get_int('nickcolor_truncate_value');
|
||||
|
||||
# Reference for server/channel
|
||||
my $tagtarget = "$server->{tag}/$target";
|
||||
|
||||
# Set default nick truncate value to 0 if option is disabled
|
||||
$truncate_value = 0 if (!$enable_truncate);
|
||||
|
||||
# Has the user assigned this nick a color?
|
||||
my $color = $saved_colors{$nick};
|
||||
|
||||
# Have -we- already assigned this nick a color?
|
||||
if (!$color) {
|
||||
$color = $session_colors{$nick};
|
||||
}
|
||||
|
||||
# Let's assign this nick a color
|
||||
if (!$color) {
|
||||
$color = simple_hash $nick;
|
||||
$session_colors{$nick} = $color;
|
||||
}
|
||||
|
||||
$color = sprintf "\003%02d", $color;
|
||||
|
||||
# Optional: We check if it's the same nickname for current target
|
||||
if ($saved_nicks{$tagtarget} eq $nick && $enable_prefix)
|
||||
{
|
||||
# Grouped message
|
||||
Irssi::command('/^format pubmsg ' . $prefix_text . '$1');
|
||||
}
|
||||
else
|
||||
{
|
||||
# Normal message
|
||||
Irssi::command('/^format pubmsg {pubmsgnick $2 {pubnick ' . $color . '$[' . $truncate_value . ']0}}$1');
|
||||
|
||||
# Save nickname for next message
|
||||
$saved_nicks{$tagtarget} = $nick;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# process public (me) messages
|
||||
sub sig_me {
|
||||
my ($server, $msg, $target) = @_;
|
||||
my $nick = $server->{nick};
|
||||
|
||||
my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix');
|
||||
my $enable_truncate = Irssi::settings_get_bool('nickcolor_enable_truncate');
|
||||
my $prefix_text = Irssi::settings_get_str('nickcolor_prefix_text');
|
||||
my $truncate_value = Irssi::settings_get_int('nickcolor_truncate_value');
|
||||
|
||||
# Reference for server/channel
|
||||
my $tagtarget = "$server->{tag}/$target";
|
||||
|
||||
# Set default nick truncate value to 0 if option is disabled
|
||||
$truncate_value = 0 if (!$enable_truncate);
|
||||
|
||||
# Optional: We check if it's the same nickname for current target
|
||||
if ($saved_nicks{$tagtarget} eq $nick && $enable_prefix)
|
||||
{
|
||||
# Grouped message
|
||||
Irssi::command('/^format own_msg ' . $prefix_text . '$1');
|
||||
}
|
||||
else
|
||||
{
|
||||
# Normal message
|
||||
Irssi::command('/^format own_msg {ownmsgnick $2 {ownnick $[' . $truncate_value . ']0}}$1');
|
||||
|
||||
# Save nickname for next message
|
||||
$saved_nicks{$tagtarget} = $nick;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# process public (others) actions
|
||||
sub sig_action_public {
|
||||
my ($server, $msg, $nick, $address, $target) = @_;
|
||||
|
||||
my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix');
|
||||
|
||||
# Reference for server/channel
|
||||
my $tagtarget = "$server->{tag}/$target";
|
||||
|
||||
# Empty current target nick if prefix option is enabled
|
||||
$saved_nicks{$tagtarget} = '' if ($enable_prefix);
|
||||
|
||||
}
|
||||
|
||||
# process public (me) actions
|
||||
sub sig_action_me {
|
||||
my ($server, $msg, $target) = @_;
|
||||
my $nick = $server->{nick};
|
||||
|
||||
my $enable_prefix = Irssi::settings_get_bool('nickcolor_enable_prefix');
|
||||
|
||||
# Reference for server/channel
|
||||
my $tagtarget = "$server->{tag}/$target";
|
||||
|
||||
# Empty current target nick if prefix option is enabled
|
||||
$saved_nicks{$tagtarget} = '' if ($enable_prefix);
|
||||
|
||||
}
|
||||
|
||||
sub cmd_color {
|
||||
my ($data, $server, $witem) = @_;
|
||||
my ($op, $nick, $color) = split " ", $data;
|
||||
|
||||
$op = lc $op;
|
||||
|
||||
if (!$op) {
|
||||
Irssi::print ("No operation given (save/set/clear/list/preview)");
|
||||
} elsif ($op eq "save") {
|
||||
save_colors;
|
||||
} elsif ($op eq "set") {
|
||||
if (!$nick) {
|
||||
Irssi::print ("Nick not given");
|
||||
} elsif (!$color) {
|
||||
Irssi::print ("Color not given");
|
||||
} elsif ($color < 2 || $color > 14) {
|
||||
Irssi::print ("Color must be between 2 and 14 inclusive");
|
||||
} else {
|
||||
$saved_colors{$nick} = $color;
|
||||
}
|
||||
} elsif ($op eq "clear") {
|
||||
if (!$nick) {
|
||||
Irssi::print ("Nick not given");
|
||||
} else {
|
||||
delete ($saved_colors{$nick});
|
||||
}
|
||||
} elsif ($op eq "list") {
|
||||
Irssi::print ("\nSaved Colors:");
|
||||
foreach my $nick (keys %saved_colors) {
|
||||
Irssi::print (chr (3) . sprintf("%02d", $saved_colors{$nick}) . "$nick" .
|
||||
chr (3) . "1 ($saved_colors{$nick})");
|
||||
}
|
||||
} elsif ($op eq "preview") {
|
||||
Irssi::print ("\nAvailable colors:");
|
||||
foreach my $i (2..14) {
|
||||
Irssi::print (chr (3) . "$i" . "Color #$i");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
load_colors;
|
||||
|
||||
Irssi::settings_add_str('misc', 'nickcolor_colors', '2 3 4 5 6 7 9 10 11 12 13');
|
||||
Irssi::settings_add_bool('misc', 'nickcolor_enable_prefix', 0);
|
||||
Irssi::settings_add_bool('misc', 'nickcolor_enable_truncate', 0);
|
||||
Irssi::settings_add_str('misc', 'nickcolor_prefix_text' => '- ');
|
||||
Irssi::settings_add_int('misc', 'nickcolor_truncate_value' => 0);
|
||||
Irssi::command_bind('color', 'cmd_color');
|
||||
|
||||
Irssi::signal_add('message public', 'sig_public');
|
||||
Irssi::signal_add('message own_public', 'sig_me');
|
||||
Irssi::signal_add('message irc action', 'sig_action_public');
|
||||
Irssi::signal_add('message irc own_action', 'sig_action_me');
|
||||
Irssi::signal_add('event nick', 'sig_nick');
|
||||
606
config/irssi/scripts/autorun/trackbar.pl
Normal file
606
config/irssi/scripts/autorun/trackbar.pl
Normal file
@@ -0,0 +1,606 @@
|
||||
## trackbar.pl
|
||||
#
|
||||
# This little script will do just one thing: it will draw a line each time you
|
||||
# switch away from a window. This way, you always know just upto where you've
|
||||
# been reading that window :) It also removes the previous drawn line, so you
|
||||
# don't see double lines.
|
||||
#
|
||||
# redraw trackbar only works on irssi 0.8.17 or higher.
|
||||
#
|
||||
##
|
||||
|
||||
## Usage:
|
||||
#
|
||||
# The script works right out of the box, but if you want you can change
|
||||
# the working by /set'ing the following variables:
|
||||
#
|
||||
# Setting: trackbar_style
|
||||
# Description: This setting will be the color of your trackbar line.
|
||||
# By default the value will be '%K', only Irssi color
|
||||
# formats are allowed. If you don't know the color formats
|
||||
# by heart, you can take a look at the formats documentation.
|
||||
# You will find the proper docs on http://www.irssi.org/docs.
|
||||
#
|
||||
# Setting: trackbar_string
|
||||
# Description: This is the string that your line will display. This can
|
||||
# be multiple characters or just one. For example: '~-~-'
|
||||
# The default setting is '-'.
|
||||
# Here are some unicode characters you can try:
|
||||
# "───" => U+2500 => a line
|
||||
# "═══" => U+2550 => a double line
|
||||
# "━━━" => U+2501 => a wide line
|
||||
# "▭ " => U+25ad => a white rectangle
|
||||
#
|
||||
# Setting: trackbar_use_status_window
|
||||
# Description: If this setting is set to OFF, Irssi won't print a trackbar
|
||||
# in the statuswindow
|
||||
#
|
||||
# Setting: trackbar_ignore_windows
|
||||
# Description: A list of windows where no trackbar should be printed
|
||||
#
|
||||
# Setting: trackbar_print_timestamp
|
||||
# Description: If this setting is set to ON, Irssi will print the formatted
|
||||
# timestamp in front of the trackbar.
|
||||
#
|
||||
# Setting: trackbar_require_seen
|
||||
# Description: Only clear the trackbar if it has been scrolled to.
|
||||
#
|
||||
# Setting: trackbar_all_manual
|
||||
# Description: Never clear the trackbar until you do /mark.
|
||||
#
|
||||
# /mark is a command that will redraw the line at the bottom.
|
||||
#
|
||||
# Command: /trackbar, /trackbar goto
|
||||
# Description: Jump to where the trackbar is, to pick up reading
|
||||
#
|
||||
# Command: /trackbar keep
|
||||
# Description: Keep this window's trackbar where it is the next time
|
||||
# you switch windows (then this flag is cleared again)
|
||||
#
|
||||
# Command: /mark, /trackbar mark
|
||||
# Description: Remove the old trackbar and mark the bottom of this
|
||||
# window with a new trackbar
|
||||
#
|
||||
# Command: /trackbar markvisible
|
||||
# Description: Like mark for all visible windows
|
||||
#
|
||||
# Command: /trackbar markall
|
||||
# Description: Like mark for all windows
|
||||
#
|
||||
# Command: /trackbar remove
|
||||
# Description: Remove this window's trackbar
|
||||
#
|
||||
# Command: /trackbar removeall
|
||||
# Description: Remove all windows' trackbars
|
||||
#
|
||||
# Command: /trackbar redraw
|
||||
# Description: Force redraw of trackbars
|
||||
#
|
||||
##
|
||||
|
||||
##
|
||||
#
|
||||
# For bugreports and other improvements contact one of the authors.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this script; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
##
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use vars qw($VERSION %IRSSI);
|
||||
|
||||
$VERSION = "2.9"; # a4c78e85092a271
|
||||
|
||||
%IRSSI = (
|
||||
authors => "Peter 'kinlo' Leurs, Uwe Dudenhoeffer, " .
|
||||
"Michiel Holtkamp, Nico R. Wohlgemuth, " .
|
||||
"Geert Hauwaerts",
|
||||
contact => 'peter@pfoe.be',
|
||||
patchers => 'Johan Kiviniemi (UTF-8), Uwe Dudenhoeffer (on-upgrade-remove-line)',
|
||||
name => 'trackbar',
|
||||
description => 'Shows a bar where you have last read a window.',
|
||||
license => 'GNU General Public License',
|
||||
url => 'http://www.pfoe.be/~peter/trackbar/',
|
||||
commands => 'trackbar',
|
||||
);
|
||||
|
||||
## Comments and remarks.
|
||||
#
|
||||
# This script uses settings.
|
||||
# Use /SET to change the value or /TOGGLE to switch it on or off.
|
||||
#
|
||||
#
|
||||
# Tip: The command 'trackbar' is very useful if you bind that to a key,
|
||||
# so you can easily jump to the trackbar. Please see 'help bind' for
|
||||
# more information about keybindings in Irssi.
|
||||
#
|
||||
# Command: /BIND meta2-P key F1
|
||||
# /BIND F1 command trackbar
|
||||
#
|
||||
##
|
||||
|
||||
## Bugfixes and new items in this rewrite.
|
||||
#
|
||||
# * Remove all the trackbars before upgrading.
|
||||
# * New setting trackbar_use_status_window to control the statuswindow trackbar.
|
||||
# * New setting trackbar_print_timestamp to print a timestamp or not.
|
||||
# * New command 'trackbar' to scroll up to the trackbar.
|
||||
# * When resizing your terminal, Irssi will update all the trackbars to the new size.
|
||||
# * When changing trackbar settings, change all the trackbars to the new settings.
|
||||
# * New command 'trackbar mark' to draw a new trackbar (The old '/mark').
|
||||
# * New command 'trackbar markall' to draw a new trackbar in each window.
|
||||
# * New command 'trackbar remove' to remove the trackbar from the current window.
|
||||
# * New command 'trackbar removeall' to remove all the trackbars.
|
||||
# * Don't draw a trackbar in empty windows.
|
||||
# * Added a version check to prevent Irssi redraw errors.
|
||||
# * Fixed a bookmark NULL versus 0 bug.
|
||||
# * Fixed a remove-line bug in Uwe Dudenhoeffer his patch.
|
||||
# * New command 'help trackbar' to display the trackbar commands.
|
||||
# * Fixed an Irssi startup bug, now processing each auto-created window.
|
||||
#
|
||||
##
|
||||
|
||||
## Known bugs and the todolist.
|
||||
#
|
||||
# Todo: * Instead of drawing a line, invert the line.
|
||||
#
|
||||
##
|
||||
|
||||
## Authors:
|
||||
#
|
||||
# - Main maintainer & author: Peter 'kinlo' Leurs
|
||||
# - Many thanks to Timo 'cras' Sirainen for placing me on my way
|
||||
# - on-upgrade-remove-line patch by Uwe Dudenhoeffer
|
||||
# - trackbar resizing by Michiel Holtkamp (02 Jul 2012)
|
||||
# - scroll to trackbar, window excludes, and timestamp options by Nico R.
|
||||
# Wohlgemuth (22 Sep 2012)
|
||||
#
|
||||
##
|
||||
|
||||
## Version history:
|
||||
#
|
||||
# 2.9: - fix crash on /mark in empty window
|
||||
# 2.8: - fix /^join bug
|
||||
# 2.7: - add /set trackbar_all_manual option
|
||||
# 2.5: - merge back on scripts.irssi.org
|
||||
# - fix /trackbar redraw broken in 2.4
|
||||
# - fix legacy encodings
|
||||
# - add workaround for irssi issue #271
|
||||
# 2.4: - add support for horizontal splits
|
||||
# 2.3: - add some features for seen tracking using other scripts
|
||||
# 2.0: - big rewrite based on 1.4
|
||||
# * removed /tb, you can have it with /alias tb trackbar if you want
|
||||
# * subcommand and settings changes:
|
||||
# /trackbar vmark => /trackbar markvisible
|
||||
# /trackbar scroll => /trackbar goto (or just /trackbar)
|
||||
# /trackbar help => /help trackbar
|
||||
# /set trackbar_hide_windows => /set trackbar_ignore_windows
|
||||
# /set trackbar_timestamp => /set trackbar_print_timestamp
|
||||
# * magic line strings were removed, just paste the unicode you want!
|
||||
# * trackbar_timestamp_styled is not currently supported
|
||||
# 1.9: - add version guard
|
||||
# 1.8: - sub draw_bar
|
||||
# 1.7: - Added /tb scroll, trackbar_hide_windows, trackbar_timestamp_timestamp
|
||||
# and trackbar_timestamp_styled
|
||||
# 1.6: - Work around Irssi resize bug, please do /upgrade! (see below)
|
||||
# 1.5: - Resize trackbars in all windows when terminal is resized
|
||||
# 1.4: - Changed our's by my's so the irssi script header is valid
|
||||
# - Removed utf-8 support. In theory, the script should work w/o any
|
||||
# problems for utf-8, just set trackbar_string to a valid utf-8 character
|
||||
# and everything *should* work. However, this script is being plagued by
|
||||
# irssi internal bugs. The function Irssi::settings_get_str does NOT handle
|
||||
# unicode strings properly, hence you will notice problems when setting the bar
|
||||
# to a unicode char. For changing your bar to utf-8 symbols, read the line sub.
|
||||
# 1.3: - Upgrade now removes the trackbars.
|
||||
# - Some code cleanups, other defaults
|
||||
# - /mark sets the line to the bottom
|
||||
# 1.2: - Support for utf-8
|
||||
# - How the bar looks can now be configured with trackbar_string
|
||||
# and trackbar_style
|
||||
# 1.1: - Fixed bug when closing window
|
||||
# 1.0: - Initial release
|
||||
#
|
||||
##
|
||||
|
||||
use Irssi;
|
||||
use Irssi::TextUI;
|
||||
use Encode;
|
||||
|
||||
use POSIX qw(strftime);
|
||||
|
||||
sub cmd_help {
|
||||
my ($args) = @_;
|
||||
if ($args =~ /^trackbar *$/i) {
|
||||
print CLIENTCRAP <<HELP
|
||||
%9Syntax:%9
|
||||
|
||||
TRACKBAR
|
||||
TRACKBAR GOTO
|
||||
TRACKBAR KEEP
|
||||
TRACKBAR MARK
|
||||
TRACKBAR MARKVISIBLE
|
||||
TRACKBAR MARKALL
|
||||
TRACKBAR REMOVE
|
||||
TRACKBAR REMOVEALL
|
||||
TRACKBAR REDRAW
|
||||
|
||||
%9Parameters:%9
|
||||
|
||||
GOTO: Jump to where the trackbar is, to pick up reading
|
||||
KEEP: Keep this window's trackbar where it is the next time
|
||||
you switch windows (then this flag is cleared again)
|
||||
MARK: Remove the old trackbar and mark the bottom of this
|
||||
window with a new trackbar
|
||||
MARKVISIBLE: Like mark for all visible windows
|
||||
MARKALL: Like mark for all windows
|
||||
REMOVE: Remove this window's trackbar
|
||||
REMOVEALL: Remove all windows' trackbars
|
||||
REDRAW: Force redraw of trackbars
|
||||
|
||||
%9Description:%9
|
||||
|
||||
Manage a trackbar. Without arguments, it will scroll up to the trackbar.
|
||||
|
||||
%9Examples:%9
|
||||
|
||||
/TRACKBAR MARK
|
||||
/TRACKBAR REMOVE
|
||||
HELP
|
||||
}
|
||||
}
|
||||
|
||||
Irssi::theme_register([
|
||||
'trackbar_loaded', '%R>>%n %_Scriptinfo:%_ Loaded $0 version $1 by $2.',
|
||||
'trackbar_wrong_version', '%R>>%n %_Trackbar:%_ Please upgrade your client to 0.8.17 or above if you would like to use this feature of trackbar.',
|
||||
'trackbar_all_removed', '%R>>%n %_Trackbar:%_ All the trackbars have been removed.',
|
||||
'trackbar_not_found', '%R>>%n %_Trackbar:%_ No trackbar found in this window.',
|
||||
]);
|
||||
|
||||
my $old_irssi = Irssi::version < 20140701;
|
||||
sub check_version {
|
||||
if ($old_irssi) {
|
||||
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'trackbar_wrong_version');
|
||||
return;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
sub is_utf8 {
|
||||
lc Irssi::settings_get_str('term_charset') eq 'utf-8'
|
||||
}
|
||||
|
||||
my (%config, %keep_trackbar, %unseen_trackbar);
|
||||
|
||||
sub remove_one_trackbar {
|
||||
my $win = shift;
|
||||
my $view = shift || $win->view;
|
||||
my $line = $view->get_bookmark('trackbar');
|
||||
if (defined $line) {
|
||||
my $bottom = $view->{bottom};
|
||||
$view->remove_line($line);
|
||||
$win->command('^scrollback end') if $bottom && !$win->view->{bottom};
|
||||
$view->redraw;
|
||||
}
|
||||
}
|
||||
|
||||
sub add_one_trackbar_pt1 {
|
||||
my $win = shift;
|
||||
my $view = shift || $win->view;
|
||||
|
||||
my $last_cur_line = ($view->{buffer}{cur_line}||+{})->{_irssi};
|
||||
$win->print(line($win->{width}), MSGLEVEL_NEVER);
|
||||
|
||||
my $cur_line = ($win->view->{buffer}{cur_line}||+{})->{_irssi}; # get a fresh buffer
|
||||
|
||||
($last_cur_line//'') ne ($cur_line//'') # printing was successful
|
||||
}
|
||||
|
||||
sub add_one_trackbar_pt2 {
|
||||
my $win = shift;
|
||||
my $view = $win->view;
|
||||
|
||||
$view->set_bookmark_bottom('trackbar');
|
||||
$unseen_trackbar{ $win->{_irssi} } = 1;
|
||||
Irssi::signal_emit("window trackbar added", $win);
|
||||
$view->redraw;
|
||||
}
|
||||
|
||||
sub update_one_trackbar {
|
||||
my $win = shift;
|
||||
my $view = shift || $win->view;
|
||||
my $force = shift;
|
||||
my $ignored = win_ignored($win, $view);
|
||||
my $success;
|
||||
|
||||
$success = add_one_trackbar_pt1($win, $view) ? 1 : 0
|
||||
if $force || !$ignored;
|
||||
|
||||
remove_one_trackbar($win, $view)
|
||||
if ( $success || !defined $success ) && ( $force || !defined $force || !$ignored );
|
||||
|
||||
add_one_trackbar_pt2($win)
|
||||
if $success;
|
||||
}
|
||||
|
||||
sub win_ignored {
|
||||
my $win = shift;
|
||||
my $view = shift || $win->view;
|
||||
return 1 unless $view->{buffer}{lines_count};
|
||||
return 1 if $win->{name} eq '(status)' && !$config{use_status_window};
|
||||
no warnings 'uninitialized';
|
||||
return 1 if grep { $win->{name} eq $_ || $win->{refnum} eq $_
|
||||
|| $win->get_active_name eq $_ } @{ $config{ignore_windows} };
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub sig_window_changed {
|
||||
my ($newwindow, $oldwindow) = @_;
|
||||
return unless $oldwindow;
|
||||
redraw_one_trackbar($newwindow) unless $old_irssi;
|
||||
trackbar_update_seen($newwindow);
|
||||
return if delete $keep_trackbar{ $oldwindow->{_irssi} };
|
||||
trackbar_update_seen($oldwindow);
|
||||
return if $config{require_seen} && $unseen_trackbar{ $oldwindow->{_irssi } };
|
||||
return if $config{all_manual};
|
||||
update_one_trackbar($oldwindow, undef, 0);
|
||||
}
|
||||
|
||||
sub trackbar_update_seen {
|
||||
my $win = shift;
|
||||
return unless $win;
|
||||
return unless $unseen_trackbar{ $win->{_irssi} };
|
||||
|
||||
my $view = $win->view;
|
||||
my $line = $view->get_bookmark('trackbar');
|
||||
unless ($line) {
|
||||
delete $unseen_trackbar{ $win->{_irssi} };
|
||||
Irssi::signal_emit("window trackbar seen", $win);
|
||||
return;
|
||||
}
|
||||
my $startline = $view->{startline};
|
||||
return unless $startline;
|
||||
|
||||
if ($startline->{info}{time} < $line->{info}{time}
|
||||
|| $startline->{_irssi} == $line->{_irssi}) {
|
||||
delete $unseen_trackbar{ $win->{_irssi} };
|
||||
Irssi::signal_emit("window trackbar seen", $win);
|
||||
}
|
||||
}
|
||||
|
||||
sub screen_length;
|
||||
{ local $@;
|
||||
eval { require Text::CharWidth; };
|
||||
unless ($@) {
|
||||
*screen_length = sub { Text::CharWidth::mbswidth($_[0]) };
|
||||
}
|
||||
else {
|
||||
*screen_length = sub {
|
||||
my $temp = shift;
|
||||
Encode::_utf8_on($temp) if is_utf8();
|
||||
length($temp)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
{ my %strip_table = (
|
||||
(map { $_ => '' } (split //, '04261537' . 'kbgcrmyw' . 'KBGCRMYW' . 'U9_8I:|FnN>#[' . 'pP')),
|
||||
(map { $_ => $_ } (split //, '{}%')),
|
||||
);
|
||||
sub c_length {
|
||||
my $o = Irssi::strip_codes($_[0]);
|
||||
$o =~ s/(%(%|Z.{6}|z.{6}|X..|x..|.))/exists $strip_table{$2} ? $strip_table{$2} :
|
||||
$2 =~ m{x(?:0[a-f]|[1-6][0-9a-z]|7[a-x])|z[0-9a-f]{6}}i ? '' : $1/gex;
|
||||
screen_length($o)
|
||||
}
|
||||
}
|
||||
|
||||
sub line {
|
||||
my ($width, $time) = @_;
|
||||
my $string = $config{string};
|
||||
$string = ' ' unless length $string;
|
||||
$time ||= time;
|
||||
|
||||
Encode::_utf8_on($string) if is_utf8();
|
||||
my $length = c_length($string);
|
||||
|
||||
my $format = '';
|
||||
if ($config{print_timestamp}) {
|
||||
$format = $config{timestamp_str};
|
||||
$format =~ y/%/\01/;
|
||||
$format =~ s/\01\01/%/g;
|
||||
$format = strftime($format, localtime $time);
|
||||
$format =~ y/\01/%/;
|
||||
}
|
||||
|
||||
my $times = $width / $length;
|
||||
$times += 1 if $times != int $times;
|
||||
my $style = "$config{style}";
|
||||
Encode::_utf8_on($style) if is_utf8();
|
||||
$format .= $style;
|
||||
$width -= c_length($format);
|
||||
$string x= $times;
|
||||
chop $string while length $string && c_length($string) > $width;
|
||||
return $format . $string;
|
||||
}
|
||||
|
||||
sub remove_all_trackbars {
|
||||
for my $window (Irssi::windows) {
|
||||
next unless ref $window;
|
||||
remove_one_trackbar($window);
|
||||
}
|
||||
}
|
||||
|
||||
sub UNLOAD {
|
||||
remove_all_trackbars();
|
||||
}
|
||||
|
||||
sub redraw_one_trackbar {
|
||||
my $win = shift;
|
||||
my $view = $win->view;
|
||||
my $line = $view->get_bookmark('trackbar');
|
||||
return unless $line;
|
||||
my $bottom = $view->{bottom};
|
||||
$win->print_after($line, MSGLEVEL_NEVER, line($win->{width}, $line->{info}{time}),
|
||||
$line->{info}{time});
|
||||
$view->set_bookmark('trackbar', $win->last_line_insert);
|
||||
$view->remove_line($line);
|
||||
$win->command('^scrollback end') if $bottom && !$win->view->{bottom};
|
||||
$view->redraw;
|
||||
}
|
||||
|
||||
sub redraw_trackbars {
|
||||
return unless check_version();
|
||||
for my $win (Irssi::windows) {
|
||||
next unless ref $win;
|
||||
redraw_one_trackbar($win);
|
||||
}
|
||||
}
|
||||
|
||||
sub goto_trackbar {
|
||||
my $win = Irssi::active_win;
|
||||
my $line = $win->view->get_bookmark('trackbar');
|
||||
|
||||
if ($line) {
|
||||
$win->command("scrollback goto ". strftime("%d %H:%M:%S", localtime($line->{info}{time})));
|
||||
} else {
|
||||
$win->printformat(MSGLEVEL_CLIENTCRAP, 'trackbar_not_found');
|
||||
}
|
||||
}
|
||||
|
||||
sub cmd_mark {
|
||||
update_one_trackbar(Irssi::active_win, undef, 1);
|
||||
}
|
||||
|
||||
sub cmd_markall {
|
||||
for my $window (Irssi::windows) {
|
||||
next unless ref $window;
|
||||
update_one_trackbar($window);
|
||||
}
|
||||
}
|
||||
|
||||
sub signal_stop {
|
||||
Irssi::signal_stop;
|
||||
}
|
||||
|
||||
sub cmd_markvisible {
|
||||
my @wins = Irssi::windows;
|
||||
my $awin =
|
||||
my $bwin = Irssi::active_win;
|
||||
my $awin_counter = 0;
|
||||
Irssi::signal_add_priority('window changed' => 'signal_stop', -99);
|
||||
do {
|
||||
Irssi::active_win->command('window up');
|
||||
$awin = Irssi::active_win;
|
||||
update_one_trackbar($awin);
|
||||
++$awin_counter;
|
||||
} until ($awin->{refnum} == $bwin->{refnum} || $awin_counter >= @wins);
|
||||
Irssi::signal_remove('window changed' => 'signal_stop');
|
||||
}
|
||||
|
||||
sub cmd_trackbar_remove_one {
|
||||
remove_one_trackbar(Irssi::active_win);
|
||||
}
|
||||
|
||||
sub cmd_remove_all_trackbars {
|
||||
remove_all_trackbars();
|
||||
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'trackbar_all_removed');
|
||||
}
|
||||
|
||||
sub cmd_keep_once {
|
||||
$keep_trackbar{ Irssi::active_win->{_irssi} } = 1;
|
||||
}
|
||||
|
||||
sub trackbar_runsub {
|
||||
my ($data, $server, $item) = @_;
|
||||
$data =~ s/\s+$//g;
|
||||
|
||||
if ($data) {
|
||||
Irssi::command_runsub('trackbar', $data, $server, $item);
|
||||
} else {
|
||||
goto_trackbar();
|
||||
}
|
||||
}
|
||||
|
||||
sub update_config {
|
||||
my $was_status_window = $config{use_status_window};
|
||||
$config{style} = Irssi::settings_get_str('trackbar_style');
|
||||
$config{string} = Irssi::settings_get_str('trackbar_string');
|
||||
$config{require_seen} = Irssi::settings_get_bool('trackbar_require_seen');
|
||||
$config{all_manual} = Irssi::settings_get_bool('trackbar_all_manual');
|
||||
$config{ignore_windows} = [ split /[,\s]+/, Irssi::settings_get_str('trackbar_ignore_windows') ];
|
||||
$config{use_status_window} = Irssi::settings_get_bool('trackbar_use_status_window');
|
||||
$config{print_timestamp} = Irssi::settings_get_bool('trackbar_print_timestamp');
|
||||
if (defined $was_status_window && $was_status_window != $config{use_status_window}) {
|
||||
if (my $swin = Irssi::window_find_name('(status)')) {
|
||||
if ($config{use_status_window}) {
|
||||
update_one_trackbar($swin);
|
||||
}
|
||||
else {
|
||||
remove_one_trackbar($swin);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($config{print_timestamp}) {
|
||||
my $ts_format = Irssi::settings_get_str('timestamp_format');
|
||||
my $ts_theme = Irssi::current_theme->get_format('fe-common/core', 'timestamp');
|
||||
my $render_str = Irssi::current_theme->format_expand($ts_theme);
|
||||
(my $ts_escaped = $ts_format) =~ s/([%\$])/$1$1/g;
|
||||
$render_str =~ s/(?|\$(.)(?!\w)|\$\{(\w+)\})/$1 eq 'Z' ? $ts_escaped : $1/ge;
|
||||
$config{timestamp_str} = $render_str;
|
||||
}
|
||||
redraw_trackbars() unless $old_irssi;
|
||||
}
|
||||
|
||||
Irssi::settings_add_str('trackbar', 'trackbar_string', is_utf8() ? "\x{2500}" : '-');
|
||||
Irssi::settings_add_str('trackbar', 'trackbar_style', '%K');
|
||||
Irssi::settings_add_str('trackbar', 'trackbar_ignore_windows', '');
|
||||
Irssi::settings_add_bool('trackbar', 'trackbar_use_status_window', 1);
|
||||
Irssi::settings_add_bool('trackbar', 'trackbar_print_timestamp', 0);
|
||||
Irssi::settings_add_bool('trackbar', 'trackbar_require_seen', 0);
|
||||
Irssi::settings_add_bool('trackbar', 'trackbar_all_manual', 0);
|
||||
|
||||
update_config();
|
||||
|
||||
Irssi::signal_add_last( 'mainwindow resized' => 'redraw_trackbars')
|
||||
unless $old_irssi;
|
||||
|
||||
Irssi::signal_register({'window trackbar added' => [qw/Irssi::UI::Window/]});
|
||||
Irssi::signal_register({'window trackbar seen' => [qw/Irssi::UI::Window/]});
|
||||
Irssi::signal_register({'gui page scrolled' => [qw/Irssi::UI::Window/]});
|
||||
Irssi::signal_add_last('gui page scrolled' => 'trackbar_update_seen');
|
||||
|
||||
Irssi::signal_add('setup changed' => 'update_config');
|
||||
Irssi::signal_add_priority('session save' => 'remove_all_trackbars', Irssi::SIGNAL_PRIORITY_HIGH-1);
|
||||
|
||||
Irssi::signal_add('window changed' => 'sig_window_changed');
|
||||
|
||||
Irssi::command_bind('trackbar goto' => 'goto_trackbar');
|
||||
Irssi::command_bind('trackbar keep' => 'cmd_keep_once');
|
||||
Irssi::command_bind('trackbar mark' => 'cmd_mark');
|
||||
Irssi::command_bind('trackbar markvisible' => 'cmd_markvisible');
|
||||
Irssi::command_bind('trackbar markall' => 'cmd_markall');
|
||||
Irssi::command_bind('trackbar remove' => 'cmd_trackbar_remove_one');
|
||||
Irssi::command_bind('trackbar removeall' => 'cmd_remove_all_trackbars');
|
||||
Irssi::command_bind('trackbar redraw' => 'redraw_trackbars');
|
||||
Irssi::command_bind('trackbar' => 'trackbar_runsub');
|
||||
Irssi::command_bind('mark' => 'cmd_mark');
|
||||
Irssi::command_bind_last('help' => 'cmd_help');
|
||||
|
||||
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'trackbar_loaded', $IRSSI{name}, $VERSION, $IRSSI{authors});
|
||||
|
||||
# workaround for issue #271
|
||||
{ package Irssi::Nick }
|
||||
171
config/irssi/scripts/autorun/usercount.pl
Normal file
171
config/irssi/scripts/autorun/usercount.pl
Normal file
@@ -0,0 +1,171 @@
|
||||
use Irssi 20020101.0250 ();
|
||||
$VERSION = "1.16";
|
||||
%IRSSI = (
|
||||
authors => 'David Leadbeater, Timo Sirainen, Georg Lukas',
|
||||
contact => 'dgl@dgl.cx, tss@iki.fi, georg@boerde.de',
|
||||
name => 'usercount',
|
||||
description => 'Adds a usercount for a channel as a statusbar item',
|
||||
license => 'GNU GPLv2 or later',
|
||||
url => 'http://irssi.dgl.yi.org/',
|
||||
);
|
||||
|
||||
# Once you have loaded this script run the following command:
|
||||
# /statusbar window add usercount
|
||||
# You can also add -alignment left|right option
|
||||
|
||||
# /set usercount_show_zero on or off to show users when 0 users of that type
|
||||
# /set usercount_show_ircops (default off)
|
||||
# /set usercount_show_halfops (default on)
|
||||
|
||||
# you can customize the look of this item from theme file:
|
||||
# sb_usercount = "{sb %_$0%_ nicks ($1-)}";
|
||||
# sb_uc_ircops = "%_*%_$*";
|
||||
# sb_uc_ops = "%_@%_$*";
|
||||
# sb_uc_halfops = "%_%%%_$*";
|
||||
# sb_uc_voices = "%_+%_$*";
|
||||
# sb_uc_normal = "$*";
|
||||
# sb_uc_space = " ";
|
||||
|
||||
|
||||
use strict;
|
||||
use Irssi::TextUI;
|
||||
|
||||
my ($ircops, $ops, $halfops, $voices, $normal, $total);
|
||||
my ($timeout_tag, $recalc);
|
||||
|
||||
# Called to make the status bar item
|
||||
sub usercount {
|
||||
my ($item, $get_size_only) = @_;
|
||||
my $wi = !Irssi::active_win() ? undef : Irssi::active_win()->{active};
|
||||
|
||||
if(!ref $wi || $wi->{type} ne "CHANNEL") { # only works on channels
|
||||
return unless ref $item;
|
||||
$item->{min_size} = $item->{max_size} = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if ($recalc) {
|
||||
$recalc = 0;
|
||||
calc_users($wi);
|
||||
}
|
||||
|
||||
my $theme = Irssi::current_theme();
|
||||
my $format = $theme->format_expand("{sb_usercount}");
|
||||
if ($format) {
|
||||
# use theme-specific look
|
||||
my $ircopstr = $theme->format_expand("{sb_uc_ircops $ircops}",
|
||||
Irssi::EXPAND_FLAG_IGNORE_EMPTY);
|
||||
my $opstr = $theme->format_expand("{sb_uc_ops $ops}",
|
||||
Irssi::EXPAND_FLAG_IGNORE_EMPTY);
|
||||
my $halfopstr = $theme->format_expand("{sb_uc_halfops $halfops}",
|
||||
Irssi::EXPAND_FLAG_IGNORE_EMPTY);
|
||||
my $voicestr = $theme->format_expand("{sb_uc_voices $voices}",
|
||||
Irssi::EXPAND_FLAG_IGNORE_EMPTY);
|
||||
my $normalstr = $theme->format_expand("{sb_uc_normal $normal}",
|
||||
Irssi::EXPAND_FLAG_IGNORE_EMPTY);
|
||||
my $space = $theme->format_expand('{sb_uc_space}',
|
||||
Irssi::EXPAND_FLAG_IGNORE_EMPTY);
|
||||
$space = " " unless $space;
|
||||
|
||||
my $str = "";
|
||||
$str .= $ircopstr.$space if defined $ircops;
|
||||
$str .= $opstr.$space if defined $ops;
|
||||
$str .= $halfopstr.$space if defined $halfops;
|
||||
$str .= $voicestr.$space if defined $voices;
|
||||
$str .= $normalstr.$space if defined $normal;
|
||||
$str =~ s/\Q$space\E$//;
|
||||
|
||||
$format = $theme->format_expand("{sb_usercount $total $str}",
|
||||
Irssi::EXPAND_FLAG_IGNORE_REPLACES);
|
||||
} else {
|
||||
# use the default look
|
||||
$format = "{sb \%_$total\%_ nicks \%c(\%n";
|
||||
$format .= '*'.$ircops.' ' if (defined $ircops);
|
||||
$format .= '@'.$ops.' ' if (defined $ops);
|
||||
$format .= '%%'.$halfops.' ' if (defined $halfops);
|
||||
$format .= "+$voices " if (defined $voices);
|
||||
$format .= "$normal " if (defined $normal);
|
||||
$format =~ s/ $//;
|
||||
$format .= "\%c)}";
|
||||
}
|
||||
|
||||
$item->default_handler($get_size_only, $format, undef, 1);
|
||||
}
|
||||
|
||||
sub calc_users() {
|
||||
my $channel = shift;
|
||||
my $server = $channel->{server};
|
||||
|
||||
$ircops = $ops = $halfops = $voices = $normal = 0;
|
||||
for ($channel->nicks()) {
|
||||
if ($_->{serverop}) {
|
||||
$ircops++;
|
||||
}
|
||||
|
||||
if ($_->{op}) {
|
||||
$ops++;
|
||||
} elsif ($_->{halfop}) {
|
||||
$halfops++;
|
||||
} elsif ($_->{voice}) {
|
||||
$voices++;
|
||||
} else {
|
||||
$normal++;
|
||||
}
|
||||
}
|
||||
|
||||
$total = $ops+$halfops+$voices+$normal;
|
||||
if (!Irssi::settings_get_bool('usercount_show_zero')) {
|
||||
$ircops = undef if ($ircops == 0);
|
||||
$ops = undef if ($ops == 0);
|
||||
$halfops = undef if ($halfops == 0);
|
||||
$voices = undef if ($voices == 0);
|
||||
$normal = undef if ($normal == 0);
|
||||
}
|
||||
$halfops = undef unless Irssi::settings_get_bool('usercount_show_halfops');
|
||||
$ircops = undef unless Irssi::settings_get_bool('usercount_show_ircops');
|
||||
}
|
||||
|
||||
sub refresh {
|
||||
if ($timeout_tag > 0) {
|
||||
Irssi::timeout_remove($timeout_tag);
|
||||
$timeout_tag = 0;
|
||||
}
|
||||
Irssi::statusbar_items_redraw('usercount');
|
||||
}
|
||||
|
||||
sub refresh_check {
|
||||
my $channel = shift;
|
||||
my $wi = ref Irssi::active_win() ? Irssi::active_win()->{active} : 0;
|
||||
|
||||
return unless ref $wi && ref $channel;
|
||||
return if $wi->{name} ne $channel->{name};
|
||||
return if $wi->{server}->{tag} ne $channel->{server}->{tag};
|
||||
|
||||
# don't refresh immediately, or we'll end up refreshing
|
||||
# a lot around netsplits
|
||||
$recalc = 1;
|
||||
Irssi::timeout_remove($timeout_tag) if ($timeout_tag > 0);
|
||||
$timeout_tag = Irssi::timeout_add(500, 'refresh', undef);
|
||||
}
|
||||
|
||||
sub refresh_recalc {
|
||||
$recalc = 1;
|
||||
refresh();
|
||||
}
|
||||
|
||||
$recalc = 1;
|
||||
$timeout_tag = 0;
|
||||
|
||||
Irssi::settings_add_bool('usercount', 'usercount_show_zero', 1);
|
||||
Irssi::settings_add_bool('usercount', 'usercount_show_ircops', 0);
|
||||
Irssi::settings_add_bool('usercount', 'usercount_show_halfops', 1);
|
||||
|
||||
Irssi::statusbar_item_register('usercount', undef, 'usercount');
|
||||
Irssi::statusbars_recreate_items();
|
||||
|
||||
Irssi::signal_add_last('nicklist new', 'refresh_check');
|
||||
Irssi::signal_add_last('nicklist remove', 'refresh_check');
|
||||
Irssi::signal_add_last('nick mode changed', 'refresh_check');
|
||||
Irssi::signal_add_last('setup changed', 'refresh_recalc');
|
||||
Irssi::signal_add_last('window changed', 'refresh_recalc');
|
||||
Irssi::signal_add_last('window item changed', 'refresh_recalc');
|
||||
@@ -345,10 +345,16 @@
|
||||
<true/>
|
||||
<key>DisableFullscreenTransparency</key>
|
||||
<true/>
|
||||
<key>EnableDivisionView</key>
|
||||
<true/>
|
||||
<key>HapticFeedbackForEsc</key>
|
||||
<false/>
|
||||
<key>HideActivityIndicator</key>
|
||||
<false/>
|
||||
<key>HideScrollbar</key>
|
||||
<true/>
|
||||
<key>HideTabNumber</key>
|
||||
<false/>
|
||||
<key>HotkeyMigratedFromSingleToMulti</key>
|
||||
<true/>
|
||||
<key>IRMemory</key>
|
||||
@@ -371,208 +377,208 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.35294117647058826</real>
|
||||
<real>0.11764705926179886</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.27843137254901962</real>
|
||||
<real>0.098039217293262482</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.27058823529411763</real>
|
||||
<real>0.078431375324726105</real>
|
||||
</dict>
|
||||
<key>Ansi 1 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.6588235294117647</real>
|
||||
<real>0.16300037503242493</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.54509803921568623</real>
|
||||
<real>0.23660069704055786</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.95294117647058818</real>
|
||||
<real>0.7074432373046875</real>
|
||||
</dict>
|
||||
<key>Ansi 10 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.63137254901960782</real>
|
||||
<real>0.56541937589645386</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.8901960784313725</real>
|
||||
<real>0.9042816162109375</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.65098039215686276</real>
|
||||
<real>0.3450070321559906</real>
|
||||
</dict>
|
||||
<key>Ansi 11 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.68627450980392157</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.88627450980392153</real>
|
||||
<real>0.8833775520324707</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.97647058823529409</real>
|
||||
<real>0.9259033203125</real>
|
||||
</dict>
|
||||
<key>Ansi 12 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.98039215686274506</real>
|
||||
<real>0.9485321044921875</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.70588235294117652</real>
|
||||
<real>0.67044717073440552</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.53725490196078429</real>
|
||||
<real>0.65349078178405762</real>
|
||||
</dict>
|
||||
<key>Ansi 13 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.90588235294117647</real>
|
||||
<real>0.8821563720703125</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.76078431372549016</real>
|
||||
<real>0.4927266538143158</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.96078431372549022</real>
|
||||
<real>0.8821563720703125</real>
|
||||
</dict>
|
||||
<key>Ansi 14 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.83529411764705885</real>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.88627450980392153</real>
|
||||
<real>0.99263292551040649</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.58039215686274515</real>
|
||||
<real>0.37597531080245972</real>
|
||||
</dict>
|
||||
<key>Ansi 15 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.78431372549019607</real>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.67843137254901964</real>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.65098039215686276</real>
|
||||
<real>0.99999600648880005</real>
|
||||
</dict>
|
||||
<key>Ansi 2 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.63137254901960782</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.8901960784313725</real>
|
||||
<real>0.7607843279838562</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.65098039215686276</real>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Ansi 3 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.68627450980392157</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.88627450980392153</real>
|
||||
<real>0.76959484815597534</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.97647058823529409</real>
|
||||
<real>0.78058648109436035</real>
|
||||
</dict>
|
||||
<key>Ansi 4 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.98039215686274506</real>
|
||||
<real>0.78216177225112915</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.70588235294117652</real>
|
||||
<real>0.26474356651306152</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.53725490196078429</real>
|
||||
<real>0.15404300391674042</real>
|
||||
</dict>
|
||||
<key>Ansi 5 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.90588235294117647</real>
|
||||
<real>0.74494361877441406</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.76078431372549016</real>
|
||||
<real>0.24931684136390686</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.96078431372549022</real>
|
||||
<real>0.752197265625</real>
|
||||
</dict>
|
||||
<key>Ansi 6 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.83529411764705885</real>
|
||||
<real>0.78166204690933228</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.88627450980392153</real>
|
||||
<real>0.77425903081893921</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.58039215686274515</real>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Ansi 7 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.87058823529411766</real>
|
||||
<real>0.78104829788208008</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.76078431372549016</real>
|
||||
<real>0.78105825185775757</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.72941176470588232</real>
|
||||
<real>0.7810397744178772</real>
|
||||
</dict>
|
||||
<key>Ansi 8 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.4392156862745098</real>
|
||||
<real>0.4078223705291748</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.35686274509803922</real>
|
||||
<real>0.40782788395881653</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.34509803921568627</real>
|
||||
<real>0.40781760215759277</real>
|
||||
</dict>
|
||||
<key>Ansi 9 Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.6588235294117647</real>
|
||||
<real>0.45833224058151245</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.54509803921568623</real>
|
||||
<real>0.47524076700210571</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.95294117647058818</real>
|
||||
<real>0.8659515380859375</real>
|
||||
</dict>
|
||||
<key>BM Growl</key>
|
||||
<true/>
|
||||
@@ -581,13 +587,13 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.1803921568627451</real>
|
||||
<real>0.12103271484375</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.11764705882352941</real>
|
||||
<real>0.099111050367355347</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.11764705882352941</real>
|
||||
<real>0.0806884765625</real>
|
||||
</dict>
|
||||
<key>Background Image Location</key>
|
||||
<string></string>
|
||||
@@ -596,11 +602,11 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>0.5</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.0</real>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.14910030364990234</real>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
@@ -609,19 +615,19 @@
|
||||
<key>Blur</key>
|
||||
<true/>
|
||||
<key>Blur Radius</key>
|
||||
<real>10</real>
|
||||
<real>20</real>
|
||||
<key>Bold Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.95686274509803926</real>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.83921568627450982</real>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.80392156862745101</real>
|
||||
<real>0.99999600648880005</real>
|
||||
</dict>
|
||||
<key>Character Encoding</key>
|
||||
<integer>4</integer>
|
||||
@@ -631,45 +637,49 @@
|
||||
<integer>130</integer>
|
||||
<key>Command</key>
|
||||
<string></string>
|
||||
<key>Cursor Boost</key>
|
||||
<real>0.19958333333333333</real>
|
||||
<key>Cursor Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.86274509803921573</real>
|
||||
<real>0.99998724460601807</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.8784313725490196</real>
|
||||
<real>1</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.96078431372549022</real>
|
||||
<real>0.99997633695602417</real>
|
||||
</dict>
|
||||
<key>Cursor Guide Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>0.070000000000000007</real>
|
||||
<real>0.25</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.95686274509803926</real>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.83921568627450982</real>
|
||||
<real>0.9268307089805603</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.80392156862745101</real>
|
||||
<real>0.70213186740875244</real>
|
||||
</dict>
|
||||
<key>Cursor Text Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.95686274509803926</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.83921568627450982</real>
|
||||
<real>0.0</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.80392156862745101</real>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Cursor Type</key>
|
||||
<integer>1</integer>
|
||||
<key>Custom Command</key>
|
||||
<string>No</string>
|
||||
<key>Custom Directory</key>
|
||||
@@ -689,18 +699,20 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.95686274509803926</real>
|
||||
<real>0.86198854446411133</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.83921568627450982</real>
|
||||
<real>0.86199951171875</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.80392156862745101</real>
|
||||
<real>0.86197912693023682</real>
|
||||
</dict>
|
||||
<key>Guid</key>
|
||||
<string>B563F48B-314D-48CC-908E-ACA971D430BE</string>
|
||||
<key>Horizontal Spacing</key>
|
||||
<real>1</real>
|
||||
<key>Icon</key>
|
||||
<integer>1</integer>
|
||||
<key>Idle Code</key>
|
||||
<integer>0</integer>
|
||||
<key>Jobs to Ignore</key>
|
||||
@@ -998,14 +1010,16 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.92156862745098034</real>
|
||||
<real>0.9337158203125</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.86274509803921573</real>
|
||||
<real>0.55789834260940552</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.53725490196078429</real>
|
||||
<real>0.19802422821521759</real>
|
||||
</dict>
|
||||
<key>Minimum Contrast</key>
|
||||
<real>0.49644531250000001</real>
|
||||
<key>Mouse Reporting</key>
|
||||
<true/>
|
||||
<key>Name</key>
|
||||
@@ -1029,7 +1043,7 @@
|
||||
<key>Right Option Key Sends</key>
|
||||
<integer>0</integer>
|
||||
<key>Rows</key>
|
||||
<integer>25</integer>
|
||||
<integer>40</integer>
|
||||
<key>Screen</key>
|
||||
<integer>-1</integer>
|
||||
<key>Scrollback Lines</key>
|
||||
@@ -1039,33 +1053,37 @@
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.95686274509803926</real>
|
||||
<real>0.0</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.83921568627450982</real>
|
||||
<real>0.0</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.80392156862745101</real>
|
||||
<real>0.0</real>
|
||||
</dict>
|
||||
<key>Selection Color</key>
|
||||
<dict>
|
||||
<key>Alpha Component</key>
|
||||
<real>1</real>
|
||||
<key>Blue Component</key>
|
||||
<real>0.4392156862745098</real>
|
||||
<real>1</real>
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Green Component</key>
|
||||
<real>0.35686274509803922</real>
|
||||
<real>0.84313726425170898</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.34509803921568627</real>
|
||||
<real>0.70196080207824707</real>
|
||||
</dict>
|
||||
<key>Send Code When Idle</key>
|
||||
<false/>
|
||||
<key>Set Local Environment Vars</key>
|
||||
<false/>
|
||||
<key>Shortcut</key>
|
||||
<string></string>
|
||||
<key>Show Mark Indicators</key>
|
||||
<false/>
|
||||
<key>Show Status Bar</key>
|
||||
<true/>
|
||||
<false/>
|
||||
<key>Show Timestamps</key>
|
||||
<integer>2</integer>
|
||||
<key>Silence Bell</key>
|
||||
@@ -1225,13 +1243,15 @@
|
||||
<key>Terminal Type</key>
|
||||
<string>xterm-256color</string>
|
||||
<key>Transparency</key>
|
||||
<real>0.20000000000000004</real>
|
||||
<real>0.14999999999999997</real>
|
||||
<key>Unlimited Scrollback</key>
|
||||
<true/>
|
||||
<key>Use Bold Font</key>
|
||||
<true/>
|
||||
<key>Use Bright Bold</key>
|
||||
<true/>
|
||||
<key>Use Cursor Guide</key>
|
||||
<false/>
|
||||
<key>Use Italic Font</key>
|
||||
<true/>
|
||||
<key>Use Non-ASCII Font</key>
|
||||
@@ -1291,10 +1311,14 @@
|
||||
<true/>
|
||||
<key>SoundForEsc</key>
|
||||
<false/>
|
||||
<key>SplitPaneDimmingAmount</key>
|
||||
<real>0.29999999999999993</real>
|
||||
<key>StatusBarPosition</key>
|
||||
<integer>0</integer>
|
||||
<key>TabStyleWithAutomaticOption</key>
|
||||
<integer>5</integer>
|
||||
<key>TabsHaveCloseButton</key>
|
||||
<false/>
|
||||
<key>ThreeFingerEmulates</key>
|
||||
<true/>
|
||||
<key>TmuxUnpauseAutomatically</key>
|
||||
|
||||
@@ -1,417 +1,410 @@
|
||||
{
|
||||
"Badge Text" : "",
|
||||
"Working Directory" : "\/Users\/ivuorinen\/Code",
|
||||
"Prompt Before Closing 2" : false,
|
||||
"Selected Text Color" : {
|
||||
"Red Component" : 0.80392156862745101,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.95686274509803926,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.83921568627450982
|
||||
"Badge Text": "",
|
||||
"Working Directory": "/Users/ivuorinen/Code",
|
||||
"Prompt Before Closing 2": false,
|
||||
"Selected Text Color": {
|
||||
"Red Component": 0.80392156862745101,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.95686274509803926,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.83921568627450982
|
||||
},
|
||||
"Rows" : 25,
|
||||
"Ansi 11 Color" : {
|
||||
"Red Component" : 0.97647058823529409,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.68627450980392157,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.88627450980392153
|
||||
"Rows": 25,
|
||||
"Ansi 11 Color": {
|
||||
"Red Component": 0.97647058823529409,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.68627450980392157,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.88627450980392153
|
||||
},
|
||||
"Use Italic Font" : true,
|
||||
"Foreground Color" : {
|
||||
"Red Component" : 0.80392156862745101,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.95686274509803926,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.83921568627450982
|
||||
"Use Italic Font": true,
|
||||
"Foreground Color": {
|
||||
"Red Component": 0.80392156862745101,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.95686274509803926,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.83921568627450982
|
||||
},
|
||||
"Right Option Key Sends" : 0,
|
||||
"Character Encoding" : 4,
|
||||
"Selection Color" : {
|
||||
"Red Component" : 0.34509803921568627,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.4392156862745098,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.35686274509803922
|
||||
"Right Option Key Sends": 0,
|
||||
"Character Encoding": 4,
|
||||
"Selection Color": {
|
||||
"Red Component": 0.34509803921568627,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.4392156862745098,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.35686274509803922
|
||||
},
|
||||
"Blend" : 0.24709154211956524,
|
||||
"Mouse Reporting" : true,
|
||||
"Cursor Boost" : 0,
|
||||
"Ansi 4 Color" : {
|
||||
"Red Component" : 0.53725490196078429,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.98039215686274506,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.70588235294117652
|
||||
"Blend": 0.24709154211956524,
|
||||
"Mouse Reporting": true,
|
||||
"Cursor Boost": 0,
|
||||
"Ansi 4 Color": {
|
||||
"Red Component": 0.53725490196078429,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.98039215686274506,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.70588235294117652
|
||||
},
|
||||
"Non-ASCII Anti Aliased" : true,
|
||||
"Sync Title" : false,
|
||||
"Badge Font" : "JetBrainsMonoNerdFontCompleteM-Bold",
|
||||
"Disable Window Resizing" : true,
|
||||
"Description" : "Default",
|
||||
"Close Sessions On End" : true,
|
||||
"Jobs to Ignore" : [
|
||||
"rlogin",
|
||||
"ssh",
|
||||
"slogin",
|
||||
"telnet"
|
||||
],
|
||||
"Scrollback Lines" : 0,
|
||||
"Draw Powerline Glyphs" : true,
|
||||
"Flashing Bell" : true,
|
||||
"Cursor Guide Color" : {
|
||||
"Red Component" : 0.80392156862745101,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.95686274509803926,
|
||||
"Alpha Component" : 0.070000000000000007,
|
||||
"Green Component" : 0.83921568627450982
|
||||
"Non-ASCII Anti Aliased": true,
|
||||
"Sync Title": false,
|
||||
"Badge Font": "JetBrainsMonoNerdFontCompleteM-Bold",
|
||||
"Disable Window Resizing": true,
|
||||
"Description": "Default",
|
||||
"Close Sessions On End": true,
|
||||
"Jobs to Ignore": ["rlogin", "ssh", "slogin", "telnet"],
|
||||
"Scrollback Lines": 0,
|
||||
"Draw Powerline Glyphs": true,
|
||||
"Flashing Bell": true,
|
||||
"Cursor Guide Color": {
|
||||
"Red Component": 0.80392156862745101,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.95686274509803926,
|
||||
"Alpha Component": 0.070000000000000007,
|
||||
"Green Component": 0.83921568627450982
|
||||
},
|
||||
"BM Growl" : true,
|
||||
"Ansi 3 Color" : {
|
||||
"Red Component" : 0.97647058823529409,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.68627450980392157,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.88627450980392153
|
||||
"BM Growl": true,
|
||||
"Ansi 3 Color": {
|
||||
"Red Component": 0.97647058823529409,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.68627450980392157,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.88627450980392153
|
||||
},
|
||||
"Icon" : 1,
|
||||
"Use Non-ASCII Font" : false,
|
||||
"Link Color" : {
|
||||
"Red Component" : 0.53725490196078429,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.92156862745098034,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.86274509803921573
|
||||
"Icon": 1,
|
||||
"Use Non-ASCII Font": false,
|
||||
"Link Color": {
|
||||
"Red Component": 0.53725490196078429,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.92156862745098034,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.86274509803921573
|
||||
},
|
||||
"Shortcut" : "",
|
||||
"Background Image Location" : "",
|
||||
"Bold Color" : {
|
||||
"Red Component" : 0.80392156862745101,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.95686274509803926,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.83921568627450982
|
||||
"Shortcut": "",
|
||||
"Background Image Location": "",
|
||||
"Bold Color": {
|
||||
"Red Component": 0.80392156862745101,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.95686274509803926,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.83921568627450982
|
||||
},
|
||||
"Use Cursor Guide" : false,
|
||||
"Unlimited Scrollback" : true,
|
||||
"Custom Command" : "No",
|
||||
"Title Components" : 512,
|
||||
"Keyboard Map" : {
|
||||
"0xf700-0x260000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;6A"
|
||||
"Use Cursor Guide": false,
|
||||
"Unlimited Scrollback": true,
|
||||
"Custom Command": "No",
|
||||
"Title Components": 512,
|
||||
"Keyboard Map": {
|
||||
"0xf700-0x260000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;6A"
|
||||
},
|
||||
"0x37-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1f"
|
||||
"0x37-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1f"
|
||||
},
|
||||
"0x32-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x00"
|
||||
"0x32-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x00"
|
||||
},
|
||||
"0xf709-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[17;2~"
|
||||
"0xf709-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[17;2~"
|
||||
},
|
||||
"0xf70c-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[20;2~"
|
||||
"0xf70c-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[20;2~"
|
||||
},
|
||||
"0xf729-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2H"
|
||||
"0xf729-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2H"
|
||||
},
|
||||
"0xf72b-0x40000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;5F"
|
||||
"0xf72b-0x40000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;5F"
|
||||
},
|
||||
"0xf705-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2Q"
|
||||
"0xf705-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2Q"
|
||||
},
|
||||
"0xf703-0x260000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;6C"
|
||||
"0xf703-0x260000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;6C"
|
||||
},
|
||||
"0xf700-0x220000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2A"
|
||||
"0xf700-0x220000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2A"
|
||||
},
|
||||
"0xf701-0x280000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1b 0x1b 0x5b 0x42"
|
||||
"0xf701-0x280000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1b 0x1b 0x5b 0x42"
|
||||
},
|
||||
"0x38-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x7f"
|
||||
"0x38-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x7f"
|
||||
},
|
||||
"0x33-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1b"
|
||||
"0x33-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1b"
|
||||
},
|
||||
"0xf703-0x220000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2C"
|
||||
"0xf703-0x220000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2C"
|
||||
},
|
||||
"0xf701-0x240000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;5B"
|
||||
"0xf701-0x240000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;5B"
|
||||
},
|
||||
"0xf70d-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[21;2~"
|
||||
"0xf70d-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[21;2~"
|
||||
},
|
||||
"0xf702-0x260000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;6D"
|
||||
"0xf702-0x260000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;6D"
|
||||
},
|
||||
"0xf729-0x40000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;5H"
|
||||
"0xf729-0x40000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;5H"
|
||||
},
|
||||
"0xf706-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2R"
|
||||
"0xf706-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2R"
|
||||
},
|
||||
"0x34-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1c"
|
||||
"0x34-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1c"
|
||||
},
|
||||
"0xf700-0x280000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1b 0x1b 0x5b 0x41"
|
||||
"0xf700-0x280000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1b 0x1b 0x5b 0x41"
|
||||
},
|
||||
"0x2d-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1f"
|
||||
"0x2d-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1f"
|
||||
},
|
||||
"0xf70e-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[23;2~"
|
||||
"0xf70e-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[23;2~"
|
||||
},
|
||||
"0xf702-0x220000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2D"
|
||||
"0xf702-0x220000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2D"
|
||||
},
|
||||
"0xf703-0x280000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1b 0x1b 0x5b 0x43"
|
||||
"0xf703-0x280000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1b 0x1b 0x5b 0x43"
|
||||
},
|
||||
"0xf700-0x240000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;5A"
|
||||
"0xf700-0x240000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;5A"
|
||||
},
|
||||
"0xf707-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2S"
|
||||
"0xf707-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2S"
|
||||
},
|
||||
"0xf70a-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[18;2~"
|
||||
"0xf70a-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[18;2~"
|
||||
},
|
||||
"0x35-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1d"
|
||||
"0x35-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1d"
|
||||
},
|
||||
"0xf70f-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[24;2~"
|
||||
"0xf70f-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[24;2~"
|
||||
},
|
||||
"0xf703-0x240000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;5C"
|
||||
"0xf703-0x240000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;5C"
|
||||
},
|
||||
"0xf701-0x260000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;6B"
|
||||
"0xf701-0x260000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;6B"
|
||||
},
|
||||
"0xf702-0x280000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1b 0x1b 0x5b 0x44"
|
||||
"0xf702-0x280000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1b 0x1b 0x5b 0x44"
|
||||
},
|
||||
"0xf72b-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2F"
|
||||
"0xf72b-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2F"
|
||||
},
|
||||
"0x36-0x40000" : {
|
||||
"Action" : 11,
|
||||
"Text" : "0x1e"
|
||||
"0x36-0x40000": {
|
||||
"Action": 11,
|
||||
"Text": "0x1e"
|
||||
},
|
||||
"0xf708-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[15;2~"
|
||||
"0xf708-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[15;2~"
|
||||
},
|
||||
"0xf701-0x220000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2B"
|
||||
"0xf701-0x220000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2B"
|
||||
},
|
||||
"0xf70b-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[19;2~"
|
||||
"0xf70b-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[19;2~"
|
||||
},
|
||||
"0xf702-0x240000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;5D"
|
||||
"0xf702-0x240000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;5D"
|
||||
},
|
||||
"0xf704-0x20000" : {
|
||||
"Action" : 10,
|
||||
"Text" : "[1;2P"
|
||||
"0xf704-0x20000": {
|
||||
"Action": 10,
|
||||
"Text": "[1;2P"
|
||||
}
|
||||
},
|
||||
"Ansi 14 Color" : {
|
||||
"Red Component" : 0.58039215686274515,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.83529411764705885,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.88627450980392153
|
||||
"Ansi 14 Color": {
|
||||
"Red Component": 0.58039215686274515,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.83529411764705885,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.88627450980392153
|
||||
},
|
||||
"Ansi 2 Color" : {
|
||||
"Red Component" : 0.65098039215686276,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.63137254901960782,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.8901960784313725
|
||||
"Ansi 2 Color": {
|
||||
"Red Component": 0.65098039215686276,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.63137254901960782,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.8901960784313725
|
||||
},
|
||||
"Send Code When Idle" : false,
|
||||
"ASCII Anti Aliased" : true,
|
||||
"Tags" : [
|
||||
|
||||
],
|
||||
"Ansi 9 Color" : {
|
||||
"Red Component" : 0.95294117647058818,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.6588235294117647,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.54509803921568623
|
||||
"Send Code When Idle": false,
|
||||
"ASCII Anti Aliased": true,
|
||||
"Tags": [],
|
||||
"Ansi 9 Color": {
|
||||
"Red Component": 0.95294117647058818,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.6588235294117647,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.54509803921568623
|
||||
},
|
||||
"Badge Right Margin" : 10,
|
||||
"Use Bold Font" : true,
|
||||
"Silence Bell" : false,
|
||||
"Ansi 12 Color" : {
|
||||
"Red Component" : 0.53725490196078429,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.98039215686274506,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.70588235294117652
|
||||
"Badge Right Margin": 10,
|
||||
"Use Bold Font": true,
|
||||
"Silence Bell": false,
|
||||
"Ansi 12 Color": {
|
||||
"Red Component": 0.53725490196078429,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.98039215686274506,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.70588235294117652
|
||||
},
|
||||
"Window Type" : 0,
|
||||
"Use Bright Bold" : true,
|
||||
"Cursor Text Color" : {
|
||||
"Red Component" : 0.80392156862745101,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.95686274509803926,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.83921568627450982
|
||||
"Window Type": 0,
|
||||
"Use Bright Bold": true,
|
||||
"Cursor Text Color": {
|
||||
"Red Component": 0.80392156862745101,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.95686274509803926,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.83921568627450982
|
||||
},
|
||||
"Default Bookmark" : "No",
|
||||
"Cursor Color" : {
|
||||
"Red Component" : 0.96078431372549022,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.86274509803921573,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.8784313725490196
|
||||
"Default Bookmark": "No",
|
||||
"Cursor Color": {
|
||||
"Red Component": 0.96078431372549022,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.86274509803921573,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.8784313725490196
|
||||
},
|
||||
"Ansi 1 Color" : {
|
||||
"Red Component" : 0.95294117647058818,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.6588235294117647,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.54509803921568623
|
||||
"Ansi 1 Color": {
|
||||
"Red Component": 0.95294117647058818,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.6588235294117647,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.54509803921568623
|
||||
},
|
||||
"Name" : "Default",
|
||||
"Blinking Cursor" : false,
|
||||
"Guid" : "82636119-EA17-4A26-9AA7-408172F4A9C8",
|
||||
"Badge Max Width" : 0.45000000000000001,
|
||||
"Idle Code" : 0,
|
||||
"Ansi 10 Color" : {
|
||||
"Red Component" : 0.65098039215686276,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.63137254901960782,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.8901960784313725
|
||||
"Name": "Default",
|
||||
"Blinking Cursor": false,
|
||||
"Guid": "82636119-EA17-4A26-9AA7-408172F4A9C8",
|
||||
"Badge Max Width": 0.45000000000000001,
|
||||
"Idle Code": 0,
|
||||
"Ansi 10 Color": {
|
||||
"Red Component": 0.65098039215686276,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.63137254901960782,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.8901960784313725
|
||||
},
|
||||
"Ansi 8 Color" : {
|
||||
"Red Component" : 0.34509803921568627,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.4392156862745098,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.35686274509803922
|
||||
"Ansi 8 Color": {
|
||||
"Red Component": 0.34509803921568627,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.4392156862745098,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.35686274509803922
|
||||
},
|
||||
"Badge Color" : {
|
||||
"Red Component" : 1,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0,
|
||||
"Alpha Component" : 0.5,
|
||||
"Green Component" : 0.14910030364990234
|
||||
"Badge Color": {
|
||||
"Red Component": 1,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0,
|
||||
"Alpha Component": 0.5,
|
||||
"Green Component": 0.14910030364990234
|
||||
},
|
||||
"Smart Cursor Color" : true,
|
||||
"Ambiguous Double Width" : false,
|
||||
"Blur Radius" : 9.5927277260638313,
|
||||
"Badge Max Height" : 0.10000000000000001,
|
||||
"Ansi 0 Color" : {
|
||||
"Red Component" : 0.27058823529411763,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.35294117647058826,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.27843137254901962
|
||||
"Smart Cursor Color": true,
|
||||
"Ambiguous Double Width": false,
|
||||
"Blur Radius": 9.5927277260638313,
|
||||
"Badge Max Height": 0.10000000000000001,
|
||||
"Ansi 0 Color": {
|
||||
"Red Component": 0.27058823529411763,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.35294117647058826,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.27843137254901962
|
||||
},
|
||||
"Blur" : true,
|
||||
"Normal Font" : "JetBrainsMonoNerdFontCompleteM-Light 15",
|
||||
"Vertical Spacing" : 1,
|
||||
"Ansi 7 Color" : {
|
||||
"Red Component" : 0.72941176470588232,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.87058823529411766,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.76078431372549016
|
||||
"Blur": true,
|
||||
"Normal Font": "JetBrainsMonoNerdFontCompleteM-Light 15",
|
||||
"Vertical Spacing": 1,
|
||||
"Ansi 7 Color": {
|
||||
"Red Component": 0.72941176470588232,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.87058823529411766,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.76078431372549016
|
||||
},
|
||||
"Command" : "",
|
||||
"Terminal Type" : "xterm-256color",
|
||||
"Horizontal Spacing" : 1,
|
||||
"Option Key Sends" : 0,
|
||||
"Only The Default BG Color Uses Transparency" : true,
|
||||
"Minimum Contrast" : 0.14973958333333334,
|
||||
"Ansi 15 Color" : {
|
||||
"Red Component" : 0.65098039215686276,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.78431372549019607,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.67843137254901964
|
||||
"Command": "",
|
||||
"Terminal Type": "xterm-256color",
|
||||
"Horizontal Spacing": 1,
|
||||
"Option Key Sends": 0,
|
||||
"Only The Default BG Color Uses Transparency": true,
|
||||
"Minimum Contrast": 0.14973958333333334,
|
||||
"Ansi 15 Color": {
|
||||
"Red Component": 0.65098039215686276,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.78431372549019607,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.67843137254901964
|
||||
},
|
||||
"Ansi 6 Color" : {
|
||||
"Red Component" : 0.58039215686274515,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.83529411764705885,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.88627450980392153
|
||||
"Ansi 6 Color": {
|
||||
"Red Component": 0.58039215686274515,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.83529411764705885,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.88627450980392153
|
||||
},
|
||||
"Badge Top Margin" : 10,
|
||||
"Transparency" : 0.10293218085106381,
|
||||
"Background Color" : {
|
||||
"Red Component" : 0.11764705882352941,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.1803921568627451,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.11764705882352941
|
||||
"Badge Top Margin": 10,
|
||||
"Transparency": 0.10293218085106381,
|
||||
"Background Color": {
|
||||
"Red Component": 0.11764705882352941,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.1803921568627451,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.11764705882352941
|
||||
},
|
||||
"Screen" : -2,
|
||||
"Non Ascii Font" : "Monaco 12",
|
||||
"Ansi 13 Color" : {
|
||||
"Red Component" : 0.96078431372549022,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.90588235294117647,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.76078431372549016
|
||||
"Screen": -2,
|
||||
"Non Ascii Font": "Monaco 12",
|
||||
"Ansi 13 Color": {
|
||||
"Red Component": 0.96078431372549022,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.90588235294117647,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.76078431372549016
|
||||
},
|
||||
"Columns" : 120,
|
||||
"Visual Bell" : true,
|
||||
"ASCII Ligatures" : false,
|
||||
"Ansi 5 Color" : {
|
||||
"Red Component" : 0.96078431372549022,
|
||||
"Color Space" : "sRGB",
|
||||
"Blue Component" : 0.90588235294117647,
|
||||
"Alpha Component" : 1,
|
||||
"Green Component" : 0.76078431372549016
|
||||
"Columns": 120,
|
||||
"Visual Bell": true,
|
||||
"ASCII Ligatures": false,
|
||||
"Ansi 5 Color": {
|
||||
"Red Component": 0.96078431372549022,
|
||||
"Color Space": "sRGB",
|
||||
"Blue Component": 0.90588235294117647,
|
||||
"Alpha Component": 1,
|
||||
"Green Component": 0.76078431372549016
|
||||
},
|
||||
"Custom Directory" : "Yes"
|
||||
}
|
||||
"Custom Directory": "Yes"
|
||||
}
|
||||
|
||||
Submodule config/nvim deleted from 987a7eae5b
8
config/nvim/.gitignore
vendored
Normal file
8
config/nvim/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
3
config/nvim/.luarc.json
Normal file
3
config/nvim/.luarc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"diagnostics.globals": ["vim"]
|
||||
}
|
||||
15
config/nvim/.neoconf.json
Normal file
15
config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
config/nvim/README.md
Normal file
4
config/nvim/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# 💤 LazyVim
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||
2
config/nvim/init.lua
Normal file
2
config/nvim/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user