Init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
encryption = "age"
|
||||
[age]
|
||||
identity = "~/.config/chezmoi/key.txt"
|
||||
|
||||
[bitwarden]
|
||||
unlock = "auto"
|
||||
@@ -0,0 +1,18 @@
|
||||
packages:
|
||||
arch:
|
||||
- 7zip
|
||||
- base-devel
|
||||
- bat
|
||||
- curl
|
||||
- eza
|
||||
- fzf
|
||||
- git
|
||||
- paru
|
||||
- ripgrep
|
||||
- tmux
|
||||
- wget
|
||||
- unzip
|
||||
- zsh
|
||||
aur:
|
||||
- prizrak-box-bin
|
||||
- tree-sitter-cli-github-bin
|
||||
@@ -0,0 +1,16 @@
|
||||
# tmux
|
||||
[".config/tmux/plugins/tpm"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/tmux-plugins/tpm"
|
||||
|
||||
[".config/tmux/plugins/tmux-resurrect"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/tmux-plugins/tmux-resurrect"
|
||||
|
||||
[".config/tmux/plugins/tmux-continuum"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/tmux-plugins/tmux-continuum"
|
||||
|
||||
[".config/tmux/plugins/tmux-sensible"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/tmux-plugins/tmux-sensible"
|
||||
@@ -0,0 +1,16 @@
|
||||
# ZSH
|
||||
[".config/zsh/.oh-my-zsh"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/ohmyzsh/ohmyzsh"
|
||||
|
||||
[".config/zsh/.oh-my-zsh/custom/plugins/zsh-autosuggestions"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/zsh-users/zsh-autosuggestions"
|
||||
|
||||
[".config/zsh/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/zsh-users/zsh-syntax-highlighting"
|
||||
|
||||
[".config/zsh/.oh-my-zsh/custom/themes/powerlevel10k"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/romkatv/powerlevel10k"
|
||||
@@ -0,0 +1,194 @@
|
||||
set $mod Mod4
|
||||
|
||||
font pango:DejaVu Sans Mono 10
|
||||
|
||||
# Start XDG autostart .desktop files using dex. See also
|
||||
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# Start compositor
|
||||
exec --no-startup-id picom
|
||||
|
||||
# Screenshot
|
||||
bindsym Print exec --no-startup-id flameshot gui;
|
||||
|
||||
# Round corners and gaps
|
||||
# gaps inner 5px
|
||||
# gaps outer 5px
|
||||
gaps vertical 15px
|
||||
gaps horizontal 15px
|
||||
|
||||
# Start Polybar
|
||||
exec_always --no-startup-id ~/.config/polybar/launch_polybar.sh
|
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
# Disable built-in X screensaver
|
||||
exec --no-startup-id xset s off
|
||||
exec --no-startup-id xset s noblank
|
||||
|
||||
# DPMS timeouts
|
||||
# Format: xset dpms standby suspend off (seconds; 0 = disable stage)
|
||||
exec --no-startup-id xset dpms 900 1800 0
|
||||
|
||||
# Alternative examples you can pick from:
|
||||
# exec --no-startup-id xset dpms 0 0 600 # off after 10 min, ignore standby/suspend
|
||||
# exec --no-startup-id xset -dpms # completely disable DPMS
|
||||
# exec --no-startup-id xset dpms 0 0 0 # never turn off
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3status killall -SIGUSR1 i3status
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
|
||||
bindsym XF86AudioPlay exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec kitty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
# bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
|
||||
# There also is i3-dmenu-desktop which only displays applications shipping a
|
||||
# .desktop file. It is a wrapper around dmenu, so you need that installed.
|
||||
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
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+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1; workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2; workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3; workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4; workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5; workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6; workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7; workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8; workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9; workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace number $ws10
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Calendar
|
||||
for_window [class="Yad" title="yad-calendar"] floating enable
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
# bar {
|
||||
# status_command i3status
|
||||
# }
|
||||
@@ -0,0 +1,62 @@
|
||||
# Fonts
|
||||
font_size 18
|
||||
font_family Fira Code Nerd Font
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
# Tabs
|
||||
tab_bar_edge bottom
|
||||
tab_bar_min_tabs 2
|
||||
tab_bar_style powerline
|
||||
tab_powerline_style slanted
|
||||
tab_title_max_length 20
|
||||
|
||||
# Cursor
|
||||
cursor_stop_blinking_after 0
|
||||
cursor_trail 1
|
||||
cursor_trail_decay 0.1 0.2
|
||||
|
||||
# Scrollback
|
||||
scrollback_lines 10000
|
||||
|
||||
# Mouse
|
||||
url_color #ff00ff
|
||||
url_style double
|
||||
detect_urls yes
|
||||
show_hyperlink_targets yes
|
||||
underline_hyperlinks always
|
||||
|
||||
# Color scheme
|
||||
foreground #dddddd
|
||||
background #000000
|
||||
background_opacity 0.8
|
||||
background_blur 1
|
||||
dynamic_background_opacity yes
|
||||
|
||||
# Advanced
|
||||
shell zsh -l
|
||||
editor .
|
||||
close_on_child_death no
|
||||
allow_hyperlinks yes
|
||||
|
||||
# Keymaps
|
||||
map ctrl+a>q close_window
|
||||
map ctrl+a>minus launch --location=hsplit
|
||||
map ctrl+a>pipe launch --location=vsplit
|
||||
|
||||
map ctrl+a>shift+h move_window left
|
||||
map ctrl+a>shift+j move_window down
|
||||
map ctrl+a>shift+k move_window up
|
||||
map ctrl+a>shift+l move_window right
|
||||
|
||||
map ctrl+a>h neighboring_window left
|
||||
map ctrl+a>j neighboring_window down
|
||||
map ctrl+a>k neighboring_window up
|
||||
map ctrl+a>l neighboring_window right
|
||||
|
||||
map ctrl+a>left resize_window narrower
|
||||
map ctrl+a>right resize_window wider
|
||||
map ctrl+a>up resize_window taller
|
||||
map ctrl+a>down resize_window shorter 3
|
||||
map ctrl+a>home resize_window reset
|
||||
@@ -0,0 +1,41 @@
|
||||
# GENERAL
|
||||
backend = "glx";
|
||||
vsync = true;
|
||||
detect-rounded-corners = false;
|
||||
detect-client-opacity = false;
|
||||
detect-transient = true;
|
||||
unredir-if-possible = true;
|
||||
|
||||
|
||||
|
||||
# CORNERS
|
||||
#corner-radius = 11;
|
||||
|
||||
# Exclude conditions for rounded corners.
|
||||
#rounded-corners-exclude = [
|
||||
# "window_type = 'dock'",
|
||||
# "window_type = 'desktop'"
|
||||
#];
|
||||
|
||||
blur: {
|
||||
method = "dual_kawase";
|
||||
strength = 6;
|
||||
background = true;
|
||||
background-frame = false;
|
||||
background-fixed = false;
|
||||
}
|
||||
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"role = 'xborder'",
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
"class_g = 'Chromium'",
|
||||
"class_g = 'Discord'",
|
||||
"class_g = 'Dunst'",
|
||||
"class_g = 'Peek'",
|
||||
"class_g *?= 'slop'",
|
||||
];
|
||||
@@ -0,0 +1,100 @@
|
||||
[colors]
|
||||
; Colors from https://github.com/rebelot/kanagawa.nvim
|
||||
background = #1F1F28
|
||||
foreground = #DCD7BA
|
||||
foreground-alt = #C8C093
|
||||
module-fg = #DCD7BA
|
||||
primary = #7E9CD8
|
||||
secondary = #7AA89F
|
||||
alert = #E82424
|
||||
disabled = #727169
|
||||
green = #98BB6C
|
||||
yellow = #FF9E3B
|
||||
red = #E46876
|
||||
blue = #7FB4CA
|
||||
|
||||
[bar/main]
|
||||
monitor = ${env:MONITOR:}
|
||||
width = calc(100% - 10px)
|
||||
height = 25
|
||||
bottom = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 2
|
||||
padding = 2
|
||||
module-margin = 1
|
||||
font-0 = sans:size=14;2
|
||||
font-1 = FontAwesome:size=12;2
|
||||
separator = |
|
||||
tray-position = right
|
||||
modules-left = i3
|
||||
modules-center = date
|
||||
modules-right = pulseaudio network memory filesystem tray
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-ws-numbers = true
|
||||
label-focused = %name%
|
||||
label-focused-foreground = ${colors.primary}
|
||||
label-focused-background = ${colors.background}
|
||||
label-focused-padding = 1
|
||||
label-unfocused = %name%
|
||||
label-unfocused-foreground = ${colors.disabled}
|
||||
label-unfocused-padding = 1
|
||||
label-visible = %name%
|
||||
label-visible-foreground = ${colors.foreground-alt}
|
||||
label-visible-padding = 1
|
||||
label-urgent = %name%
|
||||
label-urgent-foreground = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/calendar.sh
|
||||
interval = 1
|
||||
label-foreground = ${colors.foreground}
|
||||
click-left = ~/.config/polybar/scripts/calendar.sh --popup
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
label-volume = Vol: %percentage%%
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
label-muted = muted
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
click-right = pavucontrol
|
||||
scroll-up = pactl set-sink-volume @DEFAULT_SINK@ +2%
|
||||
scroll-down = pactl set-sink-volume @DEFAULT_SINK@ -2%
|
||||
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface = wlp3s0 ; Replace with your network interface (use ip link to check, e.g., wlan0 or enp0s3)
|
||||
interval = 3
|
||||
format-connected = <label-connected>
|
||||
label-connected = %essid% ↓%downspeed% ↑%upspeed%
|
||||
label-connected-foreground = ${colors.green}
|
||||
format-disconnected = <label-disconnected>
|
||||
label-disconnected = disconnected
|
||||
label-disconnected-foreground = ${colors.alert}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format = <label>
|
||||
label = RAM: %used% / %total% (%percentage_used%%)
|
||||
label-foreground = ${colors.yellow}
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
interval = 5
|
||||
format-mounted = <label-mounted>
|
||||
label-mounted = Disk: %used% / %total% (%percentage_used%%)
|
||||
label-mounted-foreground = ${colors.blue}
|
||||
|
||||
[module/tray]
|
||||
type = internal/tray
|
||||
tray-spacing = 2px
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pkill polybar
|
||||
|
||||
# Wait until all polybar processes are fully gone
|
||||
while pgrep -u "$UID" -x polybar >/dev/null; do
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
sleep 0.2
|
||||
|
||||
# Launch one instance per connected monitor
|
||||
if type "xrandr" > /dev/null; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
MONITOR="$m" polybar --reload main &
|
||||
done
|
||||
else
|
||||
polybar --reload main &
|
||||
fi
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
BAR_HEIGHT=22 # polybar height
|
||||
BORDER_SIZE=1 # border size from your wm settings
|
||||
YAD_WIDTH=222 # 222 is minimum possible value
|
||||
YAD_HEIGHT=193 # 193 is minimum possible value
|
||||
DATE="$(date +"%a %d %H:%M")"
|
||||
|
||||
case "$1" in
|
||||
--popup)
|
||||
if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval "$(xdotool getmouselocation --shell)"
|
||||
eval "$(xdotool getdisplaygeometry --shell)"
|
||||
|
||||
# X
|
||||
if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side
|
||||
: $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE))
|
||||
elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side
|
||||
: $((pos_x = BORDER_SIZE))
|
||||
else #Center
|
||||
: $((pos_x = X - YAD_WIDTH / 2))
|
||||
fi
|
||||
|
||||
# Y
|
||||
if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom
|
||||
: $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE))
|
||||
else #Top
|
||||
: $((pos_y = BAR_HEIGHT + BORDER_SIZE))
|
||||
fi
|
||||
|
||||
yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \
|
||||
--width="$YAD_WIDTH" --height="$YAD_HEIGHT" --posx="$pos_x" --posy="$pos_y" \
|
||||
--title="yad-calendar" --borders=0 >/dev/null &
|
||||
;;
|
||||
*)
|
||||
echo "$DATE"
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,9 @@
|
||||
strict_chain
|
||||
proxy_dns
|
||||
tcp_read_time_out 15000
|
||||
tcp_connect_time_out 8000
|
||||
localnet 127.0.0.0/255.0.0.0
|
||||
localnet ::1/128
|
||||
|
||||
[ProxyList]
|
||||
socks5 127.0.0.1 7890
|
||||
@@ -0,0 +1,24 @@
|
||||
# Snazzy Theme for tmux
|
||||
|
||||
# default statusbar colors
|
||||
set-option -g status-style bg=colour0,fg=colour205
|
||||
|
||||
# default window title colors
|
||||
set-window-option -g window-status-style fg=colour123,bg=default,dim
|
||||
|
||||
# active window title colors
|
||||
set-window-option -g window-status-current-style fg=colour84,bg=default,bright
|
||||
|
||||
# pane border
|
||||
set-option -g pane-border-style fg=colour81
|
||||
set-option -g pane-active-border-style fg=colour84
|
||||
|
||||
# message text
|
||||
set-option -g message-style bg=colour81,fg=colour17
|
||||
|
||||
# pane number display
|
||||
set-option -g display-panes-active-colour colour203
|
||||
set-option -g display-panes-colour colour84
|
||||
|
||||
# clock
|
||||
set-window-option -g clock-mode-colour colour205
|
||||
@@ -0,0 +1,44 @@
|
||||
set -g set-clipboard on
|
||||
|
||||
set-option -g base-index 1
|
||||
set-option -g pane-base-index 1
|
||||
|
||||
set-option -g mouse on
|
||||
|
||||
set-option -g history-limit 100000
|
||||
|
||||
set-option -g set-titles on
|
||||
set-option -g set-titles-string "#{pane_title}"
|
||||
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# open lazygit
|
||||
unbind g
|
||||
bind g display-popup -d "#{pane_current_path}" -w 80% -h 80% -E "lazygit"
|
||||
|
||||
# create new session
|
||||
unbind N
|
||||
bind N display-popup -E 'bash -i -c "read -p \"Session name: \" name; tmux new-session -d -s \$name && tmux switch-client -t \$name"'
|
||||
|
||||
# list sessions
|
||||
unbind l
|
||||
bind l display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
||||
|
||||
unbind t
|
||||
bind t display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 90% \
|
||||
-h 90% \
|
||||
-E "zsh"
|
||||
|
||||
set-option -s escape-time 0
|
||||
|
||||
source-file ~/.config/tmux/tmux-themes/snazzy.theme
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,91 @@
|
||||
# Enable Powerlevel10k instant prompt
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# Config
|
||||
HISTFILE=~/.config/zsh/.histfile
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt beep extendedglob notify
|
||||
unsetopt autocd nomatch
|
||||
bindkey -e
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# Exports
|
||||
export PATH="/usr/local/bin:$HOME/bin:$HOME/.local/bin:$HOME/.local/go/bin:$HOME/.dotnet/tools:$PATH"
|
||||
export ZSH="$HOME/.config/zsh/.oh-my-zsh"
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
export EDITOR="nvim"
|
||||
export TERM="kitty"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export NVIM_APPNAME="nvim/benq"
|
||||
export DOCKER_HOST=unix:///run/user/1000/docker.sock
|
||||
export GOPATH="$HOME/.local/go"
|
||||
|
||||
# Aliases
|
||||
|
||||
# lazy
|
||||
lg() {
|
||||
lazygit "$@"
|
||||
}
|
||||
|
||||
ld() {
|
||||
lazydocker "$@"
|
||||
}
|
||||
|
||||
# docker
|
||||
dcu() {
|
||||
docker compose up -d
|
||||
}
|
||||
|
||||
dcl() {
|
||||
docker compose logs -ft
|
||||
}
|
||||
|
||||
dcd() {
|
||||
docker compose down
|
||||
}
|
||||
|
||||
# Theme
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
plugins=(
|
||||
extract
|
||||
fzf
|
||||
git
|
||||
ssh-agent
|
||||
zsh-autosuggestions
|
||||
zsh-syntax-highlighting
|
||||
zsh-vi-mode
|
||||
)
|
||||
|
||||
# Auto-suggest
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
|
||||
# Completions
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||
autoload -U compinit && compinit
|
||||
|
||||
# Load OMZ
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# Set personal aliases, overriding those provided by Oh My Zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
|
||||
# users are encouraged to define aliases within a top-level file in
|
||||
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
|
||||
# - $ZSH_CUSTOM/aliases.zsh
|
||||
# - $ZSH_CUSTOM/macos.zsh
|
||||
# For a full list of active aliases, run `alias`.
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|
||||
|
||||
# Add identities
|
||||
ssh-add ~/.ssh/* 2>/dev/null
|
||||
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Chromium (proxied)
|
||||
Comment=Web Browser
|
||||
Exec=/usr/bin/chromium --proxy-server=socks5://localhost:7890 %U
|
||||
Icon=chromium
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;WebBrowser;
|
||||
StartupWMClass=chromium
|
||||
@@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=FlClashX
|
||||
Exec=~/apps/FlClashX.AppImage
|
||||
Categories=Utility
|
||||
Terminal=false
|
||||
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=osu!lazer
|
||||
Exec=~/apps/osu/osu.AppImage %u
|
||||
Icon=x-osu-lazer
|
||||
Categories=Game
|
||||
Terminal=false
|
||||
MimeType=application/x-osu-lazer;
|
||||
@@ -0,0 +1 @@
|
||||
/home/benq/.config/mimeapps.list
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-osu-lazer">
|
||||
<comment>osu!lazer</comment>
|
||||
<icon name="osu-lazer"/>
|
||||
<glob pattern="*.osz"/>
|
||||
<glob pattern="*.osk"/>
|
||||
<glob pattern="*.osr"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
@@ -0,0 +1,5 @@
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export ZSH="$HOME/.config/zsh/.oh-my-zsh"
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
export EDITOR="nvim"
|
||||
export TERM="kitty"
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
KEY_DIR="$HOME/.config/chezmoi"
|
||||
KEY_FILE="$KEY_DIR/key.txt"
|
||||
|
||||
mkdir -p "$KEY_DIR"
|
||||
chmod 700 "$KEY_DIR"
|
||||
|
||||
if (bw status | grep -q '"status": "locked"';) then
|
||||
export BW_SESSION=$(bw unlock --raw)
|
||||
fi
|
||||
|
||||
bw sync
|
||||
|
||||
bw get item "age-keys" \
|
||||
| jq -r '.fields[] | select(.name == "private_key") | .value' \
|
||||
> "$KEY_FILE"
|
||||
|
||||
if [[ -s "$KEY_FILE" ]]; then
|
||||
chmod 600 "$KEY_FILE"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "Installing and updating packages..."
|
||||
|
||||
{{ if eq .chezmoi.osRelease.idLike "arch" }}
|
||||
sudo pacman -Sy --noconfirm
|
||||
|
||||
pkgs=()
|
||||
{{ range .packages.arch }}
|
||||
pkgs+=("{{ . }}")
|
||||
{{ end }}
|
||||
|
||||
if [[ ${#pkgs[@]} -gt 0 ]]; then
|
||||
echo "Installing pacman packages"
|
||||
sudo pacman -S --noconfirm "${pkgs[@]}"
|
||||
fi
|
||||
|
||||
pkgs=()
|
||||
{{ range .packages.aur }}
|
||||
pkgs+=("{{ . }}")
|
||||
{{ end }}
|
||||
|
||||
if [[ ${#pkgs[@]} -gt 0 ]]; then
|
||||
echo "Installing AUR packages"
|
||||
paru -S --noconfirm "${pkgs[@]}"
|
||||
fi
|
||||
|
||||
{{ end }}
|
||||
|
||||
echo "Done"
|
||||
Reference in New Issue
Block a user