Compare commits
68 Commits
27a4e03a65
...
waybar
| Author | SHA1 | Date | |
|---|---|---|---|
|
80b0a63b3d
|
|||
|
8864557b02
|
|||
|
f9da29cc0d
|
|||
|
0cbd1bf856
|
|||
|
c905c4cdb6
|
|||
|
6f11a13f1f
|
|||
|
cc7511a954
|
|||
|
0c2dc97daf
|
|||
|
79c6004043
|
|||
|
3753805996
|
|||
|
02be4c6a24
|
|||
|
91275b9688
|
|||
|
29bda01e31
|
|||
|
a41d24ab47
|
|||
|
5c8f94abd6
|
|||
|
58e9f2cc91
|
|||
|
654916042a
|
|||
|
bd1c560b03
|
|||
|
5091854f84
|
|||
|
63358a8f89
|
|||
|
54deab7cab
|
|||
|
af1fe008a1
|
|||
|
00ba9863bc
|
|||
|
374d4a6100
|
|||
|
ce2181f9c2
|
|||
|
621572a3db
|
|||
|
73eaef8411
|
|||
|
3aa8bd8ff1
|
|||
|
e65c556cc5
|
|||
|
360afecb75
|
|||
|
5fb9b3618b
|
|||
|
41fb0c639a
|
|||
|
4b17d5db2d
|
|||
|
cf85fb6372
|
|||
|
475c183ff7
|
|||
|
f39f21b624
|
|||
|
afef09e9a8
|
|||
|
290ed36719
|
|||
|
5fbc0bca6b
|
|||
|
6120bd900f
|
|||
|
71fa00e26b
|
|||
|
1507b0c3c4
|
|||
|
9837828c72
|
|||
|
dbc860d89d
|
|||
|
5cc4dac594
|
|||
|
5de5edca67
|
|||
|
875ee44e7c
|
|||
|
781edd5bf2
|
|||
|
90c71a0316
|
|||
|
d7f8b52c98
|
|||
|
a9fe95254a
|
|||
|
0cadba2ad4
|
|||
|
a1b422e29e
|
|||
|
62ccbf5d4b
|
|||
|
fc639f1fe4
|
|||
|
791500431a
|
|||
|
66bb08a653
|
|||
|
d3bf12cd5e
|
|||
|
170c3acb55
|
|||
|
c269c6e175
|
|||
|
aeaedd8411
|
|||
|
3fd73e311a
|
|||
|
17b524edf4
|
|||
|
afc6af93ca
|
|||
| f1e8dc27e5 | |||
| adde03a577 | |||
| 97843e8958 | |||
| 22de7135d6 |
44
.gitignore
vendored
44
.gitignore
vendored
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
# allow some stuff to be pushed
|
# allow some stuff to be pushed
|
||||||
!alacritty
|
!alacritty
|
||||||
!nvim
|
|
||||||
!.pyenv
|
!.pyenv
|
||||||
|
|
||||||
# zsh
|
# zsh
|
||||||
@@ -17,20 +16,59 @@ zsh/*
|
|||||||
!zsh/.zshrc
|
!zsh/.zshrc
|
||||||
!zsh/.zshenv
|
!zsh/.zshenv
|
||||||
!zsh/.zprofile
|
!zsh/.zprofile
|
||||||
|
!zsh/.zsh_plugins*.txt
|
||||||
!zsh/scripts.zsh
|
!zsh/scripts.zsh
|
||||||
!zsh/aliases.zsh
|
!zsh/aliases.zsh
|
||||||
!zsh/completions/.keep
|
!zsh/completions/.keep
|
||||||
!zsh/.p10k.zsh
|
!zsh/ssh-menu
|
||||||
|
!zsh/get-dump
|
||||||
|
|
||||||
|
# starship
|
||||||
|
!starship
|
||||||
|
starship/*
|
||||||
|
!starship/config.toml
|
||||||
|
|
||||||
# tmux
|
# tmux
|
||||||
!tmux
|
!tmux
|
||||||
tmux/*
|
tmux/*
|
||||||
!tmux/tmux.conf
|
!tmux/tmux.conf
|
||||||
|
!tmux/tmux-new-project
|
||||||
!tmux/tmux-sessionizer
|
!tmux/tmux-sessionizer
|
||||||
|
!tmux/tmux-ggclone
|
||||||
|
!tmux/tmux-ssher
|
||||||
|
|
||||||
# git
|
# git
|
||||||
!git
|
!git
|
||||||
git/*
|
git/*
|
||||||
!git/config
|
!git/config
|
||||||
!git/gitignore
|
!git/ignore
|
||||||
!git/aflabs
|
!git/aflabs
|
||||||
|
|
||||||
|
# ghostty
|
||||||
|
!ghostty
|
||||||
|
ghostty/*
|
||||||
|
!ghostty/config
|
||||||
|
!ghostty/themes
|
||||||
|
|
||||||
|
# sway
|
||||||
|
!sway
|
||||||
|
sway/*
|
||||||
|
!sway/config
|
||||||
|
!sway/config.d
|
||||||
|
!sway/host.d
|
||||||
|
|
||||||
|
!swaylock
|
||||||
|
swaylock/*
|
||||||
|
!swaylock/config
|
||||||
|
|
||||||
|
!swayidle
|
||||||
|
swayidle/*
|
||||||
|
!swayidle/config
|
||||||
|
|
||||||
|
!waybar
|
||||||
|
!bin
|
||||||
|
|
||||||
|
# flameshot
|
||||||
|
!flameshot
|
||||||
|
flameshot/*
|
||||||
|
!flameshot/flameshot.ini
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
|||||||
[submodule "nvim"]
|
|
||||||
path = nvim
|
|
||||||
url = git@git.janezic.dev:janezicmatej/nvim.git
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Neovim should be able to run anywhere
|
# Neovim should be able to run anywhere
|
||||||
neovim
|
pynvim
|
||||||
|
|
||||||
# Upgrade pip while we're at it.
|
# Upgrade pip while we're at it.
|
||||||
pip
|
pip
|
||||||
|
|||||||
77
README.md
77
README.md
@@ -1,21 +1,62 @@
|
|||||||
# .dotfiles
|
# .dotfiles
|
||||||
|
|
||||||
## setup cheat sheet
|
## Alacritty
|
||||||
|
|
||||||
- install [alacritty](https://github.com/alacritty/alacritty)
|
Install [alacritty](https://github.com/alacritty/alacritty) and `JetBrainsMono` font from [nerd-fonts](https://github.com/ryanoasis/nerd-fonts)
|
||||||
- install `JetBrainsMonoNL` font from [nerd-fonts](https://github.com/ryanoasis/nerd-fonts)
|
|
||||||
- install [zsh](https://www.zsh.org/)
|
## ZSH
|
||||||
- install [oh-my-zsh](https://ohmyz.sh/)
|
|
||||||
- install [zsh-nvm](https://github.com/lukechilds/zsh-nvm)
|
Install [zsh](https://www.zsh.org/).
|
||||||
- install [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)
|
|
||||||
- install [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting)
|
### $ZDOTDIR
|
||||||
- install [go](https://go.dev/)
|
|
||||||
- install [ggman](https://github.com/tkw1536/ggman)
|
To change the location of zsh config files run one of these
|
||||||
- install [pyenv](https://github.com/pyenv/pyenv) to $XDG_DATA_HOME/.pyenv
|
|
||||||
- set `PYENV_ROOT` and use [pyenv-installer](https://github.com/pyenv/pyenv-installer)
|
```sh
|
||||||
- install [pyenv-default-packages](https://github.com/jawshooah/pyenv-default-packages.git)
|
# for linux
|
||||||
- symlink `.pyenv/default-packages` to `$PYENV_ROOT/default-packages`
|
echo 'export ZDOTDIR="$HOME/.config/zsh"' > /etc/zsh/zshenv
|
||||||
- install [neovim](https://neovim.io/)
|
# for macos
|
||||||
- follow `README.md` in [janezicmatej/nvim](https://github.com/janezicmatej/nvim/)
|
echo 'export ZDOTDIR="$HOME/.config/zsh"' > /etc/zshenv
|
||||||
- install [tmux](https://github.com/tmux/tmux)
|
```
|
||||||
- install [tmp](https://github.com/tmux-plugins/tpm) for plugins
|
|
||||||
|
### Antigen
|
||||||
|
|
||||||
|
Install [antigen](https://github.com/zsh-users/antigen)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl -L git.io/antigen > antigen.zsh
|
||||||
|
# or use git.io/antigen-nightly for the latest version
|
||||||
|
```
|
||||||
|
|
||||||
|
## Go
|
||||||
|
|
||||||
|
Install [go](https://go.dev/) as it is required for building `ggman`
|
||||||
|
|
||||||
|
## ggman
|
||||||
|
|
||||||
|
Create `$HOME/git` directory (`$GGROOT` is set to here) and install [ggman](https://github.com/tkw1536/ggman)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/tkw1536/ggman $HOME/git/ggman
|
||||||
|
cd $HOME/git/ggman
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
## pyenv
|
||||||
|
|
||||||
|
Install [pyenv](https://github.com/pyenv/pyenv) to `$XDG_DATA_HOME/.pyenv` (this is already taken care for in `.zshenv`) using [pyenv-installer](https://github.com/pyenv/pyenv-installer) and install [build-dependencies](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
|
||||||
|
|
||||||
|
### pyenv-default-packages
|
||||||
|
Install [pyenv-default-packages](https://github.com/jawshooah/pyenv-default-packages.git) as pyenv plugin and symlink `.pyenv/default-packages` to `$PYENV_ROOT`
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/jawshooah/pyenv-default-packages.git $(pyenv root)/plugins/pyenv-default-packages
|
||||||
|
ln -s "$XDG_CONFIG_HOME/.pyenv/default-packages" "$(pyenv root)/default-packages"
|
||||||
|
```
|
||||||
|
|
||||||
|
## neovim
|
||||||
|
Install [neovim](https://neovim.io/) and follow `README.md` in [git.janezic.dev/janezicmatej/nvim](https://git.janezic.dev/janezicmatej/nvim/)
|
||||||
|
|
||||||
|
## tmux
|
||||||
|
Install [tmux](https://github.com/tmux/tmux) and [`fzf`](https://github.com/junegunn/fzf) for `tmux-sessionizer`
|
||||||
|
|||||||
82
alacritty/alacritty.toml
Normal file
82
alacritty/alacritty.toml
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
[colors]
|
||||||
|
draw_bold_text_with_bright_colors = true
|
||||||
|
|
||||||
|
[colors.bright]
|
||||||
|
black = "0x45403d"
|
||||||
|
blue = "0x7daea3"
|
||||||
|
cyan = "0x89b482"
|
||||||
|
green = "0xa9b665"
|
||||||
|
magenta = "0xd3869b"
|
||||||
|
red = "0xea6962"
|
||||||
|
white = "0xd4be98"
|
||||||
|
yellow = "0xd8a657"
|
||||||
|
|
||||||
|
[colors.normal]
|
||||||
|
black = "0x45403d"
|
||||||
|
blue = "0x7daea3"
|
||||||
|
cyan = "0x89b482"
|
||||||
|
green = "0xa9b665"
|
||||||
|
magenta = "0xd3869b"
|
||||||
|
red = "0xea6962"
|
||||||
|
white = "0xd4be98"
|
||||||
|
yellow = "0xd8a657"
|
||||||
|
|
||||||
|
[colors.primary]
|
||||||
|
background = "0x32302f"
|
||||||
|
foreground = "0xd4be98"
|
||||||
|
|
||||||
|
[cursor]
|
||||||
|
unfocused_hollow = true
|
||||||
|
|
||||||
|
[cursor.style]
|
||||||
|
blinking = "On"
|
||||||
|
shape = "Block"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
TERM = "xterm-256color"
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 15
|
||||||
|
|
||||||
|
[font.bold]
|
||||||
|
family = "JetBrainsMono Nerd Font"
|
||||||
|
style = "Bold"
|
||||||
|
|
||||||
|
[font.bold_italic]
|
||||||
|
family = "JetBrainsMono Nerd Font"
|
||||||
|
style = "Bold Italic"
|
||||||
|
|
||||||
|
[font.italic]
|
||||||
|
family = "JetBrainsMono Nerd Font"
|
||||||
|
style = "Italic"
|
||||||
|
|
||||||
|
[font.normal]
|
||||||
|
family = "JetBrainsMono Nerd Font"
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
chars = "\f"
|
||||||
|
key = "R"
|
||||||
|
mode = "~Vi|~Search"
|
||||||
|
mods = "Command"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ScrollPageUp"
|
||||||
|
key = "PageUp"
|
||||||
|
mode = "~Alt"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ScrollPageDown"
|
||||||
|
key = "PageDown"
|
||||||
|
mode = "~Alt"
|
||||||
|
|
||||||
|
[scrolling]
|
||||||
|
history = 10000
|
||||||
|
|
||||||
|
[window]
|
||||||
|
dynamic_title = true
|
||||||
|
option_as_alt = "Both"
|
||||||
|
|
||||||
|
[window.dimensions]
|
||||||
|
columns = 150
|
||||||
|
lines = 36
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
# https://gist.github.com/sainnhe/ad5cbc4f05c4ced83f80e54d9a75d22f
|
|
||||||
colors:
|
|
||||||
primary:
|
|
||||||
background: '0x32302f'
|
|
||||||
foreground: '0xd4be98'
|
|
||||||
normal:
|
|
||||||
black: '0x45403d'
|
|
||||||
red: '0xea6962'
|
|
||||||
green: '0xa9b665'
|
|
||||||
yellow: '0xd8a657'
|
|
||||||
blue: '0x7daea3'
|
|
||||||
magenta: '0xd3869b'
|
|
||||||
cyan: '0x89b482'
|
|
||||||
white: '0xd4be98'
|
|
||||||
bright:
|
|
||||||
black: '0x45403d'
|
|
||||||
red: '0xea6962'
|
|
||||||
green: '0xa9b665'
|
|
||||||
yellow: '0xd8a657'
|
|
||||||
blue: '0x7daea3'
|
|
||||||
magenta: '0xd3869b'
|
|
||||||
cyan: '0x89b482'
|
|
||||||
white: '0xd4be98'
|
|
||||||
|
|
||||||
# Any items in the `env` entry below will be added as
|
|
||||||
# environment variables. Some entries may override variables
|
|
||||||
# set by alacritty itself.
|
|
||||||
env:
|
|
||||||
TERM: xterm-256color
|
|
||||||
|
|
||||||
window:
|
|
||||||
# window dimensions
|
|
||||||
dimensions:
|
|
||||||
columns: 150
|
|
||||||
lines: 36
|
|
||||||
|
|
||||||
# allow programs to dynamically change title
|
|
||||||
dynamic_title: true
|
|
||||||
|
|
||||||
scrolling:
|
|
||||||
# Maximum number of lines in the scrollback buffer.
|
|
||||||
history: 10000
|
|
||||||
|
|
||||||
# https://github.com/ryanoasis/nerd-fonts
|
|
||||||
font:
|
|
||||||
size: 14
|
|
||||||
|
|
||||||
normal:
|
|
||||||
family: JetBrainsMonoNL Nerd Font
|
|
||||||
style: Regular
|
|
||||||
|
|
||||||
italic:
|
|
||||||
family: JetBrainsMonoNL Nerd Font
|
|
||||||
style: Italic
|
|
||||||
|
|
||||||
bold:
|
|
||||||
family: JetBrainsMonoNL Nerd Font
|
|
||||||
style: Bold
|
|
||||||
|
|
||||||
bold_italic:
|
|
||||||
family: JetBrainsMonoNL Nerd Font
|
|
||||||
style: Bold Italic
|
|
||||||
|
|
||||||
draw_bold_text_with_bright_colors: true
|
|
||||||
|
|
||||||
cursor:
|
|
||||||
unfocused_hollow: true
|
|
||||||
style:
|
|
||||||
shape: Block
|
|
||||||
blinking: On
|
|
||||||
|
|
||||||
key_bindings:
|
|
||||||
- { key: R, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
|
|
||||||
- { key: PageUp, mode: ~Alt, action: ScrollPageUp }
|
|
||||||
- { key: PageDown, mode: ~Alt, action: ScrollPageDown }
|
|
||||||
# remap option to alt for mac
|
|
||||||
- { key: A, mods: Alt, chars: "\x1ba" }
|
|
||||||
- { key: B, mods: Alt, chars: "\x1bb" }
|
|
||||||
- { key: C, mods: Alt, chars: "\x1bc" }
|
|
||||||
- { key: D, mods: Alt, chars: "\x1bd" }
|
|
||||||
- { key: E, mods: Alt, chars: "\x1be" }
|
|
||||||
- { key: F, mods: Alt, chars: "\x1bf" }
|
|
||||||
- { key: G, mods: Alt, chars: "\x1bg" }
|
|
||||||
- { key: H, mods: Alt, chars: "\x1bh" }
|
|
||||||
- { key: I, mods: Alt, chars: "\x1bi" }
|
|
||||||
- { key: J, mods: Alt, chars: "\x1bj" }
|
|
||||||
- { key: K, mods: Alt, chars: "\x1bk" }
|
|
||||||
- { key: L, mods: Alt, chars: "\x1bl" }
|
|
||||||
- { key: M, mods: Alt, chars: "\x1bm" }
|
|
||||||
- { key: N, mods: Alt, chars: "\x1bn" }
|
|
||||||
- { key: O, mods: Alt, chars: "\x1bo" }
|
|
||||||
- { key: P, mods: Alt, chars: "\x1bp" }
|
|
||||||
- { key: Q, mods: Alt, chars: "\x1bq" }
|
|
||||||
- { key: R, mods: Alt, chars: "\x1br" }
|
|
||||||
- { key: S, mods: Alt, chars: "\x1bs" }
|
|
||||||
- { key: T, mods: Alt, chars: "\x1bt" }
|
|
||||||
- { key: U, mods: Alt, chars: "\x1bu" }
|
|
||||||
- { key: V, mods: Alt, chars: "\x1bv" }
|
|
||||||
- { key: W, mods: Alt, chars: "\x1bw" }
|
|
||||||
- { key: X, mods: Alt, chars: "\x1bx" }
|
|
||||||
- { key: Y, mods: Alt, chars: "\x1by" }
|
|
||||||
- { key: Z, mods: Alt, chars: "\x1bz" }
|
|
||||||
- { key: A, mods: Alt|Shift, chars: "\x1bA" }
|
|
||||||
- { key: B, mods: Alt|Shift, chars: "\x1bB" }
|
|
||||||
- { key: C, mods: Alt|Shift, chars: "\x1bC" }
|
|
||||||
- { key: D, mods: Alt|Shift, chars: "\x1bD" }
|
|
||||||
- { key: E, mods: Alt|Shift, chars: "\x1bE" }
|
|
||||||
- { key: F, mods: Alt|Shift, chars: "\x1bF" }
|
|
||||||
- { key: G, mods: Alt|Shift, chars: "\x1bG" }
|
|
||||||
- { key: H, mods: Alt|Shift, chars: "\x1bH" }
|
|
||||||
- { key: I, mods: Alt|Shift, chars: "\x1bI" }
|
|
||||||
- { key: J, mods: Alt|Shift, chars: "\x1bJ" }
|
|
||||||
- { key: K, mods: Alt|Shift, chars: "\x1bK" }
|
|
||||||
- { key: L, mods: Alt|Shift, chars: "\x1bL" }
|
|
||||||
- { key: M, mods: Alt|Shift, chars: "\x1bM" }
|
|
||||||
- { key: N, mods: Alt|Shift, chars: "\x1bN" }
|
|
||||||
- { key: O, mods: Alt|Shift, chars: "\x1bO" }
|
|
||||||
- { key: P, mods: Alt|Shift, chars: "\x1bP" }
|
|
||||||
- { key: Q, mods: Alt|Shift, chars: "\x1bQ" }
|
|
||||||
- { key: R, mods: Alt|Shift, chars: "\x1bR" }
|
|
||||||
- { key: S, mods: Alt|Shift, chars: "\x1bS" }
|
|
||||||
- { key: T, mods: Alt|Shift, chars: "\x1bT" }
|
|
||||||
- { key: U, mods: Alt|Shift, chars: "\x1bU" }
|
|
||||||
- { key: V, mods: Alt|Shift, chars: "\x1bV" }
|
|
||||||
- { key: W, mods: Alt|Shift, chars: "\x1bW" }
|
|
||||||
- { key: X, mods: Alt|Shift, chars: "\x1bX" }
|
|
||||||
- { key: Y, mods: Alt|Shift, chars: "\x1bY" }
|
|
||||||
- { key: Z, mods: Alt|Shift, chars: "\x1bZ" }
|
|
||||||
- { key: Key1, mods: Alt, chars: "\x1b1" }
|
|
||||||
- { key: Key2, mods: Alt, chars: "\x1b2" }
|
|
||||||
- { key: Key3, mods: Alt, chars: "\x1b3" }
|
|
||||||
- { key: Key4, mods: Alt, chars: "\x1b4" }
|
|
||||||
- { key: Key5, mods: Alt, chars: "\x1b5" }
|
|
||||||
- { key: Key6, mods: Alt, chars: "\x1b6" }
|
|
||||||
- { key: Key7, mods: Alt, chars: "\x1b7" }
|
|
||||||
- { key: Key8, mods: Alt, chars: "\x1b8" }
|
|
||||||
- { key: Key9, mods: Alt, chars: "\x1b9" }
|
|
||||||
- { key: Key0, mods: Alt, chars: "\x1b0" }
|
|
||||||
- { key: Space, mods: Control, chars: "\x00" } # Ctrl + Space
|
|
||||||
- { key: Grave, mods: Alt, chars: "\x1b`" } # Alt + `
|
|
||||||
- { key: Grave, mods: Alt|Shift, chars: "\x1b~" } # Alt + ~
|
|
||||||
- { key: Period, mods: Alt, chars: "\x1b." } # Alt + .
|
|
||||||
- { key: Key8, mods: Alt|Shift, chars: "\x1b*" } # Alt + *
|
|
||||||
- { key: Key3, mods: Alt|Shift, chars: "\x1b#" } # Alt + #
|
|
||||||
- { key: Period, mods: Alt|Shift, chars: "\x1b>" } # Alt + >
|
|
||||||
- { key: Comma, mods: Alt|Shift, chars: "\x1b<" } # Alt + <
|
|
||||||
- { key: Minus, mods: Alt|Shift, chars: "\x1b_" } # Alt + _
|
|
||||||
- { key: Key5, mods: Alt|Shift, chars: "\x1b%" } # Alt + %
|
|
||||||
- { key: Key6, mods: Alt|Shift, chars: "\x1b^" } # Alt + ^
|
|
||||||
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
|
|
||||||
- { key: Backslash, mods: Alt|Shift, chars: "\x1b|" } # Alt + |
|
|
||||||
|
|
||||||
34
bin/waybar-custom-cider.sh
Executable file
34
bin/waybar-custom-cider.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
url="http://localhost:10767/api/v1/playback"
|
||||||
|
|
||||||
|
status_raw=$(curl -s --max-time 2 "$url/is-playing")
|
||||||
|
|
||||||
|
# CASE 1: API is totally unreachable (App closed)
|
||||||
|
if [[ -z "$status_raw" ]]; then
|
||||||
|
echo '{"text": "offline", "class": "offline", "alt": "offline"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract playing status, defaulting to false if null
|
||||||
|
is_playing=$(echo "$status_raw" | jq -r '.is_playing // false')
|
||||||
|
|
||||||
|
# 2. Get song info
|
||||||
|
info_raw=$(curl -s --max-time 2 "$url/now-playing")
|
||||||
|
|
||||||
|
# CASE 2 & 3: Handle empty metadata vs. active metadata
|
||||||
|
echo "$info_raw" | jq -c \
|
||||||
|
--argjson is_playing "$is_playing" \
|
||||||
|
'
|
||||||
|
# Helper function to escape & for Pango
|
||||||
|
def pango_escape: sub("&"; "&"; "g");
|
||||||
|
|
||||||
|
if (.info.name == null or .info.name == "") then
|
||||||
|
{text: "idle", class: "paused"}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text: "\(.info.name | pango_escape) - \(.info.artistName | pango_escape)",
|
||||||
|
tooltip: "\(.info.albumName | pango_escape // "Unknown")",
|
||||||
|
class: (if $is_playing then "playing" else "paused" end)
|
||||||
|
}
|
||||||
|
end'
|
||||||
16
flameshot/flameshot.ini
Normal file
16
flameshot/flameshot.ini
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[General]
|
||||||
|
contrastOpacity=188
|
||||||
|
contrastUiColor=#000000
|
||||||
|
disabledGrimWarning=true
|
||||||
|
drawColor=#00ffff
|
||||||
|
saveAfterCopy=true
|
||||||
|
savePath=/home/matej/screens
|
||||||
|
showHelp=false
|
||||||
|
showMagnifier=true
|
||||||
|
showSelectionGeometryHideTime=3000
|
||||||
|
uiColor=#ffffff
|
||||||
|
useGrimAdapter=true
|
||||||
|
|
||||||
|
[Shortcuts]
|
||||||
|
TYPE_ACCEPT=
|
||||||
|
TYPE_COPY=Space
|
||||||
46
ghostty/config
Normal file
46
ghostty/config
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# theme
|
||||||
|
# theme = light:gruvbox-material-soft-light,dark:gruvbox-material-soft-dark
|
||||||
|
theme = gruvbox-material-soft-dark
|
||||||
|
|
||||||
|
minimum-contrast = 1.1
|
||||||
|
|
||||||
|
# cursor
|
||||||
|
cursor-style = block
|
||||||
|
cursor-style-blink = true
|
||||||
|
|
||||||
|
# mouse
|
||||||
|
mouse-hide-while-typing = true
|
||||||
|
|
||||||
|
# font stuff
|
||||||
|
font-family = JetBrainsMono Nerd Font
|
||||||
|
font-size = 15
|
||||||
|
|
||||||
|
# disable ligatures
|
||||||
|
font-feature=-calt
|
||||||
|
font-feature=-liga
|
||||||
|
font-feature=-dlig
|
||||||
|
|
||||||
|
# window
|
||||||
|
window-theme = dark
|
||||||
|
window-height = 36
|
||||||
|
window-width = 150
|
||||||
|
|
||||||
|
# macos send option as alt
|
||||||
|
macos-option-as-alt = true
|
||||||
|
|
||||||
|
# no warning full close
|
||||||
|
confirm-close-surface = false
|
||||||
|
# quit-after-last-window-closed = true
|
||||||
|
|
||||||
|
# keybinds
|
||||||
|
keybind = global:cmd+enter=new_window
|
||||||
|
|
||||||
|
# shell integrations for zsh
|
||||||
|
# https://ghostty.org/docs/features/shell-integration
|
||||||
|
shell-integration = zsh
|
||||||
|
|
||||||
|
# gtk
|
||||||
|
gtk-titlebar = false
|
||||||
|
|
||||||
|
# paste protection
|
||||||
|
clipboard-paste-protection = false
|
||||||
21
ghostty/themes/gruvbox-material-soft-dark
Normal file
21
ghostty/themes/gruvbox-material-soft-dark
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
palette = 0=252423
|
||||||
|
palette = 1=#ea6962
|
||||||
|
palette = 2=#a9b665
|
||||||
|
palette = 3=#d8a657
|
||||||
|
palette = 4=#7daea3
|
||||||
|
palette = 5=#d3869b
|
||||||
|
palette = 6=#89b482
|
||||||
|
palette = 7=#d4be98
|
||||||
|
palette = 8=#32302f
|
||||||
|
palette = 9=#ea6962
|
||||||
|
palette = 10=#a9b665
|
||||||
|
palette = 11=#d8a657
|
||||||
|
palette = 12=#7daea3
|
||||||
|
palette = 13=#d3869b
|
||||||
|
palette = 14=#89b482
|
||||||
|
palette = 15=#d4be98
|
||||||
|
background = #32302f
|
||||||
|
foreground = #d4be98
|
||||||
|
cursor-color = #d4be98
|
||||||
|
selection-background = #45403d
|
||||||
|
selection-foreground = #d4be98
|
||||||
21
ghostty/themes/gruvbox-material-soft-light
Normal file
21
ghostty/themes/gruvbox-material-soft-light
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
palette = 0=#ebdbb2
|
||||||
|
palette = 1=#c14a4a
|
||||||
|
palette = 2=#6c782e
|
||||||
|
palette = 3=#b47109
|
||||||
|
palette = 4=#45707a
|
||||||
|
palette = 5=#945e80
|
||||||
|
palette = 6=#4c7a5d
|
||||||
|
palette = 7=#654735
|
||||||
|
palette = 8=#f3eac7
|
||||||
|
palette = 9=#c14a4a
|
||||||
|
palette = 10=#6c782e
|
||||||
|
palette = 11=#b47109
|
||||||
|
palette = 12=#45707a
|
||||||
|
palette = 13=#945e80
|
||||||
|
palette = 14=#4c7a5d
|
||||||
|
palette = 15=#654735
|
||||||
|
background = #f2e5bc
|
||||||
|
foreground = #654735
|
||||||
|
cursor-color = #654735
|
||||||
|
selection-background = #ebdbb2
|
||||||
|
selection-foreground = #654735
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = Matej Janežič
|
|
||||||
email = matej.janezic@aflabs.si
|
|
||||||
58
git/config
58
git/config
@@ -1,16 +1,56 @@
|
|||||||
|
[includeIf "gitdir:~/Desktop/git/git.aflabs.org/"]
|
||||||
|
path = ~/.config/git/config.d/aflabs.conf
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/Desktop/git/gitlab.com/flarenetwork"]
|
||||||
|
path = ~/.config/git/config.d/flare.conf
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/Desktop/git/gitlab.com/flare-foundation"]
|
||||||
|
path = ~/.config/git/config.d/flare.conf
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
name = Matej Janežič
|
name = Matej Janežič
|
||||||
email = janezic.mj@gmail.com
|
email = janezic.mj@gmail.com
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
excludesfile = ~/.config/git/gitignore
|
|
||||||
editor = nvim
|
editor = nvim
|
||||||
[init]
|
|
||||||
defaultBranch = master
|
|
||||||
[include]
|
|
||||||
path = ~/.config/git/alias
|
|
||||||
[include]
|
|
||||||
path = ~/.config/git/commitsign
|
|
||||||
[includeIf "gitdir:~/Desktop/git/git.aflabs.org/"]
|
|
||||||
path = ~/.config/git/aflabs
|
|
||||||
|
|
||||||
|
[user]
|
||||||
|
signingkey = AF349EECC849D87B790E88FF6318FFB7DB374B7D
|
||||||
|
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
|
||||||
|
; NOTE:(@janezicmatej) github/gitlab don't support these
|
||||||
|
; [push]
|
||||||
|
; gpgsign = true
|
||||||
|
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
blame = "!f() { [ -f .git-blame-ignore-revs ] && git blame --ignore-revs-file .git-blame-ignore-revs \"$@\" || git blame \"$@\"; }; f"
|
||||||
|
|
||||||
|
[diff]
|
||||||
|
tool = "nvimdiff"
|
||||||
|
|
||||||
|
[difftool]
|
||||||
|
prompt = true
|
||||||
|
|
||||||
|
[difftool "nvimdiff"]
|
||||||
|
cmd = nvim -d "$LOCAL" "$REMOTE"
|
||||||
|
|
||||||
|
[maintenance]
|
||||||
|
auto = true
|
||||||
|
strategy = incremental
|
||||||
|
|
||||||
|
[merge]
|
||||||
|
tool = "nvimdiff"
|
||||||
|
|
||||||
|
[mergetool]
|
||||||
|
prompt = true
|
||||||
|
keepBackup = false
|
||||||
|
writeToTemp = true
|
||||||
|
|
||||||
|
[mergetool "nvimdiff"]
|
||||||
|
layout = "LOCAL,BASE,REMOTE / MERGED"
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
# mac files
|
# mac files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# i usually make test.* files for local testing
|
|
||||||
# test.*
|
|
||||||
# test
|
|
||||||
|
|
||||||
# i don't like pushing .vscode and .idea folders, i will force add if needed
|
# i don't like pushing .vscode and .idea folders, i will force add if needed
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
@@ -12,9 +8,15 @@
|
|||||||
# pyenv
|
# pyenv
|
||||||
.python-version
|
.python-version
|
||||||
|
|
||||||
|
# nix venv hook
|
||||||
|
.nix-venv
|
||||||
|
.dev
|
||||||
|
|
||||||
# i use .ignore for nvim
|
# i use .ignore for nvim
|
||||||
.ignore
|
.ignore
|
||||||
|
|
||||||
# todo files
|
# todo files
|
||||||
TODO.md
|
TODO.md
|
||||||
|
|
||||||
|
# db dumps files
|
||||||
|
dumps
|
||||||
1
nvim
1
nvim
Submodule nvim deleted from cb15af601e
63
starship/config.toml
Normal file
63
starship/config.toml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
add_newline = false
|
||||||
|
|
||||||
|
format = """\
|
||||||
|
$hostname\
|
||||||
|
[$directory](cyan)\
|
||||||
|
$git_branch\
|
||||||
|
$git_commit\
|
||||||
|
$git_state\
|
||||||
|
$git_status\
|
||||||
|
$character\
|
||||||
|
"""
|
||||||
|
|
||||||
|
right_format = """\
|
||||||
|
$nix_shell\
|
||||||
|
$golang\
|
||||||
|
$lua\
|
||||||
|
$nodejs\
|
||||||
|
$python\
|
||||||
|
$rust\
|
||||||
|
$cmd_duration\
|
||||||
|
"""
|
||||||
|
|
||||||
|
[nix_shell]
|
||||||
|
disabled = false
|
||||||
|
format = '[n(\($name\))](bold blue) '
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = '[>](bold green)'
|
||||||
|
error_symbol = '[>](bold red)'
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
truncation_length = 1
|
||||||
|
truncate_to_repo = false
|
||||||
|
fish_style_pwd_dir_length = 1
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
tag_symbol = ''
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = ''
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
format = '[$all_status$ahead_behind]($style)'
|
||||||
|
ahead = '[↑${count}](green) '
|
||||||
|
diverged = '[↑${ahead_count}↓${behind_count}](red) '
|
||||||
|
behind = '[↓${count}](green) '
|
||||||
|
modified = '[!${count}](yellow) '
|
||||||
|
untracked = '[?${count}](blue) '
|
||||||
|
staged = '[+${count}](yellow) '
|
||||||
|
stashed = '[*${count}](green) '
|
||||||
|
deleted = '[x${count}](red) '
|
||||||
|
renamed = '[r${count}](yellow) '
|
||||||
|
|
||||||
|
[python]
|
||||||
|
format = 'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
|
||||||
|
python_binary = 'python'
|
||||||
|
pyenv_version_name = false
|
||||||
|
detect_files = [ '.python-version' ]
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
style = 'bold yellow'
|
||||||
|
format = '[$hostname]($style) on '
|
||||||
3
sway/config
Normal file
3
sway/config
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
include host.d/"$(hostname)".conf
|
||||||
|
include config.d/*
|
||||||
|
include /etc/sway/config.d/*
|
||||||
27
sway/config.d/10-variables.conf
Normal file
27
sway/config.d/10-variables.conf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
# vim style
|
||||||
|
set $left h
|
||||||
|
set $down j
|
||||||
|
set $up k
|
||||||
|
set $right l
|
||||||
|
|
||||||
|
# programs
|
||||||
|
set $term ghostty
|
||||||
|
set $menu wofi --show drun -iIG -w 2
|
||||||
|
set $browser google-chrome-stable
|
||||||
|
set $lockscreen swaylock
|
||||||
|
|
||||||
|
# other
|
||||||
|
set $wobs /tmp/wob.sock
|
||||||
|
|
||||||
|
# style
|
||||||
|
set $border 3
|
||||||
|
|
||||||
|
# colors
|
||||||
|
set $bg0 #32302f
|
||||||
|
set $bg1 #252423
|
||||||
|
set $bg_overlay #45403d
|
||||||
|
set $fg #d4be98
|
||||||
|
set $red #ea6962
|
||||||
|
set $gray #928374
|
||||||
1
sway/config.d/20-output.conf
Normal file
1
sway/config.d/20-output.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
output * bg ~/.assets/wallpaper.png fill
|
||||||
4
sway/config.d/30-input.conf
Normal file
4
sway/config.d/30-input.conf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
input "type:keyboard" {
|
||||||
|
repeat_delay 150
|
||||||
|
repeat_rate 35
|
||||||
|
}
|
||||||
12
sway/config.d/40-theme.conf
Normal file
12
sway/config.d/40-theme.conf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
font pango:JetBrainsMono Nerd Font Bold 10
|
||||||
|
|
||||||
|
default_floating_border normal $border
|
||||||
|
default_border normal $border
|
||||||
|
titlebar_border_thickness $border
|
||||||
|
|
||||||
|
# class border bground text indicator child_border
|
||||||
|
client.focused $fg $bg0 $fg $fg $fg
|
||||||
|
client.focused_inactive $bg1 $bg1 $gray $bg1 $bg1
|
||||||
|
client.unfocused $bg1 $bg1 $gray $bg1 $bg1
|
||||||
|
client.urgent $red $red $bg0 $red $red
|
||||||
|
client.placeholder $bg1 $bg1 $fg $bg1 $bg1
|
||||||
8
sway/config.d/41-theme-swayfx.conf
Normal file
8
sway/config.d/41-theme-swayfx.conf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
titlebar_separator disable
|
||||||
|
|
||||||
|
shadows enable
|
||||||
|
shadow_blur_radius 25
|
||||||
|
shadow_color #0000007F
|
||||||
|
shadow_offset 0 5
|
||||||
|
|
||||||
|
blur enable
|
||||||
117
sway/config.d/50-keybind.conf
Normal file
117
sway/config.d/50-keybind.conf
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# sway
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||||
|
floating_modifier $mod normal
|
||||||
|
|
||||||
|
# programs
|
||||||
|
bindsym $mod+Return exec $term
|
||||||
|
bindsym $mod+d exec $menu
|
||||||
|
bindsym $mod+u exec $lockscreen
|
||||||
|
bindsym $mod+Shift+Ctrl+Alt+space exec 1password --quick-access
|
||||||
|
bindsym Print exec flameshot gui
|
||||||
|
|
||||||
|
# programs'
|
||||||
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
# move focus
|
||||||
|
bindsym $mod+$left focus left
|
||||||
|
bindsym $mod+$down focus down
|
||||||
|
bindsym $mod+$up focus up
|
||||||
|
bindsym $mod+$right focus right
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
bindsym $mod+Shift+$left move left
|
||||||
|
bindsym $mod+Shift+$down move down
|
||||||
|
bindsym $mod+Shift+$up move up
|
||||||
|
bindsym $mod+Shift+$right move right
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym $mod+1 workspace number 1
|
||||||
|
bindsym $mod+2 workspace number 2
|
||||||
|
bindsym $mod+3 workspace number 3
|
||||||
|
bindsym $mod+4 workspace number 4
|
||||||
|
bindsym $mod+5 workspace number 5
|
||||||
|
bindsym $mod+6 workspace number 6
|
||||||
|
bindsym $mod+7 workspace number 7
|
||||||
|
bindsym $mod+8 workspace number 8
|
||||||
|
bindsym $mod+9 workspace number 9
|
||||||
|
bindsym $mod+0 workspace number 10
|
||||||
|
|
||||||
|
# move to workspace
|
||||||
|
bindsym $mod+Shift+1 move container to workspace number 1
|
||||||
|
bindsym $mod+Shift+2 move container to workspace number 2
|
||||||
|
bindsym $mod+Shift+3 move container to workspace number 3
|
||||||
|
bindsym $mod+Shift+4 move container to workspace number 4
|
||||||
|
bindsym $mod+Shift+5 move container to workspace number 5
|
||||||
|
bindsym $mod+Shift+6 move container to workspace number 6
|
||||||
|
bindsym $mod+Shift+7 move container to workspace number 7
|
||||||
|
bindsym $mod+Shift+8 move container to workspace number 8
|
||||||
|
bindsym $mod+Shift+9 move container to workspace number 9
|
||||||
|
bindsym $mod+Shift+0 move container to workspace number 10
|
||||||
|
|
||||||
|
bindsym $mod+Ctrl+1 workspace number 1 output current
|
||||||
|
bindsym $mod+Ctrl+2 workspace number 2 output current
|
||||||
|
bindsym $mod+Ctrl+3 workspace number 3 output current
|
||||||
|
bindsym $mod+Ctrl+4 workspace number 4 output current
|
||||||
|
bindsym $mod+Ctrl+5 workspace number 5 output current
|
||||||
|
bindsym $mod+Ctrl+6 workspace number 6 output current
|
||||||
|
bindsym $mod+Ctrl+7 workspace number 7 output current
|
||||||
|
bindsym $mod+Ctrl+8 workspace number 8 output current
|
||||||
|
bindsym $mod+Ctrl+9 workspace number 9 output current
|
||||||
|
bindsym $mod+Ctrl+0 workspace number 10 output current
|
||||||
|
|
||||||
|
# layout
|
||||||
|
bindsym $mod+b splith
|
||||||
|
bindsym $mod+v splitv
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# fullscreen
|
||||||
|
bindsym $mod+f fullscreen
|
||||||
|
|
||||||
|
# focus
|
||||||
|
bindsym $mod+Shift+space floating toggle; [floating] border pixel $border; [tiling] border normal $border
|
||||||
|
bindsym $mod+space focus mode_toggle
|
||||||
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
|
# scratchpad
|
||||||
|
bindsym $mod+Shift+minus move scratchpad
|
||||||
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
|
# xf86-volume
|
||||||
|
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
|
||||||
|
bindsym --locked XF86AudioLowerVolume exec pamixer -d 5 && pamixer --get-volume > $wobs
|
||||||
|
bindsym --locked XF86AudioRaiseVolume exec pamixer -i 5 && pamixer --get-volume > $wobs
|
||||||
|
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
|
||||||
|
# xf86-brightnes
|
||||||
|
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||||
|
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||||
|
# xf86-audio
|
||||||
|
bindsym --locked XF86AudioNext exec playerctl next
|
||||||
|
bindsym --locked XF86AudioPause exec playerctl play-pause
|
||||||
|
bindsym --locked XF86AudioPlay exec playerctl play-pause
|
||||||
|
bindsym --locked XF86AudioPrev exec playerctl previous
|
||||||
|
|
||||||
|
# resize
|
||||||
|
mode "resize" {
|
||||||
|
# left will shrink the containers width
|
||||||
|
# right will grow the containers width
|
||||||
|
# up will shrink the containers height
|
||||||
|
# down will grow the containers height
|
||||||
|
bindsym $left resize shrink width 10px
|
||||||
|
bindsym $down resize grow height 10px
|
||||||
|
bindsym $up resize shrink height 10px
|
||||||
|
bindsym $right resize grow width 10px
|
||||||
|
|
||||||
|
# Ditto, with arrow keys
|
||||||
|
bindsym Left resize shrink width 10px
|
||||||
|
bindsym Down resize grow height 10px
|
||||||
|
bindsym Up resize shrink height 10px
|
||||||
|
bindsym Right resize grow width 10px
|
||||||
|
|
||||||
|
# Return to default mode
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
bindsym $mod+r mode "resize"
|
||||||
18
sway/config.d/60-window-rule.conf
Normal file
18
sway/config.d/60-window-rule.conf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# additional theming
|
||||||
|
for_window [floating] border pixel $border
|
||||||
|
for_window [tiling] border normal $border
|
||||||
|
|
||||||
|
# workspace assignment
|
||||||
|
assign [app_id="google-chrome"] workspace 2
|
||||||
|
assign [app_id="thunderbird"] workspace 3
|
||||||
|
assign [app_id="Cider"] workspace 4
|
||||||
|
assign [class=".*BoltLauncher.*"] workspace 5
|
||||||
|
assign [class="net-runelite.*"] workspace 5
|
||||||
|
assign [app_id="vesktop"] workspace 8
|
||||||
|
assign [app_id="Slack"] workspace 8
|
||||||
|
assign [app_id="org.telegram.desktop"] workspace 8
|
||||||
|
assign [class="Rocket.Chat"] workspace 8
|
||||||
|
|
||||||
|
# rules
|
||||||
|
for_window [class="net-runelite.*"] floating enable
|
||||||
|
no_focus [class="net-runelite.*"]
|
||||||
3
sway/config.d/70-bar.conf
Normal file
3
sway/config.d/70-bar.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
bar {
|
||||||
|
swaybar_command waybar
|
||||||
|
}
|
||||||
20
sway/config.d/80-autostart.conf
Normal file
20
sway/config.d/80-autostart.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# deamon
|
||||||
|
exec swayidle -w
|
||||||
|
exec wlsunset -l 46.1 -L 14.5
|
||||||
|
exec rm -f $wobs \
|
||||||
|
&& mkfifo $wobs \
|
||||||
|
&& tail -f $wobs \
|
||||||
|
| wob
|
||||||
|
exec protonmail-bridge -n
|
||||||
|
|
||||||
|
# traditional "start when os starts" programs
|
||||||
|
exec $term
|
||||||
|
exec $browser
|
||||||
|
exec thunderbird
|
||||||
|
exec cider-2
|
||||||
|
exec bolt-launcher
|
||||||
|
exec vesktop
|
||||||
|
exec slack
|
||||||
|
exec Telegram
|
||||||
|
exec rocketchat-desktop
|
||||||
|
exec 1password --silent
|
||||||
2
sway/host.d/matej-tower.conf
Normal file
2
sway/host.d/matej-tower.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
output HDMI-A-1 resolution 2560x1440 position 0,0
|
||||||
|
output DP-2 resolution 2560x1440 position 2560,0
|
||||||
3
swayidle/config
Normal file
3
swayidle/config
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
timeout 300 'swaylock -f'
|
||||||
|
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
||||||
|
before-sleep 'swaylock -f'
|
||||||
31
swaylock/config
Normal file
31
swaylock/config
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
image=~/.assets/lockscreen.png
|
||||||
|
|
||||||
|
clock
|
||||||
|
datestr=%A, %d/%m/%y
|
||||||
|
|
||||||
|
indicator-radius=150
|
||||||
|
indicator-thickness=7
|
||||||
|
indicator-idle-visible
|
||||||
|
indicator-y-position=300
|
||||||
|
indicator-x-position=1200
|
||||||
|
|
||||||
|
inside-color=000000
|
||||||
|
text-color=ffffff
|
||||||
|
ring-color=ffffff
|
||||||
|
|
||||||
|
inside-ver-color=000000
|
||||||
|
text-ver-color=000000
|
||||||
|
ring-ver-color=ffffff
|
||||||
|
|
||||||
|
inside-clear-color=000000
|
||||||
|
text-clear-color=ffffff
|
||||||
|
ring-clear-color=ffffff
|
||||||
|
|
||||||
|
inside-wrong-color=000000
|
||||||
|
text-wrong-color=ffffff
|
||||||
|
ring-wrong-color=ffffff
|
||||||
|
|
||||||
|
key-hl-color=000000
|
||||||
|
bs-hl-color=000000
|
||||||
|
caps-lock-key-hl-color=000000
|
||||||
|
caps-lock-bs-hl-color=000000
|
||||||
18
tmux/tmux-ggclone
Executable file
18
tmux/tmux-ggclone
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source "$XDG_CONFIG_HOME/zsh/scripts.zsh"
|
||||||
|
|
||||||
|
if [[ $# -eq 1 ]]; then
|
||||||
|
selected=$1
|
||||||
|
else
|
||||||
|
read -p "url: " selected
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ggman clone $selected
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
read -p "press enter to continue..."
|
||||||
50
tmux/tmux-new-project
Executable file
50
tmux/tmux-new-project
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ -z ${NAME:+x} ]]; then
|
||||||
|
echo "missing name"
|
||||||
|
sleep 2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$XDG_CONFIG_HOME/zsh/scripts.zsh"
|
||||||
|
|
||||||
|
read -p "name: " project_name
|
||||||
|
|
||||||
|
if [[ -z $project_name ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$GGROOT/no-remote/$project_name" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
project="$GGROOT/no-remote/$project_name"
|
||||||
|
git init $project
|
||||||
|
echo "# $project_name" >>"$project/README.md"
|
||||||
|
|
||||||
|
gitignore_template=$(
|
||||||
|
find "$GGROOT"/github.com/github/gitignore/*.gitignore -exec basename {} \; \
|
||||||
|
| sed 's/\(.*\)\.gitignore/\1/' \
|
||||||
|
| fzf --cycle --bind 'tab:toggle-up,btab:toggle-down'
|
||||||
|
)
|
||||||
|
|
||||||
|
if ! [[ -z $gitignore_template ]]; then
|
||||||
|
gitignore="$GGROOT/github.com/github/gitignore/$gitignore_template.gitignore"
|
||||||
|
echo "$gitignore"
|
||||||
|
echo "$project/.gitignore"
|
||||||
|
cat "$gitignore" >>"$project/.gitignore"
|
||||||
|
fi
|
||||||
|
|
||||||
|
license_template=$(
|
||||||
|
find "$GGROOT"/git.janezic.dev/janezicmatej/license/*.license -exec basename {} \; \
|
||||||
|
| sed 's/\(.*\)\.license/\1/' \
|
||||||
|
| fzf --cycle --bind 'tab:toggle-up,btab:toggle-down'
|
||||||
|
)
|
||||||
|
|
||||||
|
if ! [[ -z $license_template ]]; then
|
||||||
|
license="$GGROOT/git.janezic.dev/janezicmatej/license/$license_template.license"
|
||||||
|
export YEAR="$(date '+%Y')"
|
||||||
|
envsubst <"$license" >"$project/LICENSE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ggcompile
|
||||||
@@ -3,18 +3,23 @@
|
|||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
selected=$1
|
selected=$1
|
||||||
else
|
else
|
||||||
if ! [[ -f "$GGROOT/compiled" ]]; then
|
selected=$(ggman ls \
|
||||||
find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname > "$GGROOT/compiled"
|
| fzf --cycle \
|
||||||
fi
|
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||||
selected=$(cat "$GGROOT/compiled" | fzf)
|
--header "Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER." \
|
||||||
|
--border "double" \
|
||||||
|
--border-label "tmux-sessionizer" \
|
||||||
|
--ansi \
|
||||||
|
--highlight-line \
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $selected ]]; then
|
if [[ -z $selected ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
selected_name="$(echo $selected | shasum -a 256 | head -c 4)_$(basename $selected | tr . _ | head -c 10)"
|
||||||
|
|
||||||
selected_name=$(basename "$selected" | tr . _)
|
|
||||||
tmux_running=$(pgrep tmux)
|
tmux_running=$(pgrep tmux)
|
||||||
|
|
||||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||||
|
|||||||
77
tmux/tmux-ssher
Executable file
77
tmux/tmux-ssher
Executable file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function _preview {
|
||||||
|
file=$1; shift
|
||||||
|
host=$1; shift
|
||||||
|
|
||||||
|
j=$(cat $file \
|
||||||
|
| jc --ssh-conf \
|
||||||
|
| jq -r ".[] \
|
||||||
|
| select(.host == \"$host\") \
|
||||||
|
| .jumps = (if (.proxyjump | type == \"array\" and length > 0) then (.proxyjump | join(\",\")) else \"null\" end)" \
|
||||||
|
)
|
||||||
|
|
||||||
|
user=$(jq -r '.user' <<<$j)
|
||||||
|
port=$(jq -r '.port' <<<$j)
|
||||||
|
hostname=$(jq -r '.hostname' <<<$j)
|
||||||
|
jumps=$(jq -r '.jumps' <<<$j)
|
||||||
|
|
||||||
|
|
||||||
|
echo "$(cat <<EOF
|
||||||
|
User $user
|
||||||
|
HostName $hostname\
|
||||||
|
$([[ $port != "null" ]] && echo -e "\nPort $port")\
|
||||||
|
$([[ $jumps != "null" ]] && echo -e "\nProxyJump $jumps")
|
||||||
|
|
||||||
|
command:
|
||||||
|
ssh $user@$hostname$([[ $port != "null" ]] && echo -n " -p $port")$([[ $jumps != "null" ]] && echo -n " -J $jumps")
|
||||||
|
EOF)"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
host $hostname
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
ping -c 1 -W 1 $hostname &>/dev/null \
|
||||||
|
&& echo "Host is reachable!" \
|
||||||
|
|| echo "Host is not reachable!"
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f _preview
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
if [[ $# -eq 1 ]]; then
|
||||||
|
selected=$1
|
||||||
|
else
|
||||||
|
selected="$(rg -N --no-heading '^Host .*' ~/.ssh \
|
||||||
|
| sed 's/Host \(.*\)/\1/' \
|
||||||
|
| SHELL=$(which bash) fzf --cycle \
|
||||||
|
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||||
|
--delimiter ':' \
|
||||||
|
--with-nth 2 \
|
||||||
|
--preview "_preview {1} {2}" \
|
||||||
|
| cut -d ":" -f2
|
||||||
|
)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
selected_name="ssh_$selected"
|
||||||
|
tmux_running=$(pgrep tmux)
|
||||||
|
|
||||||
|
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||||
|
tmux new-session -s $selected_name -c $selected ssh "$selected"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! tmux has-session -t=$selected_name 2> /dev/null; then
|
||||||
|
tmux new-session -ds $selected_name -c $selected ssh "$selected"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux switch-client -t $selected_name
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
@@ -1,34 +1,53 @@
|
|||||||
set -g default-terminal "xterm-256color"
|
set -g default-terminal "xterm-256color"
|
||||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
set -ga terminal-overrides ",xterm-256color:RGB"
|
||||||
|
set -ga terminal-features ",xterm-256color:clipboard"
|
||||||
|
|
||||||
|
set -g allow-passthrough on
|
||||||
|
set -g set-clipboard on
|
||||||
|
|
||||||
set -s escape-time 0
|
set -s escape-time 0
|
||||||
|
|
||||||
|
set -g update-environment "SSH_AUTH_SOCK SSH_CONNECTION SSH_TTY DISPLAY"
|
||||||
|
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set-option -g prefix C-s
|
set-option -g prefix C-s
|
||||||
bind-key C-s send-prefix
|
|
||||||
|
|
||||||
bind r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"
|
bind r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
|
|
||||||
set -g status-style 'bg=#45403d fg=#d4be98'
|
set -g status-style 'bg=default fg=default'
|
||||||
set -g status-left-length 30
|
set -g status-left-length 20
|
||||||
|
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
|
||||||
|
# differentiate copy on linux and max
|
||||||
|
if-shell -b '[ "$(uname -s)" = "Linux" ]' {
|
||||||
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||||
|
}
|
||||||
|
|
||||||
|
if-shell -b '[ "$(uname -s)" = "Darwin" ]' {
|
||||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
|
||||||
|
}
|
||||||
|
|
||||||
# vim-like pane switching
|
# vim-like pane switching
|
||||||
bind -r ^ last-window
|
bind ^ last-window
|
||||||
bind -r k select-pane -U
|
bind k select-pane -U
|
||||||
bind -r j select-pane -D
|
bind j select-pane -D
|
||||||
bind -r h select-pane -L
|
bind h select-pane -L
|
||||||
bind -r l select-pane -R
|
bind l select-pane -R
|
||||||
|
|
||||||
bind -r D neww -c "#{pane_current_path}" "nvim TODO.md"
|
# sessionizer
|
||||||
bind -r t neww -c "~" "nvim ~/.TODO.md"
|
bind-key f run-shell "tmux neww ~/.config/tmux/tmux-sessionizer"
|
||||||
|
bind-key R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
|
||||||
|
bind-key g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/.config"
|
||||||
|
bind-key T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/temp"
|
||||||
|
|
||||||
bind-key -r f run-shell "tmux neww ~/.config/tmux/tmux-sessionizer"
|
# clone
|
||||||
bind-key -r g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_HOME"
|
bind-key G run-shell "tmux neww ~/.config/tmux/tmux-ggclone"
|
||||||
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/Desktop/temp"
|
|
||||||
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
|
|
||||||
|
|
||||||
|
# ssh
|
||||||
|
bind-key F run-shell "tmux neww ~/.config/tmux/tmux-ssher"
|
||||||
|
|
||||||
|
# project
|
||||||
|
bind-key N run-shell "tmux neww ~/.config/tmux/tmux-new-project"
|
||||||
|
|||||||
201
waybar/config.jsonc
Normal file
201
waybar/config.jsonc
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"height": 45,
|
||||||
|
"spacing": 1,
|
||||||
|
"margin": 0,
|
||||||
|
"modules-left": [
|
||||||
|
"clock",
|
||||||
|
],
|
||||||
|
"modules-center": [
|
||||||
|
"sway/workspaces",
|
||||||
|
"sway/mode",
|
||||||
|
"sway/scratchpad",
|
||||||
|
],
|
||||||
|
"modules-right": [
|
||||||
|
"custom/cider",
|
||||||
|
"pulseaudio",
|
||||||
|
"network",
|
||||||
|
"power-profiles-daemon",
|
||||||
|
"cpu",
|
||||||
|
"memory",
|
||||||
|
"temperature",
|
||||||
|
"backlight",
|
||||||
|
"battery",
|
||||||
|
"tray",
|
||||||
|
"custom/notification"
|
||||||
|
],
|
||||||
|
// Modules configuration
|
||||||
|
"sway/workspaces": {
|
||||||
|
"disable-scroll": true,
|
||||||
|
// "all-outputs": true,
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"1": "I",
|
||||||
|
"2": "II",
|
||||||
|
"3": "III",
|
||||||
|
"4": "IV",
|
||||||
|
"5": "V",
|
||||||
|
"6": "VI",
|
||||||
|
"7": "VII",
|
||||||
|
"8": "VIII",
|
||||||
|
"9": "IX",
|
||||||
|
"10": "X",
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
"sway/mode": {
|
||||||
|
"format": "<span style=\"italic\">{}</span>"
|
||||||
|
},
|
||||||
|
"sway/scratchpad": {
|
||||||
|
"format": "{icon} {count}",
|
||||||
|
"show-empty": false,
|
||||||
|
"format-icons": ["", ""],
|
||||||
|
"tooltip": true,
|
||||||
|
"tooltip-format": "{app}: {title}"
|
||||||
|
},
|
||||||
|
"custom/cider": {
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"max-length": 18,
|
||||||
|
"interval": 1,
|
||||||
|
"tooltip": true,
|
||||||
|
"exec": "~/.config/bin/waybar-custom-cider.sh",
|
||||||
|
"on-click": "curl -s -X POST http://localhost:10767/api/v1/playback/playpause",
|
||||||
|
"on-click-right": "curl -s -X POST http://localhost:10767/api/v1/playback/next",
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 18,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"interval": 1,
|
||||||
|
"format": "{:%Y/%m/%d %H:%M:%S}",
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "cpu:{usage}%",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "ghostty -e htop"
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"interval": 10,
|
||||||
|
"format": "ram:{}%",
|
||||||
|
"tooltip-format": "total: {total:0.2f}GiB\nused: {used:0.2f}GiB\navailable: {avail:0.2f}GiB\nswap: {swapUsed:0.2f}/{swapTotal:0.2f}GiB",
|
||||||
|
"on-click": "ghostty -e htop"
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
// "thermal-zone": 2,
|
||||||
|
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||||
|
"critical-threshold": 80,
|
||||||
|
// "format-critical": "{temperatureC}°C {icon}",
|
||||||
|
"format": "{temperatureC}°C {icon}",
|
||||||
|
"format-icons": ["", "", ""],
|
||||||
|
"on-click": "ghostty -e s-tui",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"backlight": {
|
||||||
|
// "device": "acpi_video1",
|
||||||
|
"format": "{percent}% {icon}",
|
||||||
|
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
// "good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
"format-full": "{capacity}% {icon}",
|
||||||
|
"format-charging": "{capacity}% ",
|
||||||
|
"format-plugged": "{capacity}% ",
|
||||||
|
"format-alt": "{time} {icon}",
|
||||||
|
// "format-good": "", // An empty format will hide the module
|
||||||
|
// "format-full": "",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"power-profiles-daemon": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
|
||||||
|
"tooltip": true,
|
||||||
|
"format-icons": {
|
||||||
|
"default": "",
|
||||||
|
"performance": "",
|
||||||
|
"balanced": "",
|
||||||
|
"power-saver": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
|
"format-ethernet": "ipv4:{ipaddr}/{cidr}",
|
||||||
|
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||||
|
"format-linked": "{ifname} (No IP) ",
|
||||||
|
"format-disconnected": "Disconnected ⚠",
|
||||||
|
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "vol:{volume}%/{format_source}",
|
||||||
|
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||||
|
"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
|
"format-muted": " {format_source}",
|
||||||
|
"format-source": "{volume}%",
|
||||||
|
"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"custom/media": {
|
||||||
|
"format": "{icon} {text}",
|
||||||
|
"return-type": "json",
|
||||||
|
"max-length": 40,
|
||||||
|
"format-icons": {
|
||||||
|
"spotify": "",
|
||||||
|
"default": "🎜"
|
||||||
|
},
|
||||||
|
"escape": true,
|
||||||
|
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
||||||
|
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
|
||||||
|
},
|
||||||
|
"custom/power": {
|
||||||
|
"format" : "⏻ ",
|
||||||
|
"tooltip": false,
|
||||||
|
"menu": "on-click",
|
||||||
|
"menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
|
||||||
|
"menu-actions": {
|
||||||
|
"shutdown": "shutdown",
|
||||||
|
"reboot": "reboot",
|
||||||
|
"suspend": "systemctl suspend",
|
||||||
|
"hibernate": "systemctl hibernate"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/notification": {
|
||||||
|
"tooltip": true,
|
||||||
|
"format": "<span size='16pt'>{0} {icon} </span>",
|
||||||
|
"format-icons": {
|
||||||
|
"notification": "",
|
||||||
|
"none": "",
|
||||||
|
"dnd-notification": "",
|
||||||
|
"dnd-none": "",
|
||||||
|
"inhibited-notification": "",
|
||||||
|
"inhibited-none": "",
|
||||||
|
"dnd-inhibited-notification": "",
|
||||||
|
"dnd-inhibited-none": ""
|
||||||
|
},
|
||||||
|
"return-type": "json",
|
||||||
|
"exec-if": "which swaync-client",
|
||||||
|
"exec": "swaync-client -swb",
|
||||||
|
"on-click": "swaync-client -t -sw",
|
||||||
|
"on-click-right": "swaync-client -d -sw",
|
||||||
|
"escape": true
|
||||||
|
}
|
||||||
|
}
|
||||||
330
waybar/style.css
Normal file
330
waybar/style.css
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Gruvbox Material Dark Palette
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
@define-color background #282828;
|
||||||
|
@define-color background-light #3c3836;
|
||||||
|
@define-color foreground #d4be98;
|
||||||
|
@define-color black #1d2021;
|
||||||
|
@define-color gray #928374;
|
||||||
|
@define-color red #ea6962;
|
||||||
|
@define-color green #a9b665;
|
||||||
|
@define-color yellow #d8a657;
|
||||||
|
@define-color blue #7daea3;
|
||||||
|
@define-color magenta #d3869b;
|
||||||
|
@define-color cyan #89b482;
|
||||||
|
@define-color white #ddc7a1;
|
||||||
|
@define-color orange #e78a4e;
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Module Colors (Neovim/Muted Style)
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
@define-color workspaces-color @gray;
|
||||||
|
@define-color workspaces-focused-bg @background-light;
|
||||||
|
@define-color workspaces-focused-fg @foreground;
|
||||||
|
@define-color workspaces-urgent-bg @red;
|
||||||
|
@define-color workspaces-urgent-fg @background;
|
||||||
|
|
||||||
|
@define-color cider-color @red;
|
||||||
|
@define-color clock-color @foreground;
|
||||||
|
@define-color pulseaudio-color @blue;
|
||||||
|
@define-color pulseaudio-muted-color @gray;
|
||||||
|
@define-color network-color @magenta;
|
||||||
|
@define-color network-disconnected-color @red;
|
||||||
|
@define-color cpu-color @orange;
|
||||||
|
@define-color memory-color @cyan;
|
||||||
|
@define-color temperature-color @yellow;
|
||||||
|
@define-color temperature-critical-color @red;
|
||||||
|
@define-color backlight-color @white;
|
||||||
|
@define-color battery-color @foreground;
|
||||||
|
@define-color battery-charging-color @green;
|
||||||
|
@define-color battery-warning-color @yellow;
|
||||||
|
@define-color battery-critical-color @red;
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Global Setup
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This targets every module */
|
||||||
|
#waybar .module {
|
||||||
|
background-color: #1e1e2e; /* Your desired module color */
|
||||||
|
border-radius: 7px;
|
||||||
|
border: 2px solid #d4be98;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Specific grouping (Optional: if you want modules to stick together in islands) */
|
||||||
|
.modules-left, .modules-center, .modules-right {
|
||||||
|
background: transparent;
|
||||||
|
margin: 12px 10px 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
box-shadow: none;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Workspaces
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: @workspaces-color;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: @background-light;
|
||||||
|
color: @foreground;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The "Neovim Buffer" Look:
|
||||||
|
Active workspace is lighter background + cream text.
|
||||||
|
No flashy underlines. */
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: @background-light;
|
||||||
|
color: @workspaces-focused-fg;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: @workspaces-urgent-bg;
|
||||||
|
color: @workspaces-urgent-fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Modules
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
#mode,
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#wireplumber,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#scratchpad,
|
||||||
|
#power-profiles-daemon,
|
||||||
|
#mpd,
|
||||||
|
#custom-cider {
|
||||||
|
color: @clock-color;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none; /* Removed the underlines for a cleaner look */
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-left > widget:first-child > #workspaces { margin-left: 0; }
|
||||||
|
.modules-right > widget:last-child > #workspaces { margin-right: 0; }
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Module Specifics
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
color: @battery-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: @battery-charging-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning:not(.charging) {
|
||||||
|
color: @battery-warning-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: @red;
|
||||||
|
color: @background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
color: @battery-critical-color;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: steps(12);
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #cpu { */
|
||||||
|
/* color: @cpu-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #memory { */
|
||||||
|
/* color: @memory-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #disk { */
|
||||||
|
/* color: @yellow; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #backlight { */
|
||||||
|
/* color: @backlight-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #network { */
|
||||||
|
/* color: @network-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #network.disconnected { */
|
||||||
|
/* color: @network-disconnected-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #pulseaudio { */
|
||||||
|
/* color: @pulseaudio-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #pulseaudio.muted { */
|
||||||
|
/* color: @pulseaudio-muted-color; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #wireplumber { */
|
||||||
|
/* color: @foreground; */
|
||||||
|
/* } */
|
||||||
|
/**/
|
||||||
|
/* #wireplumber.muted { */
|
||||||
|
/* color: @red; */
|
||||||
|
/* } */
|
||||||
|
|
||||||
|
#custom-media {
|
||||||
|
color: @green;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature {
|
||||||
|
color: @temperature-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
color: @temperature-critical-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background-color: @background-light;
|
||||||
|
border-radius: 4px; /* Slight roundness for the tray container */
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor {
|
||||||
|
color: @gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor.activated {
|
||||||
|
color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd {
|
||||||
|
color: @green;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.disconnected {
|
||||||
|
color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.stopped {
|
||||||
|
color: @gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.paused {
|
||||||
|
color: @blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
background: @background-light;
|
||||||
|
color: @foreground;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state {
|
||||||
|
color: @foreground;
|
||||||
|
padding: 0 0px;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state > label.locked {
|
||||||
|
color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scratchpad {
|
||||||
|
background: transparent;
|
||||||
|
color: @gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scratchpad.empty {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item {
|
||||||
|
padding: 0 5px;
|
||||||
|
color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item.screenshare {
|
||||||
|
color: @orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item.audio-in {
|
||||||
|
color: @green;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item.audio-out {
|
||||||
|
color: @blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #custom-cider { */
|
||||||
|
/* color: @cider-color; */
|
||||||
|
/* } */
|
||||||
1697
zsh/.p10k.zsh
1697
zsh/.p10k.zsh
File diff suppressed because it is too large
Load Diff
@@ -1 +1,2 @@
|
|||||||
export PATH="/usr/local/bin:/opt/homebrew/bin:$Home/neovim/bin:${PATH}"
|
export PATH="/usr/local/bin:/opt/homebrew/bin:$HOME/neovim/bin:$HOME/bin:${PATH}"
|
||||||
|
|
||||||
|
|||||||
11
zsh/.zsh_plugins.txt
Normal file
11
zsh/.zsh_plugins.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# set up Zsh completions with plugins
|
||||||
|
# mattmc3/ez-compinit
|
||||||
|
zsh-users/zsh-completions kind:fpath path:src
|
||||||
|
|
||||||
|
# frameworks like oh-my-zsh are supported
|
||||||
|
getantidote/use-omz # handle OMZ dependencies
|
||||||
|
ohmyzsh/ohmyzsh path:lib # load OMZ's library
|
||||||
|
ohmyzsh/ohmyzsh path:plugins/git
|
||||||
|
|
||||||
|
# popular fish-like plugins
|
||||||
|
zsh-users/zsh-autosuggestions
|
||||||
1
zsh/.zsh_plugins_darwin.txt
Normal file
1
zsh/.zsh_plugins_darwin.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
lukechilds/zsh-nvm
|
||||||
22
zsh/.zshenv
22
zsh/.zshenv
@@ -4,6 +4,9 @@ export XDG_CACHE_HOME="$HOME/.cache"
|
|||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
export XDG_STATE_HOME="$HOME/.local/state"
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
|
||||||
|
# ~/.local/bin
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
# brew sbin
|
# brew sbin
|
||||||
export PATH="/opt/homebrew/sbin:$PATH"
|
export PATH="/opt/homebrew/sbin:$PATH"
|
||||||
|
|
||||||
@@ -11,7 +14,9 @@ export PATH="/opt/homebrew/sbin:$PATH"
|
|||||||
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
|
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
|
||||||
|
|
||||||
# cargo
|
# cargo
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
source "$HOME/.cargo/env"
|
source "$HOME/.cargo/env"
|
||||||
|
fi
|
||||||
|
|
||||||
# language environment
|
# language environment
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
@@ -34,6 +39,23 @@ export PATH="$XDG_DATA_HOME/neovim/bin:$PATH"
|
|||||||
export PYENV_ROOT="$XDG_DATA_HOME/.pyenv"
|
export PYENV_ROOT="$XDG_DATA_HOME/.pyenv"
|
||||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
|
||||||
|
# pyenv-virtualenv
|
||||||
|
# leave python promt to starship
|
||||||
|
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
|
||||||
|
|
||||||
# poetry
|
# poetry
|
||||||
export POETRY_HOME="$XDG_DATA_HOME/poetry"
|
export POETRY_HOME="$XDG_DATA_HOME/poetry"
|
||||||
command -v poetry >/dev/null || export PATH="$POETRY_HOME/bin:$PATH"
|
command -v poetry >/dev/null || export PATH="$POETRY_HOME/bin:$PATH"
|
||||||
|
|
||||||
|
# gnupg
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
|
# aflabs
|
||||||
|
export USER_UID=$(id -u)
|
||||||
|
export USER_GID=$(id -g)
|
||||||
|
|
||||||
|
# name
|
||||||
|
export NAME="Matej Janežič"
|
||||||
|
|
||||||
|
# starship nest config into a folder, default is ~/.config/startship.toml
|
||||||
|
export STARSHIP_CONFIG="$XDG_CONFIG_HOME/starship/config.toml"
|
||||||
|
|||||||
55
zsh/.zshrc
55
zsh/.zshrc
@@ -2,46 +2,34 @@
|
|||||||
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||||
export HISTSIZE=100
|
export HISTSIZE=100
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
## pre plugin load
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
# nvm
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
export NVM_COMPLETION=true
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
# zsh autosugestions
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ffffff,bg=cyan,bold,underline"
|
||||||
|
|
||||||
|
# source antidote
|
||||||
|
source $ZDOTDIR/.antidote/antidote.zsh
|
||||||
|
antidote load
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
antidote load ${ZDOTDIR:-~}/.zsh_plugins_darwin.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pre plugin load
|
unsetopt autocd
|
||||||
export NVM_COMPLETION=true
|
|
||||||
|
|
||||||
# load antigen
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
typeset -a ANTIGEN_CHECK_FILES=(${ZDOTDIR:-~}/.zshrc ${ZDOTDIR:-~}/antigen.zsh)
|
eval "$(pyenv init - zsh)"
|
||||||
source $ZDOTDIR/antigen.zsh
|
eval "$(pyenv virtualenv-init - zsh)"
|
||||||
|
fi
|
||||||
|
|
||||||
# oh-my-zsh library and git plugin
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
antigen use oh-my-zsh
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
antigen bundle git
|
fi
|
||||||
|
|
||||||
# zsh users plugin
|
|
||||||
antigen bundle zsh-users/zsh-autosuggestions
|
|
||||||
|
|
||||||
# other
|
|
||||||
antigen bundle lukechilds/zsh-nvm
|
|
||||||
|
|
||||||
# theme
|
|
||||||
antigen theme romkatv/powerlevel10k
|
|
||||||
|
|
||||||
# apply plugin load
|
|
||||||
antigen apply
|
|
||||||
|
|
||||||
# pyenv
|
|
||||||
eval "$(pyenv init -)"
|
|
||||||
eval "$(pyenv virtualenv-init -)"
|
|
||||||
|
|
||||||
# ggman
|
# ggman
|
||||||
eval "$(ggman shellrc)"
|
eval "$(ggman shellrc)"
|
||||||
|
|
||||||
# gpg
|
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
|
|
||||||
# custom functions and aliases
|
# custom functions and aliases
|
||||||
source "$ZDOTDIR/aliases.zsh"
|
source "$ZDOTDIR/aliases.zsh"
|
||||||
source "$ZDOTDIR/scripts.zsh"
|
source "$ZDOTDIR/scripts.zsh"
|
||||||
@@ -55,5 +43,4 @@ zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
|
|||||||
# opam configuration
|
# opam configuration
|
||||||
# [[ ! -r /Users/janezicmatej/.opam/opam-init/init.zsh ]] || source /Users/janezicmatej/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
|
# [[ ! -r /Users/janezicmatej/.opam/opam-init/init.zsh ]] || source /Users/janezicmatej/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
eval "$(starship init zsh)"
|
||||||
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|
|
||||||
|
|||||||
@@ -1,8 +1,18 @@
|
|||||||
alias s="ssh"
|
|
||||||
alias z="exec zsh"
|
alias z="exec zsh"
|
||||||
alias t="tmux a || tmux new-session -s janezicmatej -c ~"
|
alias t=tmux_attach
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
alias n=nvim_ve
|
alias n=nvim_ve
|
||||||
# alias vim=nvim_ve
|
alias vim=nvim_ve
|
||||||
|
elif [[ "$OSTYPE" == "linux"* ]]; then
|
||||||
|
alias n=nvim
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias s="ssh-menu"
|
||||||
|
|
||||||
|
# docker
|
||||||
|
alias dp="docker ps --format 'table {{.Names}}\t{{.Ports}}'"
|
||||||
|
alias dcp="docker compose ps --format 'table {{.Name}}\t{{.Ports}}'"
|
||||||
|
|
||||||
# navigation
|
# navigation
|
||||||
alias cdgit="cd $GGROOT"
|
alias cdgit="cd $GGROOT"
|
||||||
@@ -16,9 +26,16 @@ alias accentoff="defaults write -g ApplePressAndHoldEnabled -bool false"
|
|||||||
# git
|
# git
|
||||||
alias gros="git reset origin/$(git_current_branch) --soft"
|
alias gros="git reset origin/$(git_current_branch) --soft"
|
||||||
alias gcan="git commit -v --amend --no-edit"
|
alias gcan="git commit -v --amend --no-edit"
|
||||||
|
alias glogaa="git log --oneline --graph --all --pretty=format:\"%C(auto)%h %C(blue)(%aL/%cL)%C(auto)%(decorate) %s%Creset\""
|
||||||
|
|
||||||
# unsorted
|
# unsorted
|
||||||
alias ci="glab ci list"
|
alias ci="glab ci list"
|
||||||
alias bm=batman
|
alias bm=batman
|
||||||
alias grow="~/.local/bin/cbonsai -liWC -M 15 -t 2 -w 60 -s $(date +%s)"
|
alias grow="~/.local/bin/cbonsai -liWC -M 15 -t 2 -w 60 -s $(date +%s)"
|
||||||
alias clean_ds_store='find . -name ".DS_Store" -type f -delete -print'
|
alias clean_ds_store='find . -name ".DS_Store" -type f -delete -print'
|
||||||
|
|
||||||
|
# ruff
|
||||||
|
alias ruffme="ruff check --fix && ruff format"
|
||||||
|
|
||||||
|
# clipboard
|
||||||
|
alias xcp="xclip -selection c"
|
||||||
|
|||||||
51
zsh/get-dump
Executable file
51
zsh/get-dump
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function get-dump {
|
||||||
|
if [[ -z $1 ]]; then
|
||||||
|
host="$(rg -N --no-heading 'Host .*' ~/.ssh \
|
||||||
|
| sed 's/Host \(.*\)/\1/' \
|
||||||
|
| fzf --cycle \
|
||||||
|
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||||
|
--delimiter ':' \
|
||||||
|
--with-nth 2 \
|
||||||
|
--header "Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER." \
|
||||||
|
--border "double" \
|
||||||
|
--border-label "get-dump" \
|
||||||
|
--ansi \
|
||||||
|
--highlight-line \
|
||||||
|
| cut -d ":" -f2
|
||||||
|
)"
|
||||||
|
if [[ -z $host ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
host=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
selected=$(ssh "$host" docker ps --format "{{.Names}}" \
|
||||||
|
| fzf --cycle \
|
||||||
|
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||||
|
--header "Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER." \
|
||||||
|
--border "double" \
|
||||||
|
--border-label "get-dump" \
|
||||||
|
--ansi \
|
||||||
|
--highlight-line \
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
echo "not provided"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ -d "./dumps" ]]; then
|
||||||
|
mkdir "./dumps"
|
||||||
|
fi
|
||||||
|
|
||||||
|
location="./dumps/${host}_${selected}_$(date +'%s')"
|
||||||
|
|
||||||
|
echo "dumping to $location"
|
||||||
|
|
||||||
|
ssh "$host" docker exec "$selected" pg_dump -U db --format=c db >"$location"
|
||||||
|
}
|
||||||
|
|
||||||
|
get-dump "$@"
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
function nvim_ve {
|
function nvim_ve {
|
||||||
if [[ -e "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then
|
if [[ -e $VIRTUAL_ENV && -f "$VIRTUAL_ENV/bin/activate" ]]; then
|
||||||
source "$VIRTUAL_ENV/bin/activate"
|
source "$VIRTUAL_ENV/bin/activate"
|
||||||
command nvim $@
|
command nvim $@
|
||||||
deactivate
|
deactivate
|
||||||
@@ -9,25 +8,6 @@ function nvim_ve {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
alias nvim=nvim_ve
|
|
||||||
|
|
||||||
function ffb {
|
|
||||||
if ! [[ -f package.json ]]; then
|
|
||||||
echo "no package.json"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f yarn.lock ]]; then
|
|
||||||
PACKAGE_MANAGER=yarn
|
|
||||||
else
|
|
||||||
PACKAGE_MANAGER=npm
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n $(grep "react-scripts" package.json) ]]; then
|
|
||||||
BROWSER=none FORCE_COLOR=true "$PACKAGE_MANAGER" start | cat
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function afm {
|
function afm {
|
||||||
RES=$(curl -s "https://$1/api/monitoring/requirements")
|
RES=$(curl -s "https://$1/api/monitoring/requirements")
|
||||||
COUNT=$(echo "$RES" | grep -c $2)
|
COUNT=$(echo "$RES" | grep -c $2)
|
||||||
@@ -35,11 +15,10 @@ function afm {
|
|||||||
VER=$(echo "$RES" | jq '.[] | select(.name | contains("'"$2"'")).version')
|
VER=$(echo "$RES" | jq '.[] | select(.name | contains("'"$2"'")).version')
|
||||||
# OP=$(echo "$RES" | jq '.[] | select(.name | contains("'"$2"'")).requirement?[0][0]')
|
# OP=$(echo "$RES" | jq '.[] | select(.name | contains("'"$2"'")).requirement?[0][0]')
|
||||||
# echo "$2""$(echo "$OP" | tr -d '"')""$(echo "$VER" | tr -d '"')"
|
# echo "$2""$(echo "$OP" | tr -d '"')""$(echo "$VER" | tr -d '"')"
|
||||||
echo "$2""==""$(echo "$VER" | tr -d '"')"
|
echo "${2}==$(echo "$VER" | tr -d '"')"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function nukepip {
|
function nukepip {
|
||||||
pip uninstall $(pip freeze) -y
|
pip uninstall $(pip freeze) -y
|
||||||
pip install -r $(pyenv root)/default-packages
|
pip install -r $(pyenv root)/default-packages
|
||||||
@@ -53,7 +32,7 @@ function pyinit {
|
|||||||
|
|
||||||
DIRNAME=$(basename "$PWD")
|
DIRNAME=$(basename "$PWD")
|
||||||
|
|
||||||
if [[ $(pyenv versions | grep "$DIRNAME") ]]; then
|
if [[ $(pyenv versions | grep -E "/${DIRNAME}$") ]]; then
|
||||||
echo "found existing version with this name, setting..."
|
echo "found existing version with this name, setting..."
|
||||||
pyenv local "$DIRNAME"
|
pyenv local "$DIRNAME"
|
||||||
return
|
return
|
||||||
@@ -73,7 +52,7 @@ function pyinit {
|
|||||||
|
|
||||||
function lh {
|
function lh {
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z $1 ]]; then
|
||||||
PORT=8000
|
PORT=7999
|
||||||
else
|
else
|
||||||
PORT=$1
|
PORT=$1
|
||||||
fi
|
fi
|
||||||
@@ -89,32 +68,6 @@ function dps {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function get_dump {
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
echo "provide ssh host"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $2 ]]; then
|
|
||||||
echo "provide dump destination"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
selected=$(ssh "$1" docker ps --filter image=postgres:* --format "{{.Names}}" | fzf)
|
|
||||||
|
|
||||||
if [[ -z $selected ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
ssh "$1" docker exec "$selected" pg_dump -U db --format=c db > "$2$(date +'%Y-%m-%dT%H.%M.%S%z')"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function ggcompile {
|
|
||||||
find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname > "$GGROOT/compiled"
|
|
||||||
}
|
|
||||||
|
|
||||||
function tssh {
|
function tssh {
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z $1 ]]; then
|
||||||
echo "provide ssh host"
|
echo "provide ssh host"
|
||||||
@@ -123,3 +76,20 @@ function tssh {
|
|||||||
|
|
||||||
ssh -t "$@" "command -v tmux && (tmux a || tmux new-session -s gorazd -c ~) || bash"
|
ssh -t "$@" "command -v tmux && (tmux a || tmux new-session -s gorazd -c ~) || bash"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function tmux_attach {
|
||||||
|
tmux_running=$(pgrep tmux)
|
||||||
|
|
||||||
|
if ! [[ -z ${TMUX} ]]; then
|
||||||
|
echo "already attached; refreshing env"
|
||||||
|
source <(tmux show-environment | sed -n 's/^\(.*\)=\(.*\)$/export \1="\2"/p')
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $tmux_running ]]; then
|
||||||
|
~/.config/tmux/tmux-sessionizer ~
|
||||||
|
else
|
||||||
|
tmux a
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
75
zsh/ssh-menu
Executable file
75
zsh/ssh-menu
Executable file
@@ -0,0 +1,75 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function _ssh_menu_preview {
|
||||||
|
file=$1; shift
|
||||||
|
host=$1; shift
|
||||||
|
|
||||||
|
j=$(cat $file \
|
||||||
|
| jc --ssh-conf \
|
||||||
|
| jq -r ".[] \
|
||||||
|
| select(.host == \"$host\") \
|
||||||
|
| .jumps = (\
|
||||||
|
if (.proxyjump | type == \"array\" and length > 0) then \
|
||||||
|
(.proxyjump | join(\",\")) \
|
||||||
|
else \
|
||||||
|
\"null\" \
|
||||||
|
end \
|
||||||
|
)" \
|
||||||
|
)
|
||||||
|
|
||||||
|
user=$(jq -r '.user' <<<$j)
|
||||||
|
port=$(jq -r '.port' <<<$j)
|
||||||
|
hostname=$(jq -r '.hostname' <<<$j)
|
||||||
|
jumps=$(jq -r '.jumps' <<<$j)
|
||||||
|
|
||||||
|
|
||||||
|
echo "$(cat <<EOF
|
||||||
|
User $user
|
||||||
|
HostName $hostname\
|
||||||
|
$([[ $port != "null" ]] && echo -e "\nPort $port")\
|
||||||
|
$([[ $jumps != "null" ]] && echo -e "\nProxyJump $jumps")
|
||||||
|
|
||||||
|
command:
|
||||||
|
ssh $user@$hostname$([[ $port != "null" ]] && echo -n " -p $port")$([[ $jumps != "null" ]] && echo -n " -J $jumps")
|
||||||
|
EOF
|
||||||
|
)"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if command -v host 2>&1 >/dev/null; then
|
||||||
|
host $hostname
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
ping -c 1 -W 1 $hostname &>/dev/null \
|
||||||
|
&& echo "Host is reachable!" \
|
||||||
|
|| echo "Host is not reachable!"
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f _ssh_menu_preview
|
||||||
|
|
||||||
|
function ssh-menu {
|
||||||
|
selected="$(rg -N --no-heading '^Host .*' ~/.ssh \
|
||||||
|
| sed 's/Host \(.*\)/\1/' | sort \
|
||||||
|
| SHELL=$(which bash) fzf --cycle \
|
||||||
|
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||||
|
--delimiter ':' \
|
||||||
|
--with-nth 2 \
|
||||||
|
--preview "_ssh_menu_preview {1} {2}" \
|
||||||
|
--preview-label "ssh config info" \
|
||||||
|
--header "Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER." \
|
||||||
|
--border "double" \
|
||||||
|
--border-label "ssh-menu" \
|
||||||
|
--ansi \
|
||||||
|
--highlight-line \
|
||||||
|
| cut -d ":" -f2
|
||||||
|
)"
|
||||||
|
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
ssh "$selected"
|
||||||
|
}
|
||||||
|
|
||||||
|
ssh-menu
|
||||||
Reference in New Issue
Block a user