добавлены конфиг для терминала
No files matched your search
|
After Width: | Height: | Size: 878 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
@@ -0,0 +1,53 @@
|
||||
##
|
||||
set autoindent
|
||||
set linenumbers
|
||||
set mouse
|
||||
# set softwrap
|
||||
|
||||
##
|
||||
syntax "Nanorc" "\.?nanorc$"
|
||||
comment "#"
|
||||
|
||||
## Possible errors and parameters
|
||||
icolor brightred "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
|
||||
## Colors
|
||||
icolor black " black"
|
||||
icolor red " red"
|
||||
icolor green " green"
|
||||
icolor yellow " yellow"
|
||||
icolor blue " blue"
|
||||
icolor magenta " magenta"
|
||||
icolor cyan " cyan"
|
||||
icolor white " white"
|
||||
icolor normal " normal"
|
||||
icolor brightblack " brightblack"
|
||||
icolor brightred " brightred"
|
||||
icolor brightgreen " brightgreen"
|
||||
icolor brightyellow " brightyellow"
|
||||
icolor brightblue " brightblue"
|
||||
icolor brightmagenta " brightmagenta"
|
||||
icolor brightcyan " brightcyan"
|
||||
icolor brightwhite " brightwhite"
|
||||
icolor ,black ",black "
|
||||
icolor ,red ",red "
|
||||
icolor ,green ",green "
|
||||
icolor ,yellow ",yellow "
|
||||
icolor ,blue ",blue "
|
||||
icolor ,magenta ",magenta "
|
||||
icolor ,cyan ",cyan "
|
||||
icolor ,white ",white "
|
||||
icolor ,normal ",normal"
|
||||
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
||||
icolor yellow "^[[:space:]]*(set|unset)[[:space:]]+(errorcolor|functioncolor|keycolor|numbercolor|selectedcolor|statuscolor|stripecolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>"
|
||||
|
||||
## Keywords
|
||||
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backupdir|boldtext|brackets|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|errorcolor|fill|functioncolor|guidestripe|historylog|jumpyscrolling|keycolor|linenumbers|locking|matchbrackets|morespace|mouse|multibuffer|noconvert|nohelp|nonewlines|nopauses|nowrap|numbercolor|operatingdir|positionlog|preserve|punct|quickblank|quotestr|rawsequences|rebinddelete|regexp|selectedcolor|showcursor|smarthome|smooth|softwrap|speller|statuscolor|stripecolor|suspend|tabsize|tabstospaces|tempfile|titlecolor|trimblanks|unix|view|whitespace|wordbounds|wordchars|zap)\>"
|
||||
icolor green "^[[:space:]]*(bind|set|unset|syntax|header|include|magic)\>"
|
||||
## Strings
|
||||
icolor white ""(\\.|[^"])*""
|
||||
## Comments
|
||||
icolor brightblue "^[[:space:]]*#.*$"
|
||||
icolor cyan "^[[:space:]]*##.*$"
|
||||
|
||||
## Trailing whitespace
|
||||
icolor ,green "[[:space:]]+$"
|
||||
@@ -0,0 +1,73 @@
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
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
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load.
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment one of the following lines to change the auto-update behavior
|
||||
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||
zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
|
||||
# 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"
|
||||
|
||||
HIST_STAMPS="dd/mm/yyyy"
|
||||
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/h
|
||||
plugins=(
|
||||
git
|
||||
zsh-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
dirhistory
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# Compilation flags
|
||||
export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# Free JetBrains Pro (https://3.jetbra.in)
|
||||
#PS1='[\u@\h \W]\$ '
|
||||
#___MY_VMOPTIONS_SHELL_FILE="${HOME}/.jetbrains.vmoptions.sh"; if [ -f "${___MY_VMOPTIONS_SHELL_FILE}" ]; then . "${___MY_VMOPTIONS_SHELL_FILE}"; fi
|
||||
|
||||
# Keybind
|
||||
# bindkey "^[[1;3C" forward-word # ALT + ArrowRight
|
||||
# bindkey "^[[1;3D" backward-word # ALT + ArrowLeft
|
||||
|
||||
# Aliases
|
||||
eval $(thefuck --alias bruh)
|
||||
|
||||
if [ -x "$(command -v exa)" ]; then
|
||||
alias ls="exa"
|
||||
alias la="exa --long --all --group"
|
||||
fi
|
||||
|
||||
alias clck="tty-clock -c -s -b"
|
||||
|
||||
alias icat="kitten icat"
|
||||
alias s="kitten ssh"
|
||||
alias d="kitten diff"
|
||||
@@ -0,0 +1,4 @@
|
||||
## Настройка Kitty
|
||||
**Конфиг взят [отсюда](https://github.com/ttys3/my-kitty-config) и немного откорректирован**
|
||||
|
||||
`~/.config/kitty/kitty.conf`
|
||||
@@ -0,0 +1,63 @@
|
||||
# Dark One Nuanced by ariasuni, https://store.kde.org/p/1225908
|
||||
# Imported from KDE .colorscheme format by thematdev, https://thematdev.org
|
||||
# For migrating your schemes from Konsole format see
|
||||
# https://git.thematdev.org/thematdev/konsole-scheme-migration
|
||||
|
||||
|
||||
# importing Background
|
||||
background #212121
|
||||
# importing BackgroundFaint
|
||||
# importing BackgroundIntense
|
||||
# importing Color0
|
||||
color0 #3f4451
|
||||
# importing Color0Faint
|
||||
color16 #282c34
|
||||
# importing Color0Intense
|
||||
color8 #4f5666
|
||||
# importing Color1
|
||||
color1 #e06c75
|
||||
# importing Color1Faint
|
||||
color17 #c25d66
|
||||
# importing Color1Intense
|
||||
color9 #ff7b86
|
||||
# importing Color2
|
||||
color2 #98c379
|
||||
# importing Color2Faint
|
||||
color18 #82a566
|
||||
# importing Color2Intense
|
||||
color10 #b1e18b
|
||||
# importing Color3
|
||||
color3 #d19a66
|
||||
# importing Color3Faint
|
||||
color19 #b38257
|
||||
# importing Color3Intense
|
||||
color11 #efb074
|
||||
# importing Color4
|
||||
color4 #61afef
|
||||
# importing Color4Faint
|
||||
color20 #5499d1
|
||||
# importing Color4Intense
|
||||
color12 #67cdff
|
||||
# importing Color5
|
||||
color5 #c678dd
|
||||
# importing Color5Faint
|
||||
color21 #a966bd
|
||||
# importing Color5Intense
|
||||
color13 #e48bff
|
||||
# importing Color6
|
||||
color6 #56b6c2
|
||||
# importing Color6Faint
|
||||
color22 #44919a
|
||||
# importing Color6Intense
|
||||
color14 #63d4e0
|
||||
# importing Color7
|
||||
color7 #e6e6e6
|
||||
# importing Color7Faint
|
||||
color23 #c8c8c8
|
||||
# importing Color7Intense
|
||||
color15 #ffffff
|
||||
# importing Foreground
|
||||
foreground #abb2bf
|
||||
# importing ForegroundFaint
|
||||
# importing ForegroundIntense
|
||||
# importing General
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
kitty -o 'map f1 kitten hints --customize-processing custom-hints.py'
|
||||
When you press the F1 key you will be able to select a word to look it up in the Google dictionary.
|
||||
https://sw.kovidgoyal.net/kitty/kittens/hints/#completely-customizing-the-matching-and-actions-of-the-kitten
|
||||
ref https://github.com/kovidgoyal/kitty/blob/master/kitty/boss.py
|
||||
ref https://github.com/kovidgoyal/kitty/blob/master/kittens/hints/main.py
|
||||
"""
|
||||
|
||||
import re
|
||||
from kitty.clipboard import (
|
||||
set_primary_selection,
|
||||
set_clipboard_string
|
||||
)
|
||||
|
||||
RE_PATH = (
|
||||
r'(?=[ \t\n]|"|\(|\[|<|\')?'
|
||||
'(~/|/)?'
|
||||
'([-a-zA-Z0-9_+-,.]+/[^ \t\n\r|:"\'$%&)>\]]*)'
|
||||
)
|
||||
|
||||
RE_URL = (r"(https?://|git@|git://|ssh://|s*ftp://|file:///)"
|
||||
"[a-zA-Z0-9?=%/_.:,;~@!#$&()*+-]*")
|
||||
|
||||
|
||||
RE_COMMON_FILENAME = r'\s?([a-zA-Z0-9_.-/]*[a-zA-Z0-9_.-]+\.(ini|yml|yaml|vim|toml|conf|lua|go|php|rs|py|js|vue|jsx|html|htm|md|mp3|wav|flac|mp4|mkv|dll|exe|sh|txt|log|gz|tar|rar|7z|zip|mod|sum|iso|patch))\s?'
|
||||
|
||||
RE_URL_OR_PATH = RE_COMMON_FILENAME + "|" + RE_PATH + "|" + RE_URL
|
||||
|
||||
def mark(text, args, Mark, extra_cli_args, *a):
|
||||
# This function is responsible for finding all
|
||||
# matching text. extra_cli_args are any extra arguments
|
||||
# passed on the command line when invoking the kitten.
|
||||
# We mark all individual word for potential selection
|
||||
for idx, m in enumerate(re.finditer(RE_URL_OR_PATH, text)):
|
||||
start, end = m.span()
|
||||
mark_text = text[start:end].replace('\n', '').replace('\0', '').strip()
|
||||
# The empty dictionary below will be available as groupdicts
|
||||
# in handle_result() and can contain arbitrary data.
|
||||
yield Mark(idx, start, end, mark_text, {})
|
||||
|
||||
|
||||
def handle_result(args, data, target_window_id, boss, extra_cli_args, *a):
|
||||
# This function is responsible for performing some
|
||||
# action on the selected text.
|
||||
# matches is a list of the selected entries and groupdicts contains
|
||||
# the arbitrary data associated with each entry in mark() above
|
||||
matches, groupdicts = [], []
|
||||
for m, g in zip(data['match'], data['groupdicts']):
|
||||
if m:
|
||||
matches.append(m), groupdicts.append(g)
|
||||
for word, match_data in zip(matches, groupdicts):
|
||||
# Lookup the word in a dictionary, the open_url function
|
||||
# will open the provided url in the system browser
|
||||
# boss.open_url(f'https://www.google.com/search?q=define:{word}')
|
||||
# set_primary_selection(word)
|
||||
set_clipboard_string(word)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# vim:fileencoding=utf-8:foldmethod=marker
|
||||
# https://sw.kovidgoyal.net/kitty/kittens/diff/
|
||||
|
||||
#: Diffing {{{
|
||||
|
||||
syntax_aliases pyj:py pyi:py recipe:py
|
||||
|
||||
#: File extension aliases for syntax highlight For example, to syntax
|
||||
#: highlight file.xyz as file.abc use a setting of xyz:abc
|
||||
|
||||
num_context_lines 3
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
#kitty @ ls | ./kitty-convert-dump.py > session.conf
|
||||
|
||||
kitty @ ls | $HOME/.config/kitty/kitty-convert-dump.py > $HOME/.config/kitty/session.conf
|
||||
|
||||
echo "kitty session dumped"
|
||||
|
||||
echo; read -r -p "Press Enter to exit"; echo ""
|
||||
@@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
this tool is used to convert Kitty session dump to Kitty session file which can be loaded by Kitty
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def env_to_str(env):
|
||||
"""Convert an env list to a series of '--env key=value' parameters and return as a string."""
|
||||
s = ""
|
||||
for key in env:
|
||||
s += f"--env {key}={env[key]} "
|
||||
|
||||
return s.strip()
|
||||
|
||||
|
||||
def cmdline_to_str(cmdline):
|
||||
"""Convert a cmdline list to a space separated string."""
|
||||
s = ""
|
||||
for e in cmdline:
|
||||
s += f"{e} "
|
||||
|
||||
return s.strip()
|
||||
|
||||
|
||||
def fg_proc_to_str(fg):
|
||||
"""Convert a foreground_processes list to a space separated string."""
|
||||
s = ""
|
||||
fg = fg[0]
|
||||
|
||||
# s += f"--cwd {fg['cwd']} {cmdline_to_str(fg['cmdline'])}"
|
||||
s += f"{cmdline_to_str(fg['cmdline'])}"
|
||||
|
||||
if s == "kitty @ ls":
|
||||
return os.getenv("SHELL")
|
||||
return s
|
||||
|
||||
|
||||
def convert(session):
|
||||
"""Convert a kitty session dict, into a kitty session file and output it."""
|
||||
first = True
|
||||
for os_window in session:
|
||||
if first:
|
||||
first = False
|
||||
else:
|
||||
print("\nnew_os_window\n")
|
||||
|
||||
for tab in os_window["tabs"]:
|
||||
print("\n")
|
||||
print(f"new_tab {tab['title']}")
|
||||
# print('enabled_layouts *)
|
||||
print(f"layout {tab['layout']}")
|
||||
# This is a bit of a kludge to set cwd for the tab, as
|
||||
# setting it in the launch command didn't work, for some reason?
|
||||
if tab["windows"]:
|
||||
print(f"cd {tab['windows'][0]['cwd']}")
|
||||
|
||||
for w in tab["windows"]:
|
||||
# print(f"title {w['title']}")
|
||||
# skip dump "/usr/bin/kitty +hold command" or "/usr/bin/kitty +kitten ssh ..."
|
||||
# also skip "/usr/bin/kitten __hold_till_enter__ ...."
|
||||
if os.path.basename(w['foreground_processes'][0]['cmdline'][0]) in ["kitty", "kitten"]:
|
||||
continue
|
||||
if len(w['foreground_processes'][0]['cmdline']) >1 and os.path.basename(w['foreground_processes'][0]['cmdline'][1]) in ["dump-session.sh"]:
|
||||
continue
|
||||
# print(f"launch {env_to_str(w['env'])} {fg_proc_to_str(w['foreground_processes'])}")
|
||||
print(f"launch {fg_proc_to_str(w['foreground_processes'])}")
|
||||
if w["is_focused"]:
|
||||
print("focus")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
stdin = sys.stdin.readlines()
|
||||
session = json.loads("".join(stdin))
|
||||
convert(session)
|
||||
@@ -0,0 +1,265 @@
|
||||
# vim:fileencoding=utf-8:foldmethod=marker
|
||||
|
||||
# https://sw.kovidgoyal.net/kitty/conf/
|
||||
|
||||
# To get a full list of supported fonts use the `kitty +list-fonts` command.
|
||||
font_family family="MesloLGS NF"
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
font_size 13
|
||||
|
||||
scrollback_lines 8000
|
||||
|
||||
paste_actions quote-urls-at-prompt
|
||||
|
||||
strip_trailing_spaces never
|
||||
|
||||
select_by_word_characters @-./_~?&=%+#
|
||||
|
||||
show_hyperlink_targets yes
|
||||
|
||||
remote_kitty if-needed
|
||||
|
||||
# https://sw.kovidgoyal.net/kitty/kittens/ssh/#opt-kitten-ssh.share_connections
|
||||
share_connections yes
|
||||
|
||||
# unmap left click for open link (easy miss click)
|
||||
mouse_map left click ungrabbed no-op
|
||||
|
||||
#: Click the link under the mouse or move the cursor
|
||||
mouse_map ctrl+left click ungrabbed mouse_handle_click selection link prompt
|
||||
|
||||
mouse_map ctrl+left press ungrabbed mouse_selection normal
|
||||
|
||||
mouse_map right press ungrabbed copy_to_clipboard
|
||||
|
||||
hide_window_decorations yes
|
||||
|
||||
remember_window_size yes
|
||||
initial_window_width 640
|
||||
initial_window_height 400
|
||||
|
||||
#: If enabled, the window size will be remembered so that new
|
||||
#: instances of kitty will have the same size as the previous
|
||||
#: instance. If disabled, the window will initially have size
|
||||
#: configured by initial_window_width/height, in pixels. You can use a
|
||||
#: suffix of "c" on the width/height values to have them interpreted
|
||||
#: as number of cells instead of pixels.
|
||||
|
||||
# fat -- One (or optionally more) windows are shown full width on the top, the rest of the windows are shown side-by-side on the bottom
|
||||
# grid -- All windows are shown in a grid
|
||||
# horizontal -- All windows are shown side-by-side
|
||||
# splits -- Windows arranged in arbitrary patterns created using horizontal and vertical splits
|
||||
# stack -- Only a single maximized window is shown at a time
|
||||
# tall -- One (or optionally more) windows are shown full height on the left, the rest of the windows are shown one below the other on the right
|
||||
# vertical -- All windows are shown one below the other
|
||||
|
||||
enabled_layouts splits,stack
|
||||
#enabled_layouts all
|
||||
|
||||
# Send a notification when a command takes more than 30 seconds in a invisible window
|
||||
#notify_on_cmd_finish invisible 30.0
|
||||
|
||||
# https://sw.kovidgoyal.net/kitty/layouts/#the-splits-layout
|
||||
include splits.conf
|
||||
|
||||
#: The enabled window layouts. A comma separated list of layout names.
|
||||
#: The special value all means all layouts. The first listed layout
|
||||
#: will be used as the startup layout. Default configuration is all
|
||||
#: layouts in alphabetical order. For a list of available layouts, see
|
||||
#: the https://sw.kovidgoyal.net/kitty/overview/#layouts.
|
||||
|
||||
window_resize_step_cells 2
|
||||
window_resize_step_lines 2
|
||||
|
||||
#: The step size (in units of cell width/cell height) to use when
|
||||
#: resizing kitty windows in a layout with the keyboard
|
||||
#: (start_resizing_window). The cells value is used for horizontal
|
||||
#: resizing and the lines value for vertical resizing.
|
||||
|
||||
window_border_width 0.5pt
|
||||
|
||||
|
||||
visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
|
||||
#: The list of characters to use for visual window selection (for
|
||||
#: example for selecting a window to focus with focus_visible_window).
|
||||
#: The value should be a series of unique numbers or alphabets, case
|
||||
#: insensitive, from the set [0-9A-Z]. Specify your preference as a
|
||||
#: string of characters.
|
||||
|
||||
# with Shell integration enabled, using negative values means windows sitting at a shell prompt are not counted,
|
||||
# only windows where some command is currently running.
|
||||
# see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.confirm_os_window_close
|
||||
confirm_os_window_close -1
|
||||
|
||||
tab_bar_style powerline
|
||||
|
||||
|
||||
# emoji from https://emojipedia.org/regional-indicator-symbol-letter-z/
|
||||
# title parse see https://github.com/kovidgoyal/kitty/blob/587f44ad4eb7fe545b0e580168cf0c32117b87c7/kitty/tab_bar.py#L175
|
||||
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{'🇿' if layout_name == 'stack' and num_windows > 1 else ''}{title}"
|
||||
|
||||
|
||||
#: The foreground and background colors
|
||||
|
||||
background_opacity 1.0
|
||||
|
||||
background_image none
|
||||
|
||||
#: Path to a background image. Must be in PNG format.
|
||||
|
||||
background_image_layout tiled
|
||||
|
||||
#: Whether to tile, scale or clamp the background image. The value can
|
||||
#: be one of tiled, mirror-tiled, scaled, clamped.
|
||||
|
||||
background_image_linear no
|
||||
|
||||
#: When background image is scaled, whether linear interpolation
|
||||
#: should be used.
|
||||
|
||||
dynamic_background_opacity yes
|
||||
|
||||
#: Allow changing of the background_opacity dynamically, using either
|
||||
#: keyboard shortcuts (increase_background_opacity and
|
||||
#: decrease_background_opacity) or the remote control facility.
|
||||
#: Changing this setting by reloading the config is not supported.
|
||||
|
||||
|
||||
allow_remote_control yes
|
||||
|
||||
#: Allow other programs to control kitty. If you turn this on other
|
||||
#: programs can control all aspects of kitty, including sending text
|
||||
#: to kitty windows, opening new windows, closing windows, reading the
|
||||
#: content of windows, etc. Note that this even works over ssh
|
||||
#: connections. You can chose to either allow any program running
|
||||
#: within kitty to control it, with yes or only programs that connect
|
||||
#: to the socket specified with the kitty --listen-on command line
|
||||
#: option, if you use the value socket-only. The latter is useful if
|
||||
#: you want to prevent programs running on a remote computer over ssh
|
||||
#: from controlling kitty. Reloading the config will not affect this
|
||||
#: setting.
|
||||
|
||||
#listen_on unix:$XDG_RUNTIME_DIR/kitty.sock
|
||||
#listen_on tcp:localhost:12488
|
||||
|
||||
|
||||
#: Tell kitty to listen to the specified unix/tcp socket for remote
|
||||
#: control connections. Note that this will apply to all kitty
|
||||
#: instances. It can be overridden by the kitty --listen-on command
|
||||
#: line flag. This option accepts only UNIX sockets, such as
|
||||
#: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment
|
||||
#: variables are expanded. If {kitty_pid} is present then it is
|
||||
#: replaced by the PID of the kitty process, otherwise the PID of the
|
||||
#: kitty process is appended to the value, with a hyphen. This option
|
||||
#: is ignored unless you also set allow_remote_control to enable
|
||||
#: remote control. See the help for kitty --listen-on for more
|
||||
#: details. Changing this option by reloading the config is not
|
||||
#: supported.
|
||||
|
||||
|
||||
#startup_session none
|
||||
startup_session session.conf
|
||||
|
||||
|
||||
allow_hyperlinks yes
|
||||
|
||||
#: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8
|
||||
#: escape sequences are ignored. Otherwise they become clickable
|
||||
#: links, that you can click by with the mouse or the hints kitten
|
||||
#: </kittens/hints>. The special value of ``ask`` means that kitty
|
||||
#: will ask before opening the link when clicked.
|
||||
|
||||
shell_integration enabled
|
||||
|
||||
#: Enable shell integration on supported shells. This enables features
|
||||
#: such as jumping to previous prompts, browsing the output of the
|
||||
#: previous command in a pager, etc. on supported shells. Set to
|
||||
#: ``disabled`` to turn off shell integration, completely. See
|
||||
#: https://sw.kovidgoyal.net/kitty/shell-integration/ for details.
|
||||
|
||||
#term xterm-kitty
|
||||
term xterm-256color
|
||||
|
||||
|
||||
kitty_mod ctrl+shift
|
||||
|
||||
# kitty_mod has to be modifiers not keys, see
|
||||
# https://github.com/kovidgoyal/kitty/discussions/3457#discussioncomment-587511
|
||||
# so you can NOT do this:
|
||||
#kitty_mod ctrl+a
|
||||
|
||||
|
||||
#map kitty_mod+enter new_window
|
||||
# disable this as can lead to window created by accident via press by ctrl+shift+v paste command and then press enter
|
||||
map kitty_mod+enter no-op
|
||||
map cmd+enter no-op
|
||||
|
||||
|
||||
map ctrl+a>x close_window
|
||||
|
||||
map ctrl+a>] next_window
|
||||
|
||||
map ctrl+a>[ previous_window
|
||||
|
||||
map ctrl+a>period move_window_forward
|
||||
|
||||
map ctrl+a>comma move_window_backward
|
||||
|
||||
|
||||
#map kitty_mod+t new_tab_with_cwd
|
||||
# map kitty_mod+t new_tab
|
||||
map kitty_mod+t launch --location=hsplit
|
||||
# new_tab will not keep cwd, use `new_tab_with_cwd` instead or `launch --cwd=current --type=tab`
|
||||
# see https://sw.kovidgoyal.net/kitty/faq/#how-do-i-open-a-new-window-or-tab-with-the-same-working-directory-as-the-current-window
|
||||
# tmux like tab create via `--cwd=last_reported`, warning: this need kitty `shell_integration enabled`
|
||||
map ctrl+a>c launch --cwd=last_reported --type=tab
|
||||
|
||||
map ctrl+a>, set_tab_title
|
||||
|
||||
|
||||
#: Increase font size
|
||||
map ctrl+equal change_font_size all +2.0
|
||||
map ctrl+plus change_font_size all +2.0
|
||||
map ctrl+kp_add change_font_size all +2.0
|
||||
|
||||
|
||||
#: Decrease font size
|
||||
map ctrl+minus change_font_size all -2.0
|
||||
map ctrl+kp_subtract change_font_size all -2.0
|
||||
|
||||
|
||||
#: Reset font size
|
||||
map ctrl+0 change_font_size all 0
|
||||
|
||||
|
||||
map f11 toggle_fullscreen
|
||||
|
||||
|
||||
# map ctrl+a>e edit_config_file
|
||||
map ctrl+a>e no-op
|
||||
map ctrl+a>shift+e launch --type=tab nvim ~/.config/kitty/kitty.conf
|
||||
|
||||
|
||||
#: Reload kitty.conf
|
||||
map ctrl+a>shift+r combine : load_config_file : launch --type=overlay sh -c 'echo "kitty config reloaded."; echo; read -r -p "Press Enter to exit"; echo ""'
|
||||
|
||||
#: Debug kitty configuration
|
||||
map ctrl+a>shift+d debug_config
|
||||
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
include current-theme.conf
|
||||
|
||||
# default alphabet see https://github.com/kovidgoyal/kitty/blob/0c4b20aa4e6b29ccf7c389e15d7ff5189f8e98f5/kittens/hints/main.py#L125
|
||||
# qwerty alphabets borrow from https://github.com/fcsonline/tmux-thumbs#Alphabets
|
||||
map ctrl+a>space kitten hints --alphabet asdfqwerzxcvjklmiuopghtybn1234567890 --customize-processing custom-hints.py
|
||||
|
||||
map f3 kitten hints --program '*'
|
||||
|
||||
# https://github.com/console-rs/console/pull/85/files
|
||||
# https://github.com/console-rs/console/pull/84
|
||||
# map double ctrl+a to ctrl+a (home)
|
||||
map ctrl+a>ctrl+a send_text all \x01
|
||||
@@ -0,0 +1,4 @@
|
||||
# Open any image in the full kitty window by clicking on it
|
||||
protocol file
|
||||
mime image/*
|
||||
action launch --type=overlay kitty +kitten icat --hold ${FILE_PATH}
|
||||
@@ -0,0 +1,80 @@
|
||||
# warning: hsplit or vsplit only works correctly when using `splits` layout
|
||||
|
||||
# Create a new window splitting the space used by the existing one so that
|
||||
# the two windows are placed one above the other
|
||||
# tmux like window split via `--cwd=last_reported`, warning: this need kitty `shell_integration enabled`
|
||||
#map F5 launch --location=hsplit --cwd=last_reported
|
||||
map ctrl+a>minus launch --location=hsplit --cwd=last_reported
|
||||
|
||||
# workaround for ssh kitten
|
||||
map ctrl+a>shift+minus launch --location=hsplit
|
||||
|
||||
|
||||
# Create a new window splitting the space used by the existing one so that
|
||||
# the two windows are placed side by side
|
||||
# tmux like window split via `--cwd=last_reported`, warning: this need kitty `shell_integration enabled`
|
||||
#map F6 launch --location=vsplit --cwd=last_reported
|
||||
map ctrl+a>backslash launch --location=vsplit --cwd=last_reported
|
||||
|
||||
map ctrl+a>shift+backslash launch --location=vsplit
|
||||
|
||||
# Create a new window splitting the space used by the existing one so that
|
||||
# the two windows are placed side by side if the existing window is wide or
|
||||
# one above the other if the existing window is tall.
|
||||
map F4 launch --location=split
|
||||
|
||||
# Rotate the current split, chaging its split axis from vertical to
|
||||
# horizontal or vice versa
|
||||
map F7 layout_action rotate
|
||||
|
||||
# Move the active window in the indicated direction
|
||||
map shift+up move_window up
|
||||
map shift+left move_window left
|
||||
map shift+right move_window right
|
||||
map shift+down move_window down
|
||||
|
||||
# Switch focus to the neighboring window in the indicated direction
|
||||
map alt+left neighboring_window left
|
||||
map alt+right neighboring_window right
|
||||
map alt+up neighboring_window up
|
||||
map alt+down neighboring_window down
|
||||
|
||||
|
||||
map ctrl+a>h neighboring_window left
|
||||
map ctrl+a>l neighboring_window right
|
||||
map ctrl+a>k neighboring_window up
|
||||
map ctrl+a>j neighboring_window down
|
||||
|
||||
|
||||
# https://sw.kovidgoyal.net/kitty/layouts/#window-resizing
|
||||
map alt+n resize_window narrower
|
||||
map alt+w resize_window wider
|
||||
map alt+u resize_window taller
|
||||
map alt+d resize_window shorter 3
|
||||
# reset all windows in the tab to default sizes
|
||||
map ctrl+home resize_window reset
|
||||
|
||||
# zoom toggle https://sw.kovidgoyal.net/kitty/kittens/custom/#using-kittens-to-script-kitty-without-any-terminal-ui
|
||||
map ctrl+a>z kitten zoom_toggle.py
|
||||
# https://sw.kovidgoyal.net/kitty/actions/#action-toggle_layout
|
||||
#map ctrl+a>z toggle_layout stack
|
||||
|
||||
# https://sw.kovidgoyal.net/kitty/faq/#how-do-i-change-the-colors-in-a-running-kitty-instance
|
||||
map ctrl+a>t kitten themes
|
||||
|
||||
map ctrl+a>q focus_visible_window
|
||||
|
||||
map ctrl+a>1 goto_tab 1
|
||||
map ctrl+a>2 goto_tab 2
|
||||
map ctrl+a>3 goto_tab 3
|
||||
map ctrl+a>4 goto_tab 4
|
||||
map ctrl+a>5 goto_tab 5
|
||||
map ctrl+a>6 goto_tab 6
|
||||
map ctrl+a>7 goto_tab 7
|
||||
map ctrl+a>8 goto_tab 8
|
||||
map ctrl+a>9 goto_tab 9
|
||||
map ctrl+a>0 goto_tab 10
|
||||
|
||||
map ctrl+a>s launch --type=overlay --allow-remote-control ~/.config/kitty/dump-session.sh
|
||||
|
||||
map ctrl+q close_os_window
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
zoom toggle
|
||||
ref https://sw.kovidgoyal.net/kitty/kittens/custom/#using-kittens-to-script-kitty-without-any-terminal-ui
|
||||
"""
|
||||
|
||||
def main(args):
|
||||
pass
|
||||
|
||||
from kittens.tui.handler import result_handler
|
||||
@result_handler(no_ui=True)
|
||||
def handle_result(args, answer, target_window_id, boss):
|
||||
tab = boss.active_tab
|
||||
if tab is not None:
|
||||
# do not switch to stack layout if we have only one window
|
||||
if len(tab.windows) > 1:
|
||||
if tab.current_layout.name == 'stack':
|
||||
tab.goto_layout('splits')
|
||||
else:
|
||||
tab.goto_layout('stack')
|
||||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"label" : "lock",
|
||||
"action" : "hyprlock",
|
||||
"text" : "Lock",
|
||||
"keybind" : "l"
|
||||
}
|
||||
|
||||
{
|
||||
"label" : "logout",
|
||||
"action" : "hyprctl dispatch exit 0",
|
||||
"text" : "Logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
|
||||
{
|
||||
"label" : "suspend",
|
||||
"action" : "systemctl suspend && hyprlock --immediate",
|
||||
"text" : "Suspend",
|
||||
"keybind" : "u"
|
||||
}
|
||||
|
||||
{
|
||||
"label" : "shutdown",
|
||||
"action" : "systemctl poweroff",
|
||||
"text" : "Shutdown",
|
||||
"keybind" : "s"
|
||||
}
|
||||
|
||||
{
|
||||
"label" : "hibernate",
|
||||
"action" : "systemctl hibernate && hyprlock --immediate",
|
||||
"text" : "Hibernate",
|
||||
"keybind" : "h"
|
||||
}
|
||||
|
||||
{
|
||||
"label" : "reboot",
|
||||
"action" : "systemctl reboot",
|
||||
"text" : "Reboot",
|
||||
"keybind" : "r"
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
* {
|
||||
background-image: none;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@import "$HOME/.config/waybar/theme.css";
|
||||
|
||||
window {
|
||||
background-color: rgba(17, 17, 27, 0.35);
|
||||
}
|
||||
|
||||
button {
|
||||
color: @main-fg;
|
||||
font-weight: bold;
|
||||
background-color: transparent;
|
||||
outline-style: none;
|
||||
border: none;
|
||||
border-width: 0px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 20%;
|
||||
border-radius: 0px;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
animation: gradient_f 20s ease-in infinite;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
background-color: @main-bg;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: @main-bg;
|
||||
background-size: 40%;
|
||||
border-radius: ${active_rad}px;
|
||||
animation: gradient_f 20s ease-in infinite;
|
||||
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
|
||||
}
|
||||
|
||||
button:hover#lock {
|
||||
border-radius: ${active_rad}px;
|
||||
margin : ${hvr}px 0px ${hvr}px ${mgn}px;
|
||||
}
|
||||
|
||||
button:hover#logout {
|
||||
border-radius: ${active_rad}px;
|
||||
margin : ${hvr}px 0px ${hvr}px 0px;
|
||||
}
|
||||
|
||||
button:hover#suspend {
|
||||
border-radius: ${active_rad}px;
|
||||
margin : ${hvr}px 0px ${hvr}px 0px;
|
||||
}
|
||||
|
||||
button:hover#shutdown {
|
||||
border-radius: ${active_rad}px;
|
||||
margin : ${hvr}px 0px ${hvr}px 0px;
|
||||
}
|
||||
|
||||
button:hover#hibernate {
|
||||
border-radius: ${active_rad}px;
|
||||
margin : ${hvr}px 0px ${hvr}px 0px;
|
||||
}
|
||||
|
||||
button:hover#reboot {
|
||||
border-radius: ${active_rad}px;
|
||||
margin : ${hvr}px ${mgn}px ${hvr}px 0px;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("$HOME/.config/wlogout/icons/lock.png"), url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
|
||||
border-radius: 13px;
|
||||
margin : ${mgn}px 0px ${mgn}px ${mgn}px;
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("$HOME/.config/wlogout/icons/logout.png"), url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
|
||||
border-radius: 13px;
|
||||
margin : ${mgn}px 0px ${mgn}px 0px;
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("$HOME/.config/wlogout/icons/suspend.png"), url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
|
||||
border-radius: 13px;
|
||||
margin : ${mgn}px 0px ${mgn}px 0px;
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("$HOME/.config/wlogout/icons/shutdown.png"), url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
|
||||
border-radius: 13px;
|
||||
margin : ${mgn}px 0px ${mgn}px 0px;
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("$HOME/.config/wlogout/icons/hibernate.png"), url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
|
||||
border-radius: 13px;
|
||||
margin : ${mgn}px 0px ${mgn}px 0px;
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("$HOME/.config/wlogout/icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
|
||||
border-radius: 13px;
|
||||
margin : ${mgn}px ${mgn}px ${mgn}px 0px;
|
||||
}
|
||||
@@ -3,20 +3,25 @@
|
||||
<details><summary><b>Скриншот</b></summary>
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## Навигация
|
||||
- [Hyprland](#hyprland)
|
||||
- [Hyprpaper](#hyprpaper)
|
||||
- [Hyprlock](#hyprlock)
|
||||
- [Waybar](#waybar)
|
||||
- [Rofi](#rofi)
|
||||
- [Wlogout](#wlogout)
|
||||
- [Терминал](#терминал)
|
||||
- [Дополнительные пакеты](#дополнительные-пакеты)
|
||||
|
||||
|
||||
|
||||
## Hyprland
|
||||
|
||||
Оконный менеджер (WM) [[конфиги](./Configs/hypr/)]
|
||||
Оконный менеджер (WM) [[конфиг](./Configs/hypr/)]
|
||||
|
||||
```
|
||||
sudo pacman -S hyprland hyprpaper hyprlock
|
||||
@@ -38,9 +43,10 @@ sudo pacman -S hyprland hyprpaper hyprlock
|
||||
<details><summary><b>Скриншот</b></summary>
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## Waybar
|
||||
|
||||
Wayland бар [[конфиг](./Configs/waybar/)]
|
||||
@@ -53,38 +59,104 @@ sudo pacman -S waybar
|
||||
<details><summary><b>Скриншот</b></summary>
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## Rofi
|
||||
|
||||
Запуск приложений, интерфейс для буфера обмена и Wi-Fi [[конфиги](./Configs/rofi/)]
|
||||
Запуск приложений, интерфейс для буфера обмена и Wi-Fi [[конфиг](./Configs/rofi/)]
|
||||
|
||||
|
||||
```
|
||||
sudo pacman -S rofi networkmanager xdg-utils wl-clipboard cliphist
|
||||
sudo pacman -S rofi networkmanager wl-clipboard cliphist
|
||||
```
|
||||
|
||||
<details><summary><b>Скриншот (Лаунчер приложений)</b></summary>
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><b>Скриншот (Буфер обмена)</b></summary>
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
<details><summary><b>Скриншот (Wi-Fi)</b></summary>
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
### ...
|
||||
|
||||
|
||||
## Wlogout
|
||||
Блокировка экрана, выход, перезагрузка, выключение и т.д. [[конфиг](./Configs/wlogout/)]
|
||||
|
||||
<details><summary><b>Скриншот</b></summary>
|
||||
|
||||

|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## Терминал
|
||||
Эмулятор терминала - [Kitty](https://sw.kovidgoyal.net/kitty) [[конфиг](./Configs/kitty/)]
|
||||
|
||||
Оболочка - [Zsh](https://www.zsh.org/) [[конфиг](./Configs/.zshrc)]
|
||||
|
||||
Расширение для Zsh - [Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh)
|
||||
|
||||
Тема - [powerlevel10k](https://github.com/romkatv/powerlevel10k) [[конфиг](./Configs/.p10k.zsh)]
|
||||
|
||||
<details><summary><b>Скриншот</b></summary>
|
||||
|
||||

|
||||
</details><br>
|
||||
|
||||
Установка kitty и zsh
|
||||
```
|
||||
sudo pacman -S kitty zsh
|
||||
```
|
||||
Установка Oh My Zsh
|
||||
```
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
```
|
||||
Установка темы powerlevel10k
|
||||
```
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
```
|
||||
|
||||
Установка плагинов для zsh через Oh My Zsh:
|
||||
|
||||
- [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting)
|
||||
```
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||
```
|
||||
|
||||
- [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)
|
||||
```
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
```
|
||||
|
||||
Установка [exa](https://github.com/ogham/exa) (замена ls)
|
||||
```
|
||||
sudo pacman -S exa
|
||||
```
|
||||
|
||||
Корректировщик предыдущей команды [The F*ck](https://github.com/nvbn/thefuck)
|
||||
```
|
||||
sudo pacman -S thefuck
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Дополнительные пакеты
|
||||
|
||||
Управления яркостью экрана - [brightnessctl](https://github.com/Hummer12007/brightnessctl)
|
||||
|
||||
Копирование изображения в буфер обмена - [xdg-utils](https://archlinux.org/packages/?name=xdg-utils)
|
||||
|
||||
|
||||
|
||||
<br><hr>
|
||||
*PS: это мои первые конфиги для оконных менеджеров в общем.*
|
||||