Compare commits
3 Commits
4f65f2d998
...
67907b8ab6
| Author | SHA1 | Date | |
|---|---|---|---|
| 67907b8ab6 | |||
| 7519fe3840 | |||
| 6986e3c8d2 |
16
README.md
16
README.md
@@ -28,13 +28,19 @@ Use ./stow.sh --unstow <folder_name> to remove configuration
|
||||
- allow microphone in steam: `sudo snap connect steam:audio-record :audio-record`
|
||||
- gamemode configuration:
|
||||
- renice=10
|
||||
|
||||
- diff for .ohmyzsh via patch files
|
||||
- ssh-agent:
|
||||
- ohmyzsh patch for agent location
|
||||
- `mv $HOME/.dots/remove-ssh.service ~/.config/systemd/user/remove-ssh.service`
|
||||
- `systemctl --user start remove-ssh`
|
||||
- `systemctl --user enable remove-ssh`
|
||||
|
||||
## Software
|
||||
|
||||
### Basics
|
||||
```
|
||||
sudo apt install \
|
||||
kitty tmux \
|
||||
kitty tmux zsh \
|
||||
git ripgrep fd-find fzf stow
|
||||
```
|
||||
|
||||
@@ -66,6 +72,10 @@ sudo snap install \
|
||||
steam
|
||||
```
|
||||
|
||||
```
|
||||
cargo install --locked zellij
|
||||
```
|
||||
|
||||
### Manual
|
||||
|
||||
- [Helix](https://github.com/helix-editor/helix/releases)
|
||||
@@ -78,7 +88,7 @@ sudo snap install \
|
||||
$ mkdir -p ~/.config/nix/
|
||||
$ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
|
||||
```
|
||||
- [woverlay](https://codeberg.org/rtx/woverlay)
|
||||
- [ohmyzsh](https://ohmyz.sh/)
|
||||
|
||||
## Extensions
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ PATH=$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$HOM
|
||||
EDITOR=hx
|
||||
VISUAL=hx
|
||||
_JAVA_AWT_WM_NONREPARENTING=1
|
||||
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
|
||||
# support jp input in gnome
|
||||
GTK_IM_MODULE=ibus
|
||||
|
||||
@@ -41,7 +41,7 @@ t() {
|
||||
tmux new-session -A -s ${1:-tmux}
|
||||
}
|
||||
z() {
|
||||
zellij a ${1:-dev} 2> /dev/null || zellij -s ${1:-dev}
|
||||
zellij attach ${1:-dev} 2> /dev/null || zellij -s ${1:-dev}
|
||||
}
|
||||
|
||||
# password hash (sed needed when using in docker-compose)
|
||||
|
||||
29
files/shell/.zshrc
Normal file
29
files/shell/.zshrc
Normal file
@@ -0,0 +1,29 @@
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
ZSH_THEME="robbyrussell"
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# You can also set it to another string to have that shown instead of the default red dots.
|
||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||
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.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
plugins=(git colored-man-pages rust ssh-agent)
|
||||
|
||||
zstyle :omz:plugins:ssh-agent helper sshaskpass
|
||||
|
||||
bindkey ^F forward-word
|
||||
bindkey ^B backward-word
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
[ -f ~/.shellrc.alias ] && source ~/.shellrc.alias
|
||||
[ -f ~/.shellrc.local ] && source ~/.shellrc.local
|
||||
@@ -178,29 +178,26 @@ keybinds clear-defaults=true {
|
||||
shared_except "locked" {
|
||||
bind "Alt p" { TogglePaneInGroup; }
|
||||
}
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "move" "prompt" "tmux" {
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "move" "prompt" {
|
||||
bind "Alt Shift m" { SwitchToMode "move"; }
|
||||
}
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "prompt" "tmux" {
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "prompt" {
|
||||
bind "Alt Shift g" { SwitchToMode "locked"; }
|
||||
bind "Alt Shift q" { Quit; }
|
||||
}
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "session" "prompt" "tmux" {
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "session" "prompt" {
|
||||
bind "Alt Shift o" { SwitchToMode "session"; }
|
||||
}
|
||||
shared_except "locked" "scroll" "search" "tmux" {
|
||||
bind "Ctrl b" { SwitchToMode "tmux"; }
|
||||
}
|
||||
shared_except "locked" "scroll" "entersearch" "renametab" "renamepane" "prompt" "tmux" {
|
||||
shared_except "locked" "scroll" "entersearch" "renametab" "renamepane" "prompt" {
|
||||
bind "Alt Shift s" { SwitchToMode "scroll"; }
|
||||
}
|
||||
shared_except "locked" "tab" "entersearch" "renametab" "renamepane" "prompt" "tmux" {
|
||||
shared_except "locked" "tab" "entersearch" "renametab" "renamepane" "prompt" {
|
||||
bind "Alt Shift t" { SwitchToMode "tab"; }
|
||||
}
|
||||
shared_except "locked" "pane" "entersearch" "renametab" "renamepane" "prompt" "tmux" {
|
||||
shared_except "locked" "pane" "entersearch" "renametab" "renamepane" "prompt" {
|
||||
bind "Alt Shift p" { SwitchToMode "pane"; }
|
||||
}
|
||||
shared_except "locked" "resize" "entersearch" "renametab" "renamepane" "prompt" "tmux" {
|
||||
shared_except "locked" "resize" "entersearch" "renametab" "renamepane" "prompt" {
|
||||
bind "Alt Shift r" { SwitchToMode "resize"; }
|
||||
}
|
||||
shared_except "normal" "locked" "entersearch" {
|
||||
@@ -209,7 +206,7 @@ keybinds clear-defaults=true {
|
||||
shared_except "normal" "locked" "entersearch" "renametab" "renamepane" {
|
||||
bind "esc" { SwitchToMode "normal"; }
|
||||
}
|
||||
shared_among "pane" "tmux" {
|
||||
shared_among "pane" {
|
||||
bind "x" { CloseFocus; SwitchToMode "normal"; }
|
||||
}
|
||||
shared_among "scroll" "search" {
|
||||
@@ -234,7 +231,7 @@ keybinds clear-defaults=true {
|
||||
bind "esc" { SwitchToMode "scroll"; }
|
||||
bind "enter" { SwitchToMode "search"; }
|
||||
}
|
||||
shared_among "entersearch" "renametab" "renamepane" "prompt" "tmux" {
|
||||
shared_among "entersearch" "renametab" "renamepane" "prompt" {
|
||||
bind "Ctrl g" { SwitchToMode "locked"; }
|
||||
bind "Ctrl m" { SwitchToMode "move"; }
|
||||
bind "Ctrl r" { SwitchToMode "resize"; }
|
||||
@@ -254,30 +251,9 @@ keybinds clear-defaults=true {
|
||||
renamepane {
|
||||
bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
|
||||
}
|
||||
shared_among "session" "tmux" {
|
||||
shared_among "session" {
|
||||
bind "d" { Detach; }
|
||||
}
|
||||
tmux {
|
||||
bind "left" { MoveFocus "left"; SwitchToMode "normal"; }
|
||||
bind "down" { MoveFocus "down"; SwitchToMode "normal"; }
|
||||
bind "up" { MoveFocus "up"; SwitchToMode "normal"; }
|
||||
bind "right" { MoveFocus "right"; SwitchToMode "normal"; }
|
||||
bind "space" { NextSwapLayout; }
|
||||
bind "\"" { NewPane "down"; SwitchToMode "normal"; }
|
||||
bind "%" { NewPane "right"; SwitchToMode "normal"; }
|
||||
bind "," { SwitchToMode "renametab"; }
|
||||
bind "[" { SwitchToMode "scroll"; }
|
||||
bind "Ctrl b" { Write 2; SwitchToMode "normal"; }
|
||||
bind "c" { NewTab; SwitchToMode "normal"; }
|
||||
bind "h" { MoveFocus "left"; SwitchToMode "normal"; }
|
||||
bind "j" { MoveFocus "down"; SwitchToMode "normal"; }
|
||||
bind "k" { MoveFocus "up"; SwitchToMode "normal"; }
|
||||
bind "l" { MoveFocus "right"; SwitchToMode "normal"; }
|
||||
bind "n" { GoToNextTab; SwitchToMode "normal"; }
|
||||
bind "o" { FocusNextPane; }
|
||||
bind "p" { GoToPreviousTab; SwitchToMode "normal"; }
|
||||
bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; }
|
||||
}
|
||||
}
|
||||
|
||||
// Plugin aliases - can be used to change the implementation of Zellij
|
||||
@@ -345,7 +321,7 @@ theme "everforest-light"
|
||||
// The name of the default layout to load on startup
|
||||
// Default: "default"
|
||||
//
|
||||
// default_layout "compact"
|
||||
default_layout "compact"
|
||||
|
||||
// The folder in which Zellij will look for layouts
|
||||
// (Requires restart)
|
||||
@@ -547,7 +523,7 @@ theme "everforest-light"
|
||||
// Whether to show tips on startup
|
||||
// Default: true
|
||||
//
|
||||
// show_startup_tips false
|
||||
show_startup_tips false
|
||||
|
||||
// Whether to show release notes on first version run
|
||||
// Default: true
|
||||
|
||||
4
lock.sh
4
lock.sh
@@ -1,4 +0,0 @@
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
|
||||
ssh-add -D
|
||||
dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
|
||||
8
remove-ssh.bash
Executable file
8
remove-ssh.bash
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
|
||||
while read x; do
|
||||
case "$x" in
|
||||
*"boolean true"*) echo SCREEN_LOCKED; ssh-add -D;;
|
||||
*"boolean false"*) echo SCREEN_UNLOCKED;;
|
||||
esac
|
||||
done
|
||||
10
remove-ssh.service
Normal file
10
remove-ssh.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Remove SSH keys on lock
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=/tmp/agent.sock
|
||||
ExecStart=%h/.dots/remove-ssh.bash
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
13
ssh-agent-location.patch
Normal file
13
ssh-agent-location.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
|
||||
index 8354864..61462fd 100644
|
||||
--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
|
||||
+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
|
||||
@@ -24,7 +24,7 @@ function _start_agent() {
|
||||
|
||||
# start ssh-agent and setup environment
|
||||
zstyle -t :omz:plugins:ssh-agent quiet || echo >&2 "Starting ssh-agent ..."
|
||||
- ssh-agent -s ${lifetime:+-t} ${lifetime} | sed '/^echo/d' >! "$ssh_env_cache"
|
||||
+ ssh-agent -a /tmp/agent.sock -s ${lifetime:+-t} ${lifetime} | sed '/^echo/d' >! "$ssh_env_cache"
|
||||
chmod 600 "$ssh_env_cache"
|
||||
. "$ssh_env_cache" > /dev/null
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=SSH key agent
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user