Compare commits

...

3 commits

Author SHA1 Message Date
Tobias Reisinger 90b64d8b50
Update configs 2024-06-24 15:25:28 +02:00
Tobias Reisinger 8e7155d2c7
Add zellij 2024-06-24 15:25:15 +02:00
Tobias Reisinger f7f2b3a020
Improve startup time in zsh 2024-06-21 22:38:08 +02:00
11 changed files with 42 additions and 24 deletions

View file

@ -32,6 +32,7 @@ declare -A mapper=(
["xprofile"]="$HOME/.xprofile" ["xprofile"]="$HOME/.xprofile"
["yadm"]="$HOME/.local/share/yadm/repo.git/config" ["yadm"]="$HOME/.local/share/yadm/repo.git/config"
["yadm-encrypt"]="$HOME/.config/yadm/encrypt" ["yadm-encrypt"]="$HOME/.config/yadm/encrypt"
["zellij"]="$HOME/.config/zellij/"
["zsh"]="$HOME/.config/zsh/.zshrc" ["zsh"]="$HOME/.config/zsh/.zshrc"
) )

View file

@ -3,7 +3,7 @@
modes="std modes="std
single single
single-sec single-sec
layout" zellij"
portalo_mode_std () { portalo_mode_std () {
echo "Loading portalo standard screen layout" echo "Loading portalo standard screen layout"
@ -23,12 +23,12 @@ portalo_mode_single_sec () {
yadm config --add local.class monitor-single-sec yadm config --add local.class monitor-single-sec
} }
portalo_mode_layout () { portalo_mode_zellij () {
layout_dir="$HOME/.config/hypr/layouts" layout_dir="$HOME/.config/zellij/layouts"
layouts=$(\ls -1 "$layout_dir") layouts=$(\ls -1 "$layout_dir")
layout=$(echo "$layouts" | $DMENU -p "layout") layout=$(echo "$layouts" | $DMENU -p "layout")
if [ -n "$layout" ]; then if [ -n "$layout" ]; then
"$layout_dir/$layout" $TERMINAL -e zellij --layout="$layout_dir/$layout"
fi fi
} }
@ -42,6 +42,6 @@ case $mode in
"std") portalo_mode_std ;; "std") portalo_mode_std ;;
"single") portalo_mode_single ;; "single") portalo_mode_single ;;
"single-sec") portalo_mode_single_sec ;; "single-sec") portalo_mode_single_sec ;;
"layout") portalo_mode_layout ;; "zellij") portalo_mode_zellij ;;
*) echo "'$mode' is not a valid mode (single, std)" ;; *) echo "'$mode' is not a valid mode (single, std)" ;;
esac esac

View file

@ -1,9 +0,0 @@
#!/usr/bin/env sh
base_path="$HOME/.cache/remote-sources"
file_path="$base_path/$2"
autoinstall file "$1" "$file_path"
# shellcheck disable=SC1090
. "$file_path"

View file

@ -71,6 +71,11 @@ AUTOINSTALL_ITEM_SOURCE="https://gist.githubusercontent.com/oshybystyi/475ee7768
AUTOINSTALL_ITEM_TARGET="${plugin_path:?}/git-auto-status/git-auto-status.plugin.zsh" AUTOINSTALL_ITEM_TARGET="${plugin_path:?}/git-auto-status/git-auto-status.plugin.zsh"
AUTOINSTALL_ITEM_GROUPS="oh-my-zsh" AUTOINSTALL_ITEM_GROUPS="oh-my-zsh"
AUTOINSTALL_ITEM_TYPE="exe"
AUTOINSTALL_ITEM_SOURCE="https://raw.githubusercontent.com/dracula/zsh-syntax-highlighting/master/zsh-syntax-highlighting.sh"
AUTOINSTALL_ITEM_TARGET="${plugin_path:?}/zsh-syntax-highlighting.sh"
AUTOINSTALL_ITEM_GROUPS="oh-my-zsh"
AUTOINSTALL_ITEM_TYPE="file" AUTOINSTALL_ITEM_TYPE="file"

View file

@ -43,6 +43,7 @@
yadm # dotfile manager yadm # dotfile manager
yq # tool for YAML yq # tool for YAML
yt-dlp # tool to download videos from the internet yt-dlp # tool to download videos from the internet
zellij # terminal multiplexer
zip # zip zip # zip
]; ];

View file

@ -53,3 +53,5 @@ windowrulev2 = workspace $ws_chat silent, class:(steam), title:^(Friends List)
windowrulev2 = fullscreen, class:^cs2$ windowrulev2 = fullscreen, class:^cs2$
windowrulev2 = workspace $ws_focus, class:^cs2$ windowrulev2 = workspace $ws_focus, class:^cs2$
windowrulev2 = fullscreen, class:^(steam_app_)
windowrulev2 = workspace $ws_focus, class:^(steam_app_)

View file

@ -25,12 +25,14 @@ general {
gaps_out = 6 gaps_out = 6
border_size = 1 border_size = 1
cursor_inactive_timeout = 0
no_cursor_warps = true
layout = dwindle layout = dwindle
} }
cursor {
inactive_timeout = 0
no_warps = true
}
misc { misc {
disable_hyprland_logo = true disable_hyprland_logo = true
background_color = 0x1E1F29 background_color = 0x1E1F29

View file

@ -28,7 +28,8 @@ def init(c):
c.url.searchengines = { c.url.searchengines = {
'DEFAULT': 'https://duckduckgo.com/?q={}', 'DEFAULT': 'https://duckduckgo.com/?q={}',
'ddg': 'https://duckduckgo.com/?q={}', 'ddg': 'https://duckduckgo.com/?q={}',
'kagi': 'https://kagi.com/search?q={}' 'kagi': 'https://kagi.com/search?q={}',
'lh': 'http://localhost:{}/',
} }
c.url.start_pages = [ c.url.start_pages = [
'https://rss.serguzim.me/', 'https://rss.serguzim.me/',

View file

@ -1,9 +1,14 @@
import keybindings import keybindings
import common import common
import linkwarden
config.load_autoconfig() config.load_autoconfig()
keybindings.init(config) keybindings.init(config)
common.init(c) common.init(c)
try:
linkwarden.init()
except:
pass
c.tabs.show = 'never' c.tabs.show = 'never'
c.statusbar.show = 'never' c.statusbar.show = 'never'

View file

@ -15,7 +15,7 @@ $cmd_duration\
[](bg:red fg:yellow)\ [](bg:red fg:yellow)\
$status\ $status\
[](bg:white fg:red)\ [](bg:white fg:red)\
${custom.asciinema_log}$shell\ ${custom.asciinema_log}${env_var.ZELLIJ}$shell\
[](bg:cyan fg:white)\ [](bg:cyan fg:white)\
$jobs\ $jobs\
[](cyan) [](cyan)
@ -42,6 +42,10 @@ when = ''' test -n "$ASCIINEMA_LOG" && test -n "$ASCIINEMA_REC" '''
style = "bg:white fg:black" style = "bg:white fg:black"
format = '[$output ]($style)' format = '[$output ]($style)'
[env_var.ZELLIJ]
style = "bg:white fg:black"
format = '[ ]($style)'
[directory] [directory]
read_only = "" read_only = ""
truncation_length = 8 truncation_length = 8

View file

@ -1,5 +1,12 @@
STARSHIP_START_TIME=$(starship time) # display shell startup time in starship
source "$HOME/.config/environment" source "$HOME/.config/environment"
omz_installed=false
if [ -d "$ZSH" ]; then
omz_installed=true
fi
autoinstall git "https://github.com/ohmyzsh/ohmyzsh.git" "$ZSH" autoinstall git "https://github.com/ohmyzsh/ohmyzsh.git" "$ZSH"
# Set name of the theme to load --- if set to "random", it will # Set name of the theme to load --- if set to "random", it will
@ -63,7 +70,9 @@ HIST_STAMPS="yyyy-mm-dd"
ZSH_CUSTOM=$ZDOTDIR/custom ZSH_CUSTOM=$ZDOTDIR/custom
export plugin_path="$ZSH_CUSTOM/plugins" export plugin_path="$ZSH_CUSTOM/plugins"
autoinstall run oh-my-zsh if [ $omz_installed = false ]; then
autoinstall run oh-my-zsh
fi
nix_completions="$HOME/.nix-profile/share/zsh/site-functions" nix_completions="$HOME/.nix-profile/share/zsh/site-functions"
if [ -d "$nix_completions" ]; then if [ -d "$nix_completions" ]; then
@ -88,7 +97,6 @@ plugins=(
'git' 'git'
'git-auto-status' 'git-auto-status'
'jump' 'jump'
'laravel5'
'nix-shell' 'nix-shell'
'nix-zsh-completions' 'nix-zsh-completions'
'rust' 'rust'
@ -114,9 +122,7 @@ export SAVEHIST=1000000
export HISTSIZE=1000000 export HISTSIZE=1000000
export HISTFILE="$HOME/.cache/zsh_history" export HISTFILE="$HOME/.cache/zsh_history"
source source-remote-file \ source "$plugin_path/zsh-syntax-highlighting.sh"
"https://raw.githubusercontent.com/dracula/zsh-syntax-highlighting/master/zsh-syntax-highlighting.sh" \
"dracula-syntax-highlighting"
[ -x "$(command -v atuin)" ] && eval "$(atuin init zsh --disable-up-arrow)" [ -x "$(command -v atuin)" ] && eval "$(atuin init zsh --disable-up-arrow)"
[ -x "$(command -v direnv)" ] && eval "$(direnv hook zsh)" [ -x "$(command -v direnv)" ] && eval "$(direnv hook zsh)"