chore: kde-neon -> linux, kitty themes + settings, install-script fixes

This commit is contained in:
Pratik Tripathy
2024-09-18 00:06:56 +05:30
parent 42b8551ef1
commit 90084f4780
15 changed files with 175 additions and 80 deletions

View File

@@ -7,7 +7,7 @@ switch-to-activity-fe100d1b-ab30-493d-9635-bce7284a67b9=Meta+F1,none,Switch to a
[KDE Keyboard Layout Switcher]
Switch keyboard layout to English (India, with rupee)=none,none,Switch keyboard layout to English (India\\, with rupee)
Switch to Last-Used Keyboard Layout=Meta+Alt+L,Meta+Alt+L,Switch to Last-Used Keyboard Layout
Switch to Next Keyboard Layout=,Meta+Alt+K,Switch to Next Keyboard Layout
Switch to Next Keyboard Layout=none,Meta+Alt+K,Switch to Next Keyboard Layout
_k_friendly_name=Keyboard Layout Switcher
[kaccess]

View File

@@ -1,39 +0,0 @@
# set PATH so it includes user's private bin if it exists
[ ! -d "$HOME/bin" ] || PATH="$HOME/bin:$PATH"
# set PATH so it includes user's private bin if it exists
[ ! -d "$HOME/.local/bin" ] || PATH="$HOME/.local/bin:$PATH"
# Set the config directory enviroment variable
[ ! -z "$XDG_CONFIG_HOME" ] || export XDG_CONFIG_HOME="$HOME/.config"
# Set the cache directory enviroment variable
[ ! -z "$XDG_CACHE_HOME" ] || export XDG_CACHE_HOME="$HOME/.cache"
# Set the data directory enviroment variable
[ ! -z "$XDG_DATA_HOME" ] || export XDG_DATA_HOME="$HOME/.local/share"
# Set the state directory enviroment variable
[ ! -z "$XDG_STATE_HOME" ] || export XDG_STATE_HOME="$HOME/.local/state"
##################################################################################
EDITOR=$(command -v nvim 2>/dev/null || command -v vim 2>/dev/null)
VISUAL=$EDITOR
# Manually follow steps from https://steamcommunity.com/app/646570/discussions/1/3935537639868400686
# To disable ~/.oracle_jre_usage/ from being created
# Source aliases
[ ! -f "$XDG_CONFIG_HOME/shell/aliases" ] || source "$XDG_CONFIG_HOME/shell/aliases"
[ ! -f "$XDG_CONFIG_HOME/shell/aliases_personal" ] || source "$XDG_CONFIG_HOME/shell/aliases_personal"
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
export LESSHISTFILE="$XDG_STATE_HOME/shell/lesshst"
export WGET_HSTS_FILE="$XDG_STATE_HOME/shell/wget-hsts-history" # wget aliased to use this path
# Setup Python
export PYENV_ROOT="$XDG_DATA_HOME/pyenv"
command -v pyenv >/dev/null && export PATH="$PATH:$PYENV_ROOT/bin"
command -v pyenv >/dev/null && eval "$(pyenv init -)"
export PYTHON_HISTORY="$XDG_STATE_HOME/shell/python_history" # will be picked up by Python 3.13+

View File

@@ -0,0 +1,61 @@
# vim:ft=kitty
## name: GitHub Dark Dimmed
## author: GitHub
## license: MIT
#: The basic colors
foreground #adbac7
background #22272e
selection_foreground #22272e
selection_background #539bf5
#: Cursor colors
cursor #539bf5
#: Tab bar colors
tab_bar_background #1c2128
active_tab_foreground #adbac7
active_tab_background #22272e
inactive_tab_foreground #768390
inactive_tab_background #1c2128
#: The basic 16 colors
#: black
color0 #545d68
color8 #636e7b
#: red
color1 #f47067
color9 #ff938a
#: green
color2 #57ab5a
color10 #6bc46d
#: yellow
color3 #c69026
color11 #daaa3f
#: blue
color4 #539bf5
color12 #6cb6ff
#: magenta
color5 #b083f0
color13 #dcbdfb
#: cyan
color6 #39c5cf
color14 #56d4dd
#: white
color7 #909dab
color15 #cdd9e5

View File

@@ -0,0 +1,47 @@
import re
from kittens.tui.handler import result_handler
from kitty.key_encoding import KeyEvent, parse_shortcut
def is_window_vim(window, vim_id):
fp = window.child.foreground_processes
return any(re.search(vim_id, p['cmdline'][0] if len(p['cmdline']) else '', re.I) for p in fp)
def encode_key_mapping(window, key_mapping):
mods, key = parse_shortcut(key_mapping)
event = KeyEvent(
mods=mods,
key=key,
shift=bool(mods & 1),
alt=bool(mods & 2),
ctrl=bool(mods & 4),
super=bool(mods & 8),
hyper=bool(mods & 16),
meta=bool(mods & 32),
).as_window_system_event()
return window.encoded_key(event)
def main():
pass
@result_handler(no_ui=True)
def handle_result(args, result, target_window_id, boss):
direction = args[1]
key_mapping = args[2]
vim_id = args[3] if len(args) > 3 else "n?vim"
window = boss.window_id_map.get(target_window_id)
if window is None:
return
if is_window_vim(window, vim_id):
for keymap in key_mapping.split(">"):
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
else:
boss.active_tab.neighboring_window(direction)

View File

@@ -69,6 +69,7 @@ export HOMEBREW_CLEANUP_MAX_AGE_DAYS=30
export GNUPGHOME="${XDG_CONFIG_HOME}/gnupg"
export LESSHISTFILE="${XDG_STATE_HOME}/shell/lesshst"
export WGETRC="${XDG_CONFIG_HOME}/wgetrc"
[ ! -f "$WGETRC" ] && touch "$WGETRC"
# Setup Python
export PYTHON_HISTORY="${XDG_STATE_HOME}/shell/python_history" # will be picked up by Python 3.13+

View File

@@ -55,7 +55,7 @@ zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
# Oh-my-zsh plugins
# zi snippet OMZP::aliases
zi snippet OMZP::aliases
# zi snippet OMZP::gitfast
zi snippet OMZP::aws
zi snippet OMZP::azure
@@ -68,7 +68,6 @@ zi snippet OMZP::git
zi snippet OMZP::gitignore
zi snippet OMZP::kitty
zi snippet OMZP::podman
# zi snippet OMZP::rust
zi snippet OMZP::sudo
zi snippet OMZP::systemd
zi snippet OMZP::timer
@@ -78,7 +77,7 @@ zi snippet OMZP::vi-mode
zi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/per-directory-history/per-directory-history.zsh
zi ice as"completion"
zi snippet OMZP::fd/_fd
#zi snippet OMZP::fd/_fd
# ZSH Auto-completion settings
autoload -Uz compinit