37 Commits
main ... linux

Author SHA1 Message Date
17bd981dbe Update kitty config 2024-03-15 09:25:03 +03:00
735f278b4f Update linux config 2024-03-14 11:16:56 +03:00
4e8fd092de Update main config 2024-03-14 11:13:21 +03:00
565127dd1e Update submodule 2024-03-14 11:10:52 +03:00
34f2b6d057 Update zsh submodule 2024-01-29 12:32:46 +03:00
b73d6d8218 Add kitty config 2024-01-29 12:11:00 +03:00
5097686b8a Update hyprland config 2024-01-09 00:21:05 +03:00
d4ea79d054 Make dim-screen smarter 2023-12-29 10:23:21 +03:00
17cfe1ba66 Rename task visualizer script 2023-12-29 10:22:49 +03:00
0cb129d95f Set terminal type 2023-12-29 10:21:14 +03:00
be29a4b29a Lock screen after 120s 2023-12-29 10:18:51 +03:00
582418bbee Dim screen on inactivity, then lock it 2023-12-27 22:20:05 +03:00
6ed1448668 Fix typo 2023-12-27 10:59:20 +03:00
3c91c43fdf Add example crontab file 2023-12-26 13:50:02 +03:00
e030b16b8f Add battery script 2023-12-26 13:47:56 +03:00
328b1eb452 Update zsh submodule 2023-12-26 11:50:08 +03:00
c0861925f2 Update .zshenv 2023-12-26 11:46:35 +03:00
072fa544e7 Add passmenu 2023-12-26 01:17:32 +03:00
3eb28e0bdc Add .gitconfig 2023-12-26 01:12:44 +03:00
c084dbb908 Update .zshenv 2023-12-26 01:08:44 +03:00
bc668fe422 Add zsh env 2023-12-26 01:07:26 +03:00
c69fb12c58 Add zsh config 2023-12-26 00:57:46 +03:00
3cc758d93a Update submodules 2023-12-26 00:22:17 +03:00
523d3f72ac Add custom scripts 2023-12-26 00:14:07 +03:00
897ffc6d1a Add custom scripts 2023-12-26 00:12:37 +03:00
fc991838ec Add nvim config as a submodule 2023-12-25 23:53:19 +03:00
9aaa3b9cb7 Add taskwarrior config 2023-12-25 23:24:05 +03:00
5f9ed3af89 Update timewarrior config 2023-12-25 23:19:53 +03:00
29d0d36bde Add timewarrior config 2023-12-25 23:19:20 +03:00
814452d840 Add hyprland config 2023-12-25 15:36:58 +03:00
ab71642867 Add btop config 2023-12-25 15:25:30 +03:00
620ca7b136 Add bat config 2023-12-25 15:18:20 +03:00
496529371b Add alacritty config 2023-12-25 15:14:27 +03:00
69cdb8c04e Enable kitty shortcuts because I use them while copy paste 2023-12-25 15:08:54 +03:00
7874d509ef Update tmux.conf 2023-12-25 15:05:33 +03:00
6d38905b4d Merge branch 'main' into linux 2023-12-25 14:59:24 +03:00
2990b556e2 Add darkman config 2023-12-25 14:12:20 +03:00
53 changed files with 3456 additions and 127 deletions

View File

@ -0,0 +1,919 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
#import:
# - /path/to/alacritty.yml
import:
- ~/.config/alacritty/themes/themes/tokyo-night.yml
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
TERM: alacritty
#window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. Both lines and columns
# must be non-zero for this to take effect. The number of columns must be at
# least `2`, while using a value of `0` for columns and lines will fall back
# to the window manager's recommended size
#dimensions:
# columns: 0
# lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
#padding:
# x: 0
# y: 0
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons
#decorations: full
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
#opacity: 1.0
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
#startup_mode: Windowed
# Window title
#title: Alacritty
# Allow terminal applications to change Alacritty's window title.
#dynamic_title: true
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# Decorations theme variant
#
# Override the variant of the System theme/GTK theme/Wayland client side
# decorations. Commonly supported values are `Dark`, `Light`, and `None` for
# auto pick-up. Set this to `None` to use the default theme variant.
#decorations_theme_variant: None
# Resize increments
#
# Prefer resizing window by discrete steps equal to cell dimensions.
#resize_increments: false
# Make `Option` key behave as `Alt` (macOS only):
# - OnlyLeft
# - OnlyRight
# - Both
# - None (default)
#option_as_alt: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Scrolling distance multiplier.
#multiplier: 3
# Font configuration
font:
normal:
family: FiraCode Nerd Font Mono
#family: FantasqueSansM Nerd Font Mono
style: regular
#font:
# Normal (roman) font face
#normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Regular
# Bold font face
#bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold
# Italic font face
#italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Italic
# Bold italic font face
#bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold Italic
# Point size
size: 18.0
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward.
#glyph_offset:
# x: 0
# y: 0
# Use built-in font for box drawing characters.
#
# If `true`, Alacritty will use a custom built-in font for box drawing
# characters (Unicode points 2500 - 259f).
#
#builtin_box_drawing: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Tomorrow Night)
#colors:
# Default colors
#primary:
# background: '#1d1f21'
# foreground: '#c5c8c6'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not
# present. If the bright foreground color is not set, or
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
# color will be used.
#dim_foreground: '#828482'
#bright_foreground: '#eaeaea'
# Cursor colors
#
# Colors which should be used to draw the terminal cursor.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#cursor:
# text: CellBackground
# cursor: CellForeground
# Vi mode cursor colors
#
# Colors for the cursor when the vi mode is active.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
# Search colors
#
# Colors used for the search bar and match highlighting.
#search:
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#matches:
# foreground: '#000000'
# background: '#ffffff'
#focused_match:
# foreground: '#ffffff'
# background: '#000000'
# Keyboard hints
#hints:
# First character in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#start:
# foreground: '#1d1f21'
# background: '#e9ff5e'
# All characters after the first one in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#end:
# foreground: '#e9ff5e'
# background: '#1d1f21'
# Line indicator
#
# Color used for the indicator displaying the position in history during
# search and vi mode.
#
# By default, these will use the opposing primary color.
#line_indicator:
# foreground: None
# background: None
# Footer bar
#
# Color used for the footer bar on the bottom, used by search regex input,
# hyperlink URI preview, etc.
#
#footer_bar:
# background: '#c5c8c6'
# foreground: '#1d1f21'
# Selection colors
#
# Colors which should be used to draw the selection area.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#selection:
# text: CellBackground
# background: CellForeground
# Normal colors
#normal:
# black: '#1d1f21'
# red: '#cc6666'
# green: '#b5bd68'
# yellow: '#f0c674'
# blue: '#81a2be'
# magenta: '#b294bb'
# cyan: '#8abeb7'
# white: '#c5c8c6'
# Bright colors
#bright:
# black: '#666666'
# red: '#d54e53'
# green: '#b9ca4a'
# yellow: '#e7c547'
# blue: '#7aa6da'
# magenta: '#c397d8'
# cyan: '#70c0b1'
# white: '#eaeaea'
# Dim colors
#
# If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors.
#dim:
# black: '#131415'
# red: '#864343'
# green: '#777c44'
# yellow: '#9e824c'
# blue: '#556a7d'
# magenta: '#75617b'
# cyan: '#5b7d78'
# white: '#828482'
# Indexed Colors
#
# The indexed colors include all colors from 16 to 256.
# When these are not set, they're filled with sensible defaults.
#
# Example:
# `- { index: 16, color: '#ff00ff' }`
#
#indexed_colors: []
# Transparent cell backgrounds
#
# Whether or not `window.opacity` applies to all cell backgrounds or only to
# the default background. When set to `true` all cells will be transparent
# regardless of their background color.
#transparent_background_colors: false
# Bell
#
# The bell is rung every time the BEL control character is received.
#bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#animation: EaseOutExpo
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
# disable the visual bell animation.
#duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
#selection:
# This string contains all characters that are used as separators for
# "semantic words" in Alacritty.
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
#cursor:
# Cursor style
#style:
# Cursor shape
#
# Values for `shape`:
# - ▇ Block
# - _ Underline
# - | Beam
#shape: Block
# Cursor blinking state
#
# Values for `blinking`:
# - Never: Prevent the cursor from ever blinking
# - Off: Disable blinking by default
# - On: Enable blinking by default
# - Always: Force the cursor to always blink
#blinking: Off
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# Cursor blinking interval in milliseconds.
#blink_interval: 750
# Time after which cursor stops blinking, in seconds.
#
# Specifying '0' will disable timeout for blinking.
#blink_timeout: 5
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g.
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
# shell.
#
# Default:
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
# - (Windows) powershell
#shell:
# program: /bin/bash
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# Offer IPC using `alacritty msg` (unix only)
#ipc_socket: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
# Hints
#
# Terminal hints can be used to find text or hyperlink in the visible part of
# the terminal and pipe it to other applications.
#hints:
# Keys used for the hint labels.
#alphabet: "jfkdls;ahgurieowpq"
# List with all available hints
#
# Each hint must have any of `regex` or `hyperlinks` field and either an
# `action` or a `command` field. The fields `mouse`, `binding` and
# `post_processing` are optional.
#
# The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be
# highlighted.
#
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
#
# The `mouse.enabled` field controls if the hint should be underlined while
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
#
# If the `post_processing` field is set to `true`, heuristics will be used to
# shorten the match if there are characters likely not to be part of the hint
# (e.g. a trailing `.`). This is most useful for URIs and applies only to
# `regex` matches.
#
# Values for `action`:
# - Copy
# Copy the hint's text to the clipboard.
# - Paste
# Paste the hint's text to the terminal or search.
# - Select
# Select the hint's text.
# - MoveViModeCursor
# Move the vi mode cursor to the beginning of the hint.
#enabled:
# - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
# [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
# hyperlinks: true
# command: xdg-open
# post_processing: true
# mouse:
# enabled: true
# mods: None
# binding:
# key: U
# mods: Control|Shift
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty
# captures the mouse, the `Shift` modifier is automatically added as a
# requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings for actions not exclusive to mouse mode)
#
# - Mouse exclusive actions:
#
# - ExpandSelection
# Expand the selection to the current mouse cursor location.
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Right, action: ExpandSelection }
# - { mouse: Right, mods: Control, action: ExpandSelection }
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/winit/*/winit/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# Start searching toward the right of the search origin.
# - SearchBackward
# Start searching toward the left of the search origin.
# - Copy
# - Paste
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# Remove the terminal's scrollback history.
# - Hide
# Hide the Alacritty window.
# - Minimize
# Minimize the Alacritty window.
# - Quit
# Quit Alacritty.
# - ToggleFullscreen
# - ToggleMaximized
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - CreateNewWindow
# Create a new Alacritty window from the current process.
# - ClearLogNotice
# Clear Alacritty's UI warning and error notice.
# - ClearSelection
# Remove the active selection.
# - ReceiveChar
# - None
#
# - Vi mode exclusive actions:
#
# - Open
# Perform the action of the first matching hint under the vi mode cursor
# with `mouse.enabled` set to `true`.
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# Toggle semantic selection based on `selection.semantic_escape_chars`.
# - CenterAroundViCursor
# Center view around vi mode cursor
#
# - Vi mode exclusive cursor motion actions:
#
# - Up
# One line up.
# - Down
# One line down.
# - Left
# One character left.
# - Right
# One character right.
# - First
# First column, or beginning of the line when already at the first column.
# - Last
# Last column, or beginning of the line when already at the last column.
# - FirstOccupied
# First non-empty cell in this terminal row, or first non-empty cell of
# the line when already at the first cell of the row.
# - High
# Top of the screen.
# - Middle
# Center of the screen.
# - Low
# Bottom of the screen.
# - SemanticLeft
# Start of the previous semantically separated word.
# - SemanticRight
# Start of the next semantically separated word.
# - SemanticLeftEnd
# End of the previous semantically separated word.
# - SemanticRightEnd
# End of the next semantically separated word.
# - WordLeft
# Start of the previous whitespace separated word.
# - WordRight
# Start of the next whitespace separated word.
# - WordLeftEnd
# End of the previous whitespace separated word.
# - WordRightEnd
# End of the next whitespace separated word.
# - Bracket
# Character matching the bracket at the cursor's location.
# - SearchNext
# Beginning of the next match.
# - SearchPrevious
# Beginning of the previous match.
# - SearchStart
# Start of the match to the left of the vi mode cursor.
# - SearchEnd
# End of the match to the right of the vi mode cursor.
#
# - Search mode exclusive actions:
# - SearchFocusNext
# Move the focus to the next search match.
# - SearchFocusPrevious
# Move the focus to the previous search match.
# - SearchConfirm
# - SearchCancel
# - SearchClear
# Reset the search regex.
# - SearchDeleteWord
# Delete the last word in the search regex.
# - SearchHistoryPrevious
# Go to the previous regex in the search history.
# - SearchHistoryNext
# Go to the next regex in the search history.
#
# - macOS exclusive actions:
# - ToggleSimpleFullscreen
# Enter fullscreen without occupying another space.
#
# - Linux/BSD exclusive actions:
#
# - CopySelection
# Copy from the selection buffer.
# - PasteSelection
# Paste from the selection buffer.
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Search
# - Alt
# - Vi
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
#key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi|~Search, action: Copy }
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi|~Search, action: Open }
#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
#- { key: K, mode: Vi|~Search, action: Up }
#- { key: J, mode: Vi|~Search, action: Down }
#- { key: H, mode: Vi|~Search, action: Left }
#- { key: L, mode: Vi|~Search, action: Right }
#- { key: Up, mode: Vi|~Search, action: Up }
#- { key: Down, mode: Vi|~Search, action: Down }
#- { key: Left, mode: Vi|~Search, action: Left }
#- { key: Right, mode: Vi|~Search, action: Right }
#- { key: Key0, mode: Vi|~Search, action: First }
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
#- { key: W, mode: Vi|~Search, action: SemanticRight }
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
#- { key: N, mode: Vi|~Search, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
# Search Mode
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
#- { key: Escape, mode: Search, action: SearchCancel }
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
#- { key: U, mods: Control, mode: Search, action: SearchClear }
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
#- { key: Down, mode: Search, action: SearchHistoryNext }
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Plus, mods: Control, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Plus, mods: Command, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: CreateNewWindow }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - Off
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Renderer override.
# - glsl3
# - gles2
# - gles2_pure
#renderer: None
# Print all received window events.
#print_events: false
# Highlight window damage information.
#highlight_damage: false

1
.config/bat/config Normal file
View File

@ -0,0 +1 @@
--theme="Monokai Extended Origin"

214
.config/btop/btop.conf Normal file
View File

@ -0,0 +1,214 @@
#? Config file for btop v. 1.2.13
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
color_theme = "flat-remix-light"
# adapta ayu dracula dusklight elementarish everforest-dark-hard flat-remix-light flat-remix greyscale gruvbox_dark gruvbox_dark_v2 gruvbox_material_dark HotPurpleTrafficLight kyli0x matcha-dark-sea monokai night-owl nord onedark paper solarized_dark solarized_light tokyo-night flat-remix-light tomorrow-night whiteout
#* If the theme set background should be shown, set to False if you want terminal background transparency.
theme_background = True
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor = True
#* Set to true to force tty mode regardless if a real tty has been detected or not.
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = False
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
#* Use whitespace " " as separator between different presets.
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = False
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = True
#* Default symbols to use for graph creation, "braille", "block" or "tty".
#* "braille" offers the highest resolution but might not be included in all fonts.
#* "block" has half the resolution of braille but uses more common characters.
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
graph_symbol = "braille"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_net = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
shown_boxes = "cpu mem net proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 2000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "memory"
#* Reverse sorting order, True or False.
proc_reversed = False
#* Show processes as a tree.
proc_tree = False
#* Use the cpu graph colors in the process list.
proc_colors = True
#* Use a darkening gradient in the process list.
proc_gradient = True
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = False
#* Show process memory as bytes instead of percent.
proc_mem_bytes = True
#* Show cpu graph for each process.
proc_cpu_graphs = True
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
proc_info_smaps = False
#* Show proc box on left side of screen instead of right.
proc_left = False
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = False
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "total"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "total"
#* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = True
#* Set to True to completely disable the lower CPU graph.
cpu_single_graph = False
#* Show cpu box at bottom of screen instead of top.
cpu_bottom = False
#* Shows the system uptime in the CPU box.
show_uptime = True
#* Show cpu temperature.
check_temp = True
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor = "Auto"
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
show_coretemp = True
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
#* Example: "4:0 5:1 6:3"
cpu_core_map = ""
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
temp_scale = "celsius"
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
base_10_sizes = False
#* Show CPU frequency.
show_cpu_freq = True
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
clock_format = "%X"
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
background_update = True
#* Custom cpu model name, empty string to disable.
custom_cpu_name = ""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
disks_filter = ""
#* Show graphs instead of meters for memory values.
mem_graphs = True
#* Show mem box below net box instead of above.
mem_below_net = False
#* Count ZFS ARC in cached and available memory.
zfs_arc_cached = True
#* If swap memory should be shown in memory box.
show_swap = True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True
#* If mem box should be split to also show disks info.
show_disks = True
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = True
#* Read disks list from /etc/fstab. This also disables only_physical.
use_fstab = True
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
zfs_hide_datasets = False
#* Set to true to show available disk space for privileged users.
disk_free_priv = False
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
#* Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = ""
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 100
net_upload = 100
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = True
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = True
#* Starts with the Network Interface specified here.
net_iface = ""
#* Show battery stats in top right if battery is present.
show_battery = True
#* Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = "Auto"
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING"

22
.config/crontab Normal file
View File

@ -0,0 +1,22 @@
# DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR Jan-Dec
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR SUN-SAT
# | | | | |
# * * * * * user-name command to be executed
# * any value
# , value list separator
# - range of values
# / step values
* * * * * /home/sahin/scripts/check-battery.sh 10
# at each hour, remove files older than 30 days in trash directory
0 * * * * find /home/sahin/trash -maxdepth 1 -type f -mtime +30 | xargs -i readlink -f {} | xargs -i rm {}

View File

@ -0,0 +1,3 @@
lat: 40.0
lng: 29.0
dbusserver: true

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# trigger a small, passive popup dialog to inform the user about darkman's activity
# reference https://wiki.archlinux.org/title/Desktop_notifications#Usage_in_programming
theme=$(darkman get)
notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "switching to $theme mode"

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Change the global Plasma Theme. On Manjaro you can use "org.manjaro.breath-dark.desktop"
# or you can create your own global Plasma Theme with the "Plasma Look And Feel Explorer".
# Reference: https://userbase.kde.org/Plasma/Create_a_Global_Theme_Package
#
# Since Plasma 5.26 the lookandfeeltool does not work anymore without "faking" the screen.
# Reference: https://bugs.kde.org/show_bug.cgi?id=460643
lookandfeeltool -platform offscreen --apply "org.kde.breeze.desktop"
# lookandfeeltool -platform offscreen --apply "org.kde.breezetwilight.desktop"
# lookandfeeltool -platform offscreen --apply "org.kde.breezedark.desktop"

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# GTK apps are not affected by the Plasma Global Theme, which only applies to Qt based programs.
# GTK themes can be installed here: Global Theme > Application Style > Configure GNOME/GTK Application Style.
# Reference: https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
source "$HOME/scripts/common-vars.sh"
if [ $theme == "dark" ]; then
theme_string="Breeze-dark-gtk"
else
theme_string="Default"
fi
echo "string:$theme_string"
dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:$theme_string"

View File

@ -0,0 +1,3 @@
#!/bin/sh
makoctl set-mode dark

4
.config/darkman/scripts/gtk.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
theme=$(darkman get)
gsettings set org.gnome.desktop.interface color-scheme "prefer-$theme"

View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
# trigger a small, passive popup dialog to inform the user about darkman's activity
# reference https://wiki.archlinux.org/title/Desktop_notifications#Usage_in_programming
theme=$(darkman get)
PATH="$HOME/.local/bin/:$PATH"
if [ "$theme" == "dark" ]; then
sed -i 's/kanagawa_light.conf/kanagawa.conf/g' "$HOME/.config/kitty/kitty.conf"
sed -i 's/tokyonight_day/tokyonight_storm/g' "$HOME/.config/kitty/kitty.conf"
sed -i 's/Light/Origin/g' "$HOME/.config/bat/config"
sed -i 's/flat-remix-light/tokyo-storm/g' "$HOME/.config/btop/btop.conf"
sed -i "\$s/.*/include dark-256.theme/" "$HOME/.config/task/taskrc"
else
sed -i 's/kanagawa.conf/kanagawa_light.conf/g' "$HOME/.config/kitty/kitty.conf"
sed -i 's/tokyonight_storm/tokyonight_day/g' "$HOME/.config/kitty/kitty.conf"
sed -i 's/Origin/Light/g' "$HOME/.config/bat/config"
sed -i 's/tokyo-storm/flat-remix-light/g' "$HOME/.config/btop/btop.conf"
sed -i "\$s/.*/include light-256.theme/" "$HOME/.config/task/taskrc"
fi
kill -SIGUSR1 $(pgrep kitty)
tmux source-file "$HOME/.config/tmux/$theme.conf"
# This uses the neovim-remote python package to control other neovim instances.
# see: https://github.com/mhinz/neovim-remote
# Further, it is assumed that toggling the background in neovim is enough.
# Anything else should be handled by the set color scheme.
for server in $(nvr --serverlist); do
nvr --servername "$server" -cc "set background=$theme"
done

430
.config/hypr/hyprland.conf Normal file
View File

@ -0,0 +1,430 @@
########################################################################################
AUTOGENERATED HYPR CONFIG.
PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
########################################################################################
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=name,resolution,position,scale
monitor=,preferred,auto,auto
# centered
# monitor=eDP-1,preferred,500x1107,2.0
monitor=eDP-1,preferred,0x1107,2.0
# monitor=HDMI-A-1,preferred,0x0,1.333333
# monitor=eDP-1, disable
# monitor=eDP-1,preferred,auto,1,mirror,HDMI-A-1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# exec-once = swaync
exec-once = ags
exec-once = /usr/libexec/kf5/polkit-kde-authentication-agent-1
exec-once = swaybg -i "$HOME/Pictures/Wallpapers/minimal.jpg"
# Dim screen after 120 seconds of inactivity
exec-once = swayidle -w timeout 120 'dim-screen &' resume 'undim-screen'
# Lock screen after idle for 240s
# exec-once = swayidle -w timeout 240 'lock-screen'
# Dim screen 10 seconds after screen is locked. no -w option here.
exec-once = swayidle timeout 10 'if pgrep -x swaylock; then dim-screen; fi' resume 'undim-screen'
# Turn monitors off 30 seconds after screen is locked
# exec-once = swayidle -w timeout 30 'if pgrep -x swaylock; then hyprctl dispatch dpms off; fi' resume 'hyprctl dispatch dpms on'
# exec-once = /usr/libexec/polkit-gnome-authentication-agent-1
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,24
# env = QT_QPA_PLATFORM,wayland,xcb
# env = GDK_BACKEND,x11
# unscale XWayland
# xwayland {
# force_zero_scaling = false
# }
# toolkit-specific scale
env = GDK_SCALE,1
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = tr,us
kb_variant = legacy-fix-ansi,
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
drag_lock = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
device:apple-mtp-keyboard {
kb_layout = tr,us
kb_variant = legacy-fix-iso,
kb_model =
kb_options = altwin:alt_super_win,shift:both_capslock_cancel,lv3:ralt_switch,caps:ctrl_modifier
kb_rules =
}
device:compx-2.4g-receiver-mouse {
sensitivity = -1 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 2
gaps_out = 8
border_size = 2
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.active_border = rgba(F9DEA9ee) rgba(F2C294ee) 45deg
# col.active_border = rgba(1affffee) rgba(ff0000ee) 45deg # was my config
col.inactive_border = rgba(595959aa)
layout = master
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
blur {
enabled = true
size = 3
passes = 1
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
dim_inactive = true
dim_strength = 0.05 # how much inactive windows should be dimmed, 0.0 - 1.0
dim_around = 0.5 # how much the dimaround window rule should dim by. 0.0 - 1.0
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
#
# animation=NAME,ONOFF,SPEED,CURVE,STYLE or
# animation=NAME,ONOFF,SPEED,CURVE
# ONOFF can be either 0 or 1, 0 to disable, 1 to enable. note: if its 0, you can omit further args.
# SPEED is the amount of ds (1ds = 100ms) the animation will take
# CURVE is the bezier curve name, see curves.
# STYLE (optional) is the animation style
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
bezier = overshot,0.05,0.9,0.1,1.1
bezier = easeOutBack, 0.075, 0.82, 0.165, 1
bezier = easeInBack,0.075, 0.82, 0.165, 1
animation = windows, 1, 5, default
# animation = windows, 0
animation = windowsIn,1,5,default,slide
animation = windowsOut, 1, 4, easeInBack, slide
animation = border, 1, 10, overshot
animation = borderangle, 1, 10, default, once
animation = fade, 1, 4, default
# animation = fade, 0
animation = workspaces, 1, 4, default, slide
animation = specialWorkspace, 1, 3, easeOutBack, slidefadevert
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
allow_small_split = true
always_center_master = false
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
workspace_swipe_cancel_ratio = 0.20
}
misc {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = -1 # Set to 0 to disable the anime mascot wallpapers
# If true, will animate manual window resizes/moves
# animate_manual_resizes = false
# Enable window swallowing
# enable_swallow = false
# swallow_regex = str
# focus_on_activate = false
}
binds {
# If enabled, an attempt to switch to the currently focused workspace will
# instead switch to the previous workspace. Akin to i3s auto_back_and_forth.
workspace_back_and_forth = true
allow_workspace_cycles = true
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = float,class:^(nm-connection-editor)$,
windowrulev2 = float,title:^(Picture-in-Picture)$,
windowrulev2 = pin,title:^(Picture-in-Picture)$,
windowrulev2=dimaround,class:^(pinentry-qt)$,
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mod = SUPER
bind = $mod, tab, workspace, previous
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
# bind = $mod, return, exec, open-kitty-or-focus
bind = $mod, return, exec, kitty --single-instance
bind = $mod, q, killactive,
bind = $mod, c, exec, smart-exec
bind = $mod control, q, exit,
# Example special workspace (scratchpad)
bind = $mod, w, togglespecialworkspace, magic
bind = $mod SHIFT, w, movetoworkspace, special:magic
bind = $mod control, n, exec, lock-screen
bind = $mod, e, exec, wofi --show drun --normal-window
# bind = $mod, semicolon, exec, wofi --show drun --normal-window
bind = $mod shift, p, exec, passmenu
bind = $mod, o, togglefloating,
bind = $mod, y, togglefloating
bind = $mod, v, exec, rofi-wireguard --toggle
bind = $mod, y, pin
# bind = $mod, t, exec, smart-tab
bind = $mod, t, togglegroup, # dwindle
# bind = $mod, t, pseudo, # dwindle
bind = $mod, s, togglesplit, # dwindle
bind = $mod, m, fullscreen, 1
### master layout keybindings
bind = $mod, semicolon, layoutmsg,swapwithmaster master
bind = $mod, space, layoutmsg,orientationnext
bind = $mod SHIFT, m, fullscreen, 0
bind = $mod SHIFT, b, fakefullscreen,
bind = $mod shift, n, exec, swaync-client -t -sw
# bindl = $mod SHIFT, L, exec, sleep 1 && hyprctl dispatch dpms off
# focus windows with mod + hjkl
bind = $mod, h, movefocus, l
bind = $mod, l, movefocus, r
bind = $mod, k, movefocus, u
bind = $mod, j, movefocus, d
# Move windows with mod + shift + hjkl
bind = $mod shift, h, swapwindow, l
bind = $mod shift, l, swapwindow, r
bind = $mod shift, k, swapwindow, u
bind = $mod shift, j, swapwindow, d
bind = $mod, left, movewindow, l
bind = $mod, right, movewindow, r
bind = $mod, down, movewindow, d
bind = $mod, up, movewindow, u
# resize windows with mod + control + hjkl
binde = $mod control, h, resizeactive, -20 0
binde = $mod control, l, resizeactive, 20 0
binde = $mod control, k, resizeactive, 0 -20
binde = $mod control, j, resizeactive, 0 20
# Switch workspaces with mod + [0-9]
bind = $mod, p, workspace, e-1
bind = $mod, n, workspace, e+1
bind = $mod, a, workspace, 1
bind = $mod, s, workspace, 2
bind = $mod, d, workspace, 3
bind = $mod, f, workspace, 4
bind = $mod, g, workspace, 5
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
# bind = $mod, 0, workspace, 10
bind = $mod, comma, swapnext, prev
bind = $mod, period, swapnext
# Move active window to a workspace with mod + SHIFT + [0-9]
bind = $mod SHIFT, a, movetoworkspace, 1
bind = $mod SHIFT, s, movetoworkspace, 2
bind = $mod SHIFT, d, movetoworkspace, 3
bind = $mod SHIFT, f, movetoworkspace, 4
bind = $mod SHIFT, g, movetoworkspace, 5
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
# bind = $mod SHIFT, 0, movetoworkspace, 10
bind = $mod, 0, togglespecialworkspace, magic2
bind = $mod SHIFT, 0, movetoworkspace, special:magic2
# Move/resize windows with mod + LMB/RMB and dragging
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow
# Scroll through existing workspaces with mod + scroll
# doesn't seem to work with touchpad.
# check and see if this works with mouse: yep, it works
bind = $mod, mouse_down, workspace, e+1
bind = $mod, mouse_up, workspace, e-1
# screen
bindle=,XF86MonBrightnessUp, exec, light -A 1; light -O
bindle=,XF86MonBrightnessDown, exec, light -U 1; light -O
# bindle=,XF86KbdBrightnessUp, exec, ags -r 'brightness.kbd++; indicator.kbd()'
# bindle=,XF86KbdBrightnessDown, exec, ags -r 'brightness.kbd--; indicator.kbd()'
#
#
bindle=,XF86AudioRaiseVolume, exec, volume up
bindle=,XF86AudioLowerVolume, exec, volume down
bindle=,XF86AudioMute, exec, volume toggle-mute
bindle=, F4, exec, grim -g "$(slurp)" - | swappy -f -
bindle=$mod, x, exec, grim - | swappy -f -
# bindle=, XF86KbdBrightnessUp, exec, keyboard_backlight inc
# bindle=, XF86KbdBrightnessDown, exec, keyboard_backlight dec
# check switch name with hyprctl devices
# lock screen when lid is closed or opened
# bindl=,switch:Apple SMC power/lid events,exec,lock-screen
# trigger when the lid is opened
bindl=,switch:off:Apple SMC power/lid events,exec,smart-switch open
# trigger when the lid is closed
bindl=,switch:on:Apple SMC power/lid events,exec,smart-switch close
windowrulev2 = stayfocused,class:(wofi)
windowrulev2 = noborder,class:(wofi)
# # bind = $mod, Return, exec, st -e tmux new-session -A -s st
# bind = $mod SHIFT, q, exec, xkill
# binde = $mod CONTROL, s, exec, toggle-screenkey
# bind = $mod, e, exec, rofimoji
# bind = $mod, b, exec, rofi-bluetooth
# # bind = SUPER, E, exec, [workspace 2 silent;float;noanim] st
# bind = $mod, i, exec, dictionary
# bind = $mod, r, swapnext,
# bind = $mod, semicolon, exec, wofi --show drun
# bind = $mod SHIFT, O, workspaceopt, allpseudo # dwindle
# bind = $mod, space, exec, hypr-toggle-layout
#
#
# bind = $mod SHIFT, Return, togglesplit, # dwindle
#
# # bind = $mod, j, changegroupactive, b
# # bind = $mod, k, changegroupactive, f
#
#
# # to switch between windows in a floating workspace
# bind = SUPER,comma,cyclenext, # change focus to another window
# bind = SUPER,comma,bringactivetotop, # bring it to the top
# bind = SUPER,period,cyclenext, prev # change focus to another window
# bind = SUPER,period,bringactivetotop, # bring it to the top
#
#
#
#
#
#
# # bind=SUPER,mouse_down,workspace,e-1
#
# bindle=, Print, exec, grim -g "$(slurp)" - | swappy -f -
# # bindr=SUPER, SUPER_L, exec, pkill wofi || wofi --show drun
#
#
# # will switch to a submap called notifications
# bind = $mod, n, submap, notifications
#
# # will start a submap called "notifications"
# submap=notifications
#
# # sets repeatable binds for resizing the active window
# binde=$mod, n, exec, dunstctl close
# bind=$mod, n, submap, reset
# binde=$mod, k, exec, dunstctl history-pop
# binde=$mod, j, exec, dunstctl close
# binde=$mod, m, exec, dunstctl context
# bind=$mod, m, submap, reset
# binde=$mod, p, exec, toggle-notifications
# bind=$mod, p, submap, reset
#
# # use reset to go back to the global submap
# bind=,escape,submap,reset
#
# # will reset the submap, meaning end the current one and return to the global one
# submap=reset
#
# # keybinds further down will be global again...

View File

@ -0,0 +1,47 @@
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
// 17.00 5600
// 17.30 5300
const float temperature = 2300.0;
const float temperatureStrength = 1.0;
#define WithQuickAndDirtyLuminancePreservation
const float LuminancePreservationFactor = 1.0;
// function from https://www.shadertoy.com/view/4sc3D7
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
vec3 colorTemperatureToRGB(const in float temperature){
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
vec3(1.0, 1.3302673723350029, 1.8993753891711275)) :
mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
return mix(
clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
vec3(1.0),
smoothstep(1000.0, 0.0, temperature)
);
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
#ifdef WithQuickAndDirtyLuminancePreservation
color *= mix(1.0,
dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
LuminancePreservationFactor);
#endif
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
vec4 outCol = vec4(color, pixColor[3]);
gl_FragColor = outCol;
}

View File

@ -0,0 +1,20 @@
// vim: set ft=glsl:
// blue light filter shader
// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// green
pixColor[1] *= 0.855;
// blue
pixColor[2] *= 0.725;
gl_FragColor = pixColor;
}

View File

@ -0,0 +1,16 @@
//
// Example blue light filter shader.
//
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
pixColor[2] *= 0.8;
gl_FragColor = pixColor;
}

View File

@ -0,0 +1,18 @@
//
// Example grayscale shader.
//
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
gl_FragColor = vec4(
pixColor[0] * 0.299 + pixColor[1] * 0.587 + pixColor[2] * 0.114,
pixColor[0] * 0.299 + pixColor[1] * 0.587 + pixColor[2] * 0.114,
pixColor[0] * 0.299 + pixColor[1] * 0.587 + pixColor[2] * 0.114,
pixColor[3]
);
}

View File

@ -0,0 +1,40 @@
// vibrance for hyprland
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
// see https://github.com/CeeJayDK/SweetFX/blob/a792aee788c6203385a858ebdea82a77f81c67f0/Shaders/Vibrance.fx#L20-L30
const vec3 VIB_RGB_BALANCE = vec3(1.0, 1.0, 1.0);
const float VIB_VIBRANCE = 0.15;
const vec3 VIB_coeffVibrance = VIB_RGB_BALANCE * -VIB_VIBRANCE;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
// vec3 VIB_coefLuma = vec3(0.333333, 0.333334, 0.333333); // was for `if VIB_LUMA == 1`
vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186); // try both and see which one looks nicer.
float luma = dot(VIB_coefLuma, color);
float max_color = max(color[0], max(color[1], color[2]));
float min_color = min(color[0], min(color[1], color[2]));
float color_saturation = max_color - min_color;
vec3 p_col = vec3(vec3(vec3(vec3(sign(VIB_coeffVibrance) * color_saturation) - 1.0) * VIB_coeffVibrance) + 1.0);
pixColor[0] = mix(luma, color[0], p_col[0]);
pixColor[1] = mix(luma, color[1], p_col[1]);
pixColor[2] = mix(luma, color[2], p_col[2]);
gl_FragColor = pixColor;
}

129
.config/kitty/diff.conf Normal file
View File

@ -0,0 +1,129 @@
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Diffing {{{
syntax_aliases pyj: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
#: The number of lines of context to show around each change.
diff_cmd auto
#: The diff command to use. Must contain the placeholder _CONTEXT_
#: which will be replaced by the number of lines of context. The
#: default is to search the system for either git or diff and use
#: that, if found.
replace_tab_by \x20\x20\x20\x20
#: The string to replace tabs with. Default is to use four spaces.
#: }}}
#: Colors {{{
pygments_style monokai
#: The pygments color scheme to use for syntax highlighting. See
#: pygments colors schemes <https://help.farbox.com/pygments.html> for
#: a list of schemes.
foreground #EDDFAA
background #252322
#: Basic colors
title_fg #EDDFAA
title_bg #2D2A28
#: Title colors
margin_fg #48403A
margin_bg #2D2A28
#: Margin colors
removed_bg #23090A
highlight_removed_bg #EB5864
removed_margin_bg #37080B
#: Removed text backgrounds
added_bg #164113
highlight_added_bg #16670B
added_margin_bg #16670B
#: Added text backgrounds
filler_bg #2D2A28
#: Filler (empty) line background
hunk_margin_bg #FEC14E
hunk_bg #FEC14E
#: Hunk header colors
search_bg #FEC14E
search_fg black
select_bg #6F96FF
select_fg #252322
#: Highlighting
#: }}}
#: Keyboard shortcuts {{{
#####
map q quit
map esc quit
map j scroll_by 1
map down scroll_by 1
map k scroll_by -1
map up scroll_by -1
#####
#####
map home scroll_to start
map g scroll_to start
map end scroll_to end
map shift+g scroll_to end
#####
#####
map page_down scroll_to next-page
map ctrl+d scroll_to next-page
map space scroll_to next-page
map page_up scroll_to prev-page
map ctrl+u scroll_to prev-page
map backspace scroll_to prev-page
#####
#####
map n scroll_to next-change
map l scroll_to next-change
map p scroll_to prev-change
map h scroll_to prev-change
#####
map a change_context all
map = change_context default
map + change_context 5
map - change_context -5
map / start_search regex forward
map ? start_search regex backward
map . scroll_to next-match
map > scroll_to next-match
map , scroll_to prev-match
map < scroll_to prev-match
map f start_search substring forward
map b start_search substring backward
#: }}}

View File

@ -0,0 +1,9 @@
def main():
pass
def handle_result(args, result, target_window_id, boss):
return boss.active_tab.current_layout.name
handle_result.no_ui = True

View File

@ -1,8 +1,23 @@
# vim:fileencoding=utf-8:foldmethod=marker # vim:fileencoding=utf-8:foldmethod=marker:ft=kitty
# map f1 show_kitty_env_vars
kitty_mod alt
#: Special modifier key alias for default shortcuts. You can change
#: the value of this option to alter all default shortcuts that use
#: kitty_mod.
clear_all_shortcuts yes
#: Remove all shortcut definitions up to this point. Useful, for
#: instance, to remove the default shortcuts.
# kitty-scrollback.nvim Kitten alias
action_alias kitty_scrollback_nvim kitten $HOME/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
# include ./themes/themes/OneDark.conf # include ./themes/themes/OneDark.conf
include ~/.local/share/nvim/lazy/tokyonight.nvim/extras/kitty/tokyonight_day.conf # include ~/.local/share/nvim/lazy/tokyonight.nvim/extras/kitty/tokyonight_day.conf
include ~/.local/share/nvim/lazy/kanagawa.nvim/extras/kanagawa_light.conf
#include ./tokyonight.conf #include ./tokyonight.conf
#Fonts {{{ #Fonts {{{
@ -11,6 +26,12 @@ include ~/.local/share/nvim/lazy/tokyonight.nvim/extras/kitty/tokyonight_day.con
#: characters. #: characters.
font_family FantasqueSansM Nerd Font Mono font_family FantasqueSansM Nerd Font Mono
# font_family Fira Code
# bold_font Fira Code Bold
# italic_font Maple Mono Italic
# bold_italic_font Maple Mono BoldItalic
# font_family MesloLGS NF # font_family MesloLGS NF
# font_family monospace # font_family monospace
# bold_font auto # bold_font auto
@ -30,7 +51,7 @@ font_family FantasqueSansM Nerd Font Mono
#: italic_font Operator Mono Book Italic #: italic_font Operator Mono Book Italic
#: bold_italic_font Operator Mono Medium Italic #: bold_italic_font Operator Mono Medium Italic
font_size 13.0 font_size 11.0
#: Font size (in pts) #: Font size (in pts)
@ -56,6 +77,8 @@ font_size 13.0
#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols #: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0C8,U+E0CA,U+E0CC-U+E0D2,U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E634,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF Symbols Nerd Font Mono
#: Map the specified Unicode codepoints to a particular font. Useful #: Map the specified Unicode codepoints to a particular font. Useful
#: if you need special rendering for some symbols, such as for #: if you need special rendering for some symbols, such as for
#: Powerline. Avoids the need for patched fonts. Each Unicode code #: Powerline. Avoids the need for patched fonts. Each Unicode code
@ -80,16 +103,10 @@ font_size 13.0
#: narrow_symbols codepoints [optionally the number of cells] #: narrow_symbols codepoints [optionally the number of cells]
# disable_ligatures never # always, cursor, never
disable_ligatures cursor
#: Choose how you want to handle multi-character ligatures. The
#: default is to always render them. You can tell kitty to not render
#: them when the cursor is over them by using cursor to make editing
#: easier, or have kitty never render them at all by using always, if
#: you don't like them. The ligature strategy can be set per-window
#: either using the kitty remote control facility or by defining
#: shortcuts for it in kitty.conf, for example::
#: or you can set shortcuts
#: map alt+1 disable_ligatures_in active always #: map alt+1 disable_ligatures_in active always
#: map alt+2 disable_ligatures_in all never #: map alt+2 disable_ligatures_in all never
#: map alt+3 disable_ligatures_in tab cursor #: map alt+3 disable_ligatures_in tab cursor
@ -164,9 +181,9 @@ font_size 13.0
#: suffix px for pixels or % for percentage of original value. No #: suffix px for pixels or % for percentage of original value. No
#: suffix means use pts. For example:: #: suffix means use pts. For example::
#: modify_font underline_position -2 modify_font underline_position 1
#: modify_font underline_thickness 150% # modify_font underline_thickness 150%
#: modify_font strikethrough_position 2px # modify_font strikethrough_position 2px
#: Additionally, you can modify the size of the cell in which each #: Additionally, you can modify the size of the cell in which each
#: font glyph is rendered and the baseline at which the glyph is #: font glyph is rendered and the baseline at which the glyph is
@ -256,7 +273,7 @@ font_size 13.0
#: Cursor customization {{{ #: Cursor customization {{{
# cursor #cccccc cursor none
#: Default cursor color. If set to the special value none the cursor #: Default cursor color. If set to the special value none the cursor
#: will be rendered with a "reverse video" effect. It's color will be #: will be rendered with a "reverse video" effect. It's color will be
@ -266,7 +283,7 @@ font_size 13.0
#: precedence. Also, the cursor colors are modified if the cell #: precedence. Also, the cursor colors are modified if the cell
#: background and foreground colors have very low contrast. #: background and foreground colors have very low contrast.
# cursor_text_color #111111 # cursor_text_color background
#: The color of text under the cursor. If you want it rendered with #: The color of text under the cursor. If you want it rendered with
#: the background color of the cell underneath instead, use the #: the background color of the cell underneath instead, use the
@ -284,7 +301,7 @@ font_size 13.0
#: the cursor shape to beam at shell prompts. You can avoid this by #: the cursor shape to beam at shell prompts. You can avoid this by
#: setting shell_integration to no-cursor. #: setting shell_integration to no-cursor.
# cursor_beam_thickness 1.5 cursor_beam_thickness 1.0
#: The thickness of the beam cursor (in pts). #: The thickness of the beam cursor (in pts).
@ -319,6 +336,7 @@ font_size 13.0
#: ones. #: ones.
# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER # scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
scrollback_pager nvim +"source $HOME/.config/kitty/vi-mode.lua"
#: Program with which to view scrollback in a new window. The #: Program with which to view scrollback in a new window. The
#: scrollback buffer is passed as STDIN to this program. If you change #: scrollback buffer is passed as STDIN to this program. If you change
@ -330,7 +348,7 @@ font_size 13.0
#: set to 0 if there is no cursor, for example, when showing the last #: set to 0 if there is no cursor, for example, when showing the last
#: command output. #: command output.
# scrollback_pager_history_size 0 scrollback_pager_history_size 10
#: Separate scrollback history size (in MB), used only for browsing #: Separate scrollback history size (in MB), used only for browsing
#: the scrollback buffer with pager. This separate buffer is not #: the scrollback buffer with pager. This separate buffer is not
@ -376,7 +394,7 @@ font_size 13.0
#: Mouse {{{ #: Mouse {{{
# mouse_hide_wait 3.0 mouse_hide_wait -1
#: Hide mouse cursor after the specified number of seconds of the #: Hide mouse cursor after the specified number of seconds of the
#: mouse not being used. Set to zero to disable mouse cursor hiding. #: mouse not being used. Set to zero to disable mouse cursor hiding.
@ -386,12 +404,12 @@ font_size 13.0
#: much effort. #: much effort.
# url_color #0087bd # url_color #0087bd
# url_style curly url_style straight
#: The color and style for highlighting URLs on mouse-over. url_style #: The color and style for highlighting URLs on mouse-over. url_style
#: can be one of: none, straight, double, curly, dotted, dashed. #: can be one of: none, straight, double, curly, dotted, dashed.
# open_url_with default open_url_with default
#: The program to open clicked URLs. The special value default with #: The program to open clicked URLs. The special value default with
#: first look for any URL handlers defined via the open_actions #: first look for any URL handlers defined via the open_actions
@ -423,7 +441,7 @@ font_size 13.0
#: specified using backslash escapes, to specify a backslash use a #: specified using backslash escapes, to specify a backslash use a
#: double backslash. #: double backslash.
# show_hyperlink_targets no show_hyperlink_targets no
#: When the mouse hovers over a terminal hyperlink, show the actual #: When the mouse hovers over a terminal hyperlink, show the actual
#: URL that will be activated when the hyperlink is clicked. #: URL that will be activated when the hyperlink is clicked.
@ -438,7 +456,7 @@ font_size 13.0
#: value to/from always will only affect text subsequently received by #: value to/from always will only affect text subsequently received by
#: kitty. #: kitty.
# copy_on_select no copy_on_select clipboard
#: Copy to clipboard or a private buffer on select. With this set to #: Copy to clipboard or a private buffer on select. With this set to
#: clipboard, selecting text with the mouse will cause the text to be #: clipboard, selecting text with the mouse will cause the text to be
@ -455,7 +473,7 @@ font_size 13.0
#: programs, including websites open in your browser can read the #: programs, including websites open in your browser can read the
#: contents of the system clipboard. #: contents of the system clipboard.
# paste_actions quote-urls-at-prompt,confirm paste_actions quote-urls-at-prompt,confirm,confirm-if-large
#: A comma separated list of actions to take when pasting text into #: A comma separated list of actions to take when pasting text into
#: the terminal. The supported paste actions are: #: the terminal. The supported paste actions are:
@ -507,7 +525,7 @@ font_size 13.0
#: clicks (in seconds). Negative numbers will use the system default #: clicks (in seconds). Negative numbers will use the system default
#: instead, if available, or fallback to 0.5. #: instead, if available, or fallback to 0.5.
# focus_follows_mouse no focus_follows_mouse no
#: Set the active window to the window under the mouse when moving the #: Set the active window to the window under the mouse when moving the
#: mouse around. On macOS, this will also cause the OS Window under #: mouse around. On macOS, this will also cause the OS Window under
@ -573,7 +591,7 @@ font_size 13.0
#: Click the link under the mouse or move the cursor #: Click the link under the mouse or move the cursor
# mouse_map left click ungrabbed mouse_handle_click selection link prompt mouse_map left click ungrabbed mouse_handle_click selection link prompt
#:: First check for a selection and if one exists do nothing. Then #:: First check for a selection and if one exists do nothing. Then
#:: check for a link under the mouse cursor and if one exists, click #:: check for a link under the mouse cursor and if one exists, click
@ -582,6 +600,9 @@ font_size 13.0
#:: that this requires shell integration #:: that this requires shell integration
#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. #:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.
# select the output of a command by right clicking the mouse on the output
mouse_map right press ungrabbed mouse_select_command_output
#: Click the link under the mouse or move the cursor even when grabbed #: Click the link under the mouse or move the cursor even when grabbed
# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt # mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt
@ -679,6 +700,8 @@ font_size 13.0
# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output # mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output
mouse_map kitty_mod+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
#:: Requires shell integration #:: Requires shell integration
#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. #:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.
@ -719,13 +742,12 @@ font_size 13.0
#: Terminal bell {{{ #: Terminal bell {{{
# enable_audio_bell yes enable_audio_bell no
#: The audio bell. Useful to disable it in environments that require #: The audio bell. Useful to disable it in environments that require
#: silence. #: silence.
# visual_bell_duration 0.0 visual_bell_duration 0.05
#: The visual bell duration (in seconds). Flash the screen when a bell #: The visual bell duration (in seconds). Flash the screen when a bell
#: occurs for the specified number of seconds. Set to zero to disable. #: occurs for the specified number of seconds. Set to zero to disable.
@ -818,14 +840,14 @@ font_size 13.0
#: that setting a non-zero window_margin_width overrides this and #: that setting a non-zero window_margin_width overrides this and
#: causes all borders to be drawn. #: causes all borders to be drawn.
# window_margin_width 0 # window_margin_width 0 12
#: The window margin (in pts) (blank area outside the border). A #: The window margin (in pts) (blank area outside the border). A
#: single value sets all four sides. Two values set the vertical and #: single value sets all four sides. Two values set the vertical and
#: horizontal sides. Three values set top, horizontal and bottom. Four #: horizontal sides. Three values set top, horizontal and bottom. Four
#: values set top, right, bottom and left. #: values set top, right, bottom and left.
# single_window_margin_width -1 single_window_margin_width 0 2
#: The window margin to use when only a single window is visible (in #: The window margin to use when only a single window is visible (in
#: pts). Negative values will cause the value of window_margin_width #: pts). Negative values will cause the value of window_margin_width
@ -871,12 +893,12 @@ font_size 13.0
#: The color for the border of inactive windows in which a bell has #: The color for the border of inactive windows in which a bell has
#: occurred. #: occurred.
# inactive_text_alpha 1.0 inactive_text_alpha 0.7
#: Fade the text in inactive windows by the specified amount (a number #: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded). #: between zero and one, with zero being fully faded).
# hide_window_decorations no hide_window_decorations yes
#: Hide the window decorations (title-bar and window borders) with #: Hide the window decorations (title-bar and window borders) with
#: yes. On macOS, titlebar-only and titlebar-and-corners can be used #: yes. On macOS, titlebar-only and titlebar-and-corners can be used
@ -930,7 +952,7 @@ font_size 13.0
#: used to keep the margins as small as possible when resizing the OS #: used to keep the margins as small as possible when resizing the OS
#: window. Note that this does not currently work on Wayland. #: window. Note that this does not currently work on Wayland.
# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ visual_window_select_characters hjklfdsagtyrueiwoqpbnvmcxz
#: The list of characters for visual window selection. For example, #: The list of characters for visual window selection. For example,
#: for selecting a window to focus on with focus_visible_window. The #: for selecting a window to focus on with focus_visible_window. The
@ -972,7 +994,7 @@ font_size 13.0
#: The second number is the margin between the tab bar and the #: The second number is the margin between the tab bar and the
#: contents of the current tab. #: contents of the current tab.
# tab_bar_style fade tab_bar_style powerline
#: The tab bar style, can be one of: #: The tab bar style, can be one of:
@ -998,7 +1020,7 @@ font_size 13.0
#: a mapping for the select_tab action which presents you with a list of #: a mapping for the select_tab action which presents you with a list of
#: tabs and allows for easy switching to a tab. #: tabs and allows for easy switching to a tab.
# tab_bar_align left tab_bar_align left
#: The horizontal alignment of the tab bar, can be one of: left, #: The horizontal alignment of the tab bar, can be one of: left,
#: center, right. #: center, right.
@ -1030,7 +1052,7 @@ font_size 13.0
#: The separator between tabs in the tab bar when using separator as #: The separator between tabs in the tab bar when using separator as
#: the tab_bar_style. #: the tab_bar_style.
# tab_powerline_style angled tab_powerline_style slanted
#: The powerline separator style between tabs in the tab bar when #: The powerline separator style between tabs in the tab bar when
#: using powerline as the tab_bar_style, can be one of: angled, #: using powerline as the tab_bar_style, can be one of: angled,
@ -1043,12 +1065,13 @@ font_size 13.0
#: leading or trailing spaces, surround the text with quotes. See #: leading or trailing spaces, surround the text with quotes. See
#: tab_title_template for how this is rendered. #: tab_title_template for how this is rendered.
# tab_title_max_length 0 tab_title_max_length 20
#: The maximum number of cells that can be used to render the text in #: The maximum number of cells that can be used to render the text in
#: a tab. A value of zero means that no limit is applied. #: a tab. A value of zero means that no limit is applied.
# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" # tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{title}"
tab_title_template "{title}{fmt.bold}{'  ' if num_windows > 1 and layout_name == 'stack' else ''}"
#: A template to render the tab title. The default just renders the #: A template to render the tab title. The default just renders the
#: title with optional symbols for bell and activity. If you wish to #: title with optional symbols for bell and activity. If you wish to
@ -1089,8 +1112,7 @@ font_size 13.0
#: Note that for backward compatibility, if {bell_symbol} or #: Note that for backward compatibility, if {bell_symbol} or
#: {activity_symbol} are not present in the template, they are #: {activity_symbol} are not present in the template, they are
#: prepended to it. #: prepended to it.
active_tab_title_template "{fmt.fg.tab}{index}{sup.layout_name[:2].lower()}:{title}"
# active_tab_title_template none
#: Template to use for active tabs. If not specified falls back to #: Template to use for active tabs. If not specified falls back to
#: tab_title_template. #: tab_title_template.
@ -1125,7 +1147,7 @@ font_size 13.0
#: The foreground and background colors. #: The foreground and background colors.
# background_opacity 1.0 background_opacity 1
#: The opacity of the background. A number between zero and one, where #: The opacity of the background. A number between zero and one, where
#: one is opaque and zero is fully transparent. This will only work if #: one is opaque and zero is fully transparent. This will only work if
@ -1161,8 +1183,6 @@ font_size 13.0
#: platform implements it, so use with care. Currently supported on #: platform implements it, so use with care. Currently supported on
#: macOS and KDE under X11. #: macOS and KDE under X11.
# background_image none
#: Path to a background image. Must be in PNG format. #: Path to a background image. Must be in PNG format.
# background_image_layout tiled # background_image_layout tiled
@ -1177,14 +1197,14 @@ font_size 13.0
#: When background image is scaled, whether linear interpolation #: When background image is scaled, whether linear interpolation
#: should be used. #: should be used.
# dynamic_background_opacity no dynamic_background_opacity yes
#: Allow changing of the background_opacity dynamically, using either #: Allow changing of the background_opacity dynamically, using either
#: keyboard shortcuts (increase_background_opacity and #: keyboard shortcuts (increase_background_opacity and
#: decrease_background_opacity) or the remote control facility. #: decrease_background_opacity) or the remote control facility.
#: Changing this option by reloading the config is not supported. #: Changing this option by reloading the config is not supported.
# background_tint 0.0 # background_tint 1
#: How much to tint the background image by the background color. This #: How much to tint the background image by the background color. This
#: option makes it easier to read the text. Tinting is done using the #: option makes it easier to read the text. Tinting is done using the
@ -1358,7 +1378,8 @@ font_size 13.0
#: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote- #: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote-
#: control/#rc-custom-auth> for details. #: control/#rc-custom-auth> for details.
# allow_remote_control no allow_remote_control socket-only
listen_on unix:@mykitty
#: Allow other programs to control kitty. If you turn this on, other #: Allow other programs to control kitty. If you turn this on, other
#: programs can control all aspects of kitty, including sending text #: programs can control all aspects of kitty, including sending text
@ -1445,7 +1466,7 @@ font_size 13.0
#: exe_search_path +/some/appended/path #: exe_search_path +/some/appended/path
#: exe_search_path -/some/excluded/path #: exe_search_path -/some/excluded/path
# update_check_interval 24 update_check_interval 0
#: The interval to periodically check if an update to kitty is #: The interval to periodically check if an update to kitty is
#: available (in hours). If an update is found, a system notification #: available (in hours). If an update is found, a system notification
@ -1455,7 +1476,7 @@ font_size 13.0
#: builds do not do update checking. Changing this option by reloading #: builds do not do update checking. Changing this option by reloading
#: the config is not supported. #: the config is not supported.
# startup_session none startup_session sessions/example.session
#: Path to a session file to use for all kitty instances. Can be #: Path to a session file to use for all kitty instances. Can be
#: overridden by using the kitty --session =none command line option #: overridden by using the kitty --session =none command line option
@ -1767,22 +1788,13 @@ font_size 13.0
#: The full list of actions that can be mapped to key presses is #: The full list of actions that can be mapped to key presses is
#: available here <https://sw.kovidgoyal.net/kitty/actions/>. #: available here <https://sw.kovidgoyal.net/kitty/actions/>.
kitty_mod ctrl+alt+shift
#: Special modifier key alias for default shortcuts. You can change
#: the value of this option to alter all default shortcuts that use
#: kitty_mod.
#default was ctrl+shift. I changed it because it was masking
# my tmux keybindings with ctrl shift.
clear_all_shortcuts yes
#: Remove all shortcut definitions up to this point. Useful, for
#: instance, to remove the default shortcuts.
# I just get rid of all shortcuts because I don't use a single one of them
# action_alias # action_alias
#: E.g. action_alias launch_tab launch --type=tab --cwd=current #: E.g. action_alias launch_tab launch --type=tab --cwd=current
action_alias launch_tab launch --type=tab --cwd=current
#: Define action aliases to avoid repeating the same options in #: Define action aliases to avoid repeating the same options in
#: multiple mappings. Aliases can be defined for any action and will #: multiple mappings. Aliases can be defined for any action and will
@ -1790,7 +1802,7 @@ clear_all_shortcuts yes
#: create mappings to launch a new tab in the current working #: create mappings to launch a new tab in the current working
#: directory without duplication:: #: directory without duplication::
#: map f1 launch_tab vim map f1 launch_tab ${EDITOR}
#: map f2 launch_tab emacs #: map f2 launch_tab emacs
#: Similarly, to alias kitten invocation:: #: Similarly, to alias kitten invocation::
@ -1812,7 +1824,7 @@ clear_all_shortcuts yes
#: Copy to clipboard #: Copy to clipboard
# map kitty_mod+c copy_to_clipboard map ctrl+c copy_and_clear_or_interrupt
# map cmd+c copy_to_clipboard # map cmd+c copy_to_clipboard
#:: There is also a copy_or_interrupt action that can be optionally #:: There is also a copy_or_interrupt action that can be optionally
@ -1823,7 +1835,7 @@ clear_all_shortcuts yes
#: Paste from clipboard #: Paste from clipboard
# map kitty_mod+v paste_from_clipboard map kitty_mod+v paste_from_clipboard
# map cmd+v paste_from_clipboard # map cmd+v paste_from_clipboard
#: Paste from selection #: Paste from selection
@ -1855,40 +1867,42 @@ clear_all_shortcuts yes
#: Scroll line up #: Scroll line up
# map kitty_mod+up scroll_line_up # map kitty_mod+up scroll_line_up
# map kitty_mod+k scroll_line_up map kitty_mod+k scroll_line_up
# map opt+cmd+page_up scroll_line_up # map opt+cmd+page_up scroll_line_up
# map cmd+up scroll_line_up # map cmd+up scroll_line_up
#: Scroll line down #: Scroll line down
# map kitty_mod+down scroll_line_down # map kitty_mod+down scroll_line_down
# map kitty_mod+j scroll_line_down map kitty_mod+j scroll_line_down
# map opt+cmd+page_down scroll_line_down # map opt+cmd+page_down scroll_line_down
# map cmd+down scroll_line_down # map cmd+down scroll_line_down
#: Scroll page up #: Scroll page up
# map kitty_mod+page_up scroll_page_up map kitty_mod+u scroll_page_up
map kitty_mod+page_up scroll_page_up
# map cmd+page_up scroll_page_up # map cmd+page_up scroll_page_up
#: Scroll page down #: Scroll page down
# map kitty_mod+page_down scroll_page_down map kitty_mod+d scroll_page_down
map kitty_mod+page_down scroll_page_down
# map cmd+page_down scroll_page_down # map cmd+page_down scroll_page_down
#: Scroll to top #: Scroll to top
# map kitty_mod+home scroll_home map kitty_mod+home scroll_home
# map cmd+home scroll_home # map cmd+home scroll_home
#: Scroll to bottom #: Scroll to bottom
# map kitty_mod+end scroll_end map kitty_mod+end scroll_end
# map cmd+end scroll_end # map cmd+end scroll_end
#: Scroll to previous shell prompt #: Scroll to previous shell prompt
# map kitty_mod+z scroll_to_prompt -1 map kitty_mod+z scroll_to_prompt -1
#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last #:: Use a parameter of 0 for scroll_to_prompt to scroll to the last
#:: jumped to or the last clicked position. Requires shell #:: jumped to or the last clicked position. Requires shell
@ -1897,12 +1911,16 @@ clear_all_shortcuts yes
#: Scroll to next shell prompt #: Scroll to next shell prompt
# map kitty_mod+x scroll_to_prompt 1 map kitty_mod+x scroll_to_prompt 1
#: Browse scrollback buffer in pager #: Browse scrollback buffer in pager
# map kitty_mod+h show_scrollback # map kitty_mod+h show_scrollback
# Browse scrollback buffer in nvim
map kitty_mod+h kitty_scrollback_nvim
#:: You can pipe the contents of the current screen and history #:: You can pipe the contents of the current screen and history
#:: buffer as STDIN to an arbitrary program using launch --stdin- #:: buffer as STDIN to an arbitrary program using launch --stdin-
#:: source. For example, the following opens the scrollback buffer in #:: source. For example, the following opens the scrollback buffer in
@ -1916,6 +1934,9 @@ clear_all_shortcuts yes
#: Browse output of the last shell command in pager #: Browse output of the last shell command in pager
# map kitty_mod+g show_last_command_output # map kitty_mod+g show_last_command_output
# Browse output of the last shell command in nvim
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
# Show clicked command output in nvim
#:: You can also define additional shortcuts to get the command #:: You can also define additional shortcuts to get the command
#:: output. For example, to get the first command output on screen:: #:: output. For example, to get the first command output on screen::
@ -1931,7 +1952,7 @@ clear_all_shortcuts yes
#:: using the launch action. For example, the following opens the #:: using the launch action. For example, the following opens the
#:: output in less in an overlay window:: #:: output in less in an overlay window::
#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R # map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R
#:: To get the output of the first command on the screen, use #:: To get the output of the first command on the screen, use
#:: @first_cmd_output_on_screen. To get the output of the last jumped #:: @first_cmd_output_on_screen. To get the output of the last jumped
@ -1946,7 +1967,7 @@ clear_all_shortcuts yes
#: New window #: New window
# map kitty_mod+enter new_window map kitty_mod+c launch --cwd=current
# map cmd+enter new_window # map cmd+enter new_window
#:: You can open a new kitty window running an arbitrary program, for #:: You can open a new kitty window running an arbitrary program, for
@ -1969,8 +1990,9 @@ clear_all_shortcuts yes
#:: You can open a new window next to the currently active window or #:: You can open a new window next to the currently active window or
#:: as the first window, with:: #:: as the first window, with::
#:: map ctrl+n launch --location=neighbor ## new window beside
#:: map ctrl+f launch --location=first map kitty_mod+b launch --location=neighbor
map kitty_mod+f launch --location=first
#:: For more details, see launch #:: For more details, see launch
#:: <https://sw.kovidgoyal.net/kitty/launch/>. #:: <https://sw.kovidgoyal.net/kitty/launch/>.
@ -1986,7 +2008,7 @@ clear_all_shortcuts yes
#: Close window #: Close window
# map kitty_mod+w close_window map kitty_mod+q close_window
# map shift+cmd+d close_window # map shift+cmd+d close_window
#: Next window #: Next window
@ -1999,18 +2021,28 @@ clear_all_shortcuts yes
#: Move window forward #: Move window forward
# map kitty_mod+f move_window_forward map kitty_mod+. move_window_forward
#: Move window backward #: Move window backward
# map kitty_mod+b move_window_backward map kitty_mod+, move_window_backward
#: Move window to top #: Make window mAin window
map kitty_mod+a move_window_to_top
# map kitty_mod+` move_window_to_top
map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j
map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k
map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h
map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l
# the 3 here is the resize amount, adjust as needed
map kitty_mod+ctrl+j kitten pass_keys.py relative_resize down 3 alt+j
map kitty_mod+ctrl+k kitten pass_keys.py relative_resize up 3 alt+k
map kitty_mod+ctrl+h kitten pass_keys.py relative_resize left 3 alt+h
map kitty_mod+ctrl+l kitten pass_keys.py relative_resize right 3 alt+l
#: Start resizing window #: Start resizing window
# map kitty_mod+r start_resizing_window # map kitty_mod+r start_resizing_window
# map cmd+r start_resizing_window # map cmd+r start_resizing_window
@ -2065,7 +2097,7 @@ clear_all_shortcuts yes
#: Visually select and focus window #: Visually select and focus window
# map kitty_mod+f7 focus_visible_window map kitty_mod+s focus_visible_window
#:: Display overlay numbers and alphabets on the window, and switch #:: Display overlay numbers and alphabets on the window, and switch
#:: the focus to the window when you press the key. When there are #:: the focus to the window when you press the key. When there are
@ -2075,7 +2107,7 @@ clear_all_shortcuts yes
#: Visually swap window with another #: Visually swap window with another
# map kitty_mod+f8 swap_with_window map kitty_mod+ctrl+s swap_with_window
#:: Works like focus_visible_window above, but swaps the window. #:: Works like focus_visible_window above, but swaps the window.
@ -2085,24 +2117,28 @@ clear_all_shortcuts yes
#: Next tab #: Next tab
map kitty_mod+n next_tab
# map kitty_mod+right next_tab # map kitty_mod+right next_tab
# map shift+cmd+] next_tab # map shift+cmd+] next_tab
# map ctrl+tab next_tab # map ctrl+tab next_tab
#: Previous tab #: Previous tab
map kitty_mod+p previous_tab
# map kitty_mod+left previous_tab # map kitty_mod+left previous_tab
# map shift+cmd+[ previous_tab # map shift+cmd+[ previous_tab
# map ctrl+shift+tab previous_tab # map ctrl+shift+tab previous_tab
map kitty_mod+shift+t new_tab
map kitty_mod+shift+t new_tab
#: New tab #: New tab
# map kitty_mod+t new_tab map kitty_mod+t new_tab !neighbor
# map cmd+t new_tab # map cmd+t new_tab
#: Close tab #: Close tab
# map kitty_mod+q close_tab map kitty_mod+w close_tab
# map cmd+w close_tab # map cmd+w close_tab
#: Close OS window #: Close OS window
@ -2111,15 +2147,15 @@ clear_all_shortcuts yes
#: Move tab forward #: Move tab forward
# map kitty_mod+. move_tab_forward map kitty_mod+shift+. move_tab_forward
#: Move tab backward #: Move tab backward
# map kitty_mod+, move_tab_backward map kitty_mod+shift+, move_tab_backward
#: Set tab title #: Set tab title
# map kitty_mod+alt+t set_tab_title map kitty_mod+r set_tab_title
# map shift+cmd+i set_tab_title # map shift+cmd+i set_tab_title
@ -2127,8 +2163,27 @@ clear_all_shortcuts yes
#: the first tab, 2 the second tab and -1 being the previously active #: the first tab, 2 the second tab and -1 being the previously active
#: tab, and any number larger than the last tab being the last tab:: #: tab, and any number larger than the last tab being the last tab::
#: map ctrl+alt+1 goto_tab 1 map ctrl+s>' goto_tab -1
#: map ctrl+alt+2 goto_tab 2 map kitty_mod+tab goto_tab -1
map kitty_mod+1 goto_tab 1
map kitty_mod+2 goto_tab 2
map kitty_mod+3 goto_tab 3
map kitty_mod+4 goto_tab 4
map kitty_mod+5 goto_tab 5
map kitty_mod+6 goto_tab 6
map kitty_mod+7 goto_tab 7
map kitty_mod+8 goto_tab 8
map kitty_mod+9 goto_tab 9
# map kitty_mod+ctrl+q goto_tab 1
# map kitty_mod+ctrl+w goto_tab 2
# map kitty_mod+ctrl+e goto_tab 3
# map kitty_mod+ctrl+r goto_tab 4
# map kitty_mod+ctrl+t goto_tab 5
# map kitty_mod+ctrl+y goto_tab 6
# map kitty_mod+ctrl+u goto_tab 7
# map kitty_mod+ctrl+i goto_tab 8
# map kitty_mod+ctrl+o goto_tab 9
#: Just as with new_window above, you can also pass the name of #: Just as with new_window above, you can also pass the name of
#: arbitrary commands to run when using new_tab and new_tab_with_cwd. #: arbitrary commands to run when using new_tab and new_tab_with_cwd.
@ -2136,6 +2191,7 @@ clear_all_shortcuts yes
#: rather than at the end of the tabs list, use:: #: rather than at the end of the tabs list, use::
#: map ctrl+t new_tab !neighbor [optional cmd to run] #: map ctrl+t new_tab !neighbor [optional cmd to run]
map kitty_mod+shift+t new_tab
#: }}} #: }}}
#: Layout management {{{ #: Layout management {{{
@ -2143,6 +2199,7 @@ clear_all_shortcuts yes
#: Next layout #: Next layout
# map kitty_mod+l next_layout # map kitty_mod+l next_layout
map kitty_mod+space next_layout
#: You can also create shortcuts to switch to specific layouts:: #: You can also create shortcuts to switch to specific layouts::
@ -2153,6 +2210,8 @@ clear_all_shortcuts yes
#: Similarly, to switch back to the previous layout:: #: Similarly, to switch back to the previous layout::
#: map ctrl+alt+p last_used_layout #: map ctrl+alt+p last_used_layout
map kitty_mod+shift+space last_used_layout
map kitty_mod+ctrl+space last_used_layout
#: There is also a toggle_layout action that switches to the named #: There is also a toggle_layout action that switches to the named
#: layout or back to the previous layout if in the named layout. #: layout or back to the previous layout if in the named layout.
@ -2160,6 +2219,7 @@ clear_all_shortcuts yes
#: stack layout:: #: stack layout::
#: map ctrl+alt+z toggle_layout stack #: map ctrl+alt+z toggle_layout stack
map kitty_mod+m toggle_layout stack
#: }}} #: }}}
#: Font sizes {{{ #: Font sizes {{{
@ -2169,23 +2229,24 @@ clear_all_shortcuts yes
#: Increase font size #: Increase font size
# map kitty_mod+equal change_font_size all +2.0 map kitty_mod+equal change_font_size all +0.5
# map kitty_mod+plus change_font_size all +2.0 map kitty_mod+plus change_font_size all +0.5
# map kitty_mod+kp_add change_font_size all +2.0 map kitty_mod+kp_add change_font_size all +0.5
# map cmd+plus change_font_size all +2.0 # map cmd+plus change_font_size all +2.0
# map cmd+equal change_font_size all +2.0 # map cmd+equal change_font_size all +2.0
# map shift+cmd+equal change_font_size all +2.0 # map shift+cmd+equal change_font_size all +2.0
#: Decrease font size #: Decrease font size
# map kitty_mod+minus change_font_size all -2.0 map kitty_mod+minus change_font_size all -0.5
# map kitty_mod+kp_subtract change_font_size all -2.0 map kitty_mod+kp_subtract change_font_size all -0.5
# map cmd+minus change_font_size all -2.0 # map cmd+minus change_font_size all -2.0
# map shift+cmd+minus change_font_size all -2.0 # map shift+cmd+minus change_font_size all -2.0
#: Reset font size #: Reset font size
# map kitty_mod+backspace change_font_size all 0 map kitty_mod+backspace change_font_size all 0
map kitty_mod+0 change_font_size all 0
# map cmd+0 change_font_size all 0 # map cmd+0 change_font_size all 0
@ -2207,28 +2268,30 @@ clear_all_shortcuts yes
#: Open URL #: Open URL
# map kitty_mod+e open_url_with_hints map kitty_mod+e open_url_with_hints
#:: Open a currently visible URL using the keyboard. The program used #:: Open a currently visible URL using the keyboard. The program used
#:: to open the URL is specified in open_url_with. #:: to open the URL is specified in open_url_with.
#: Insert selected path #: Insert selected path
# map kitty_mod+p>f kitten hints --type path --program - # map kitty_mod+p>f kitten hints --type path --alphabet abcdefghijklmnopqrstuvwxyz1234567890 --program -
map kitty_mod+i>f kitten hints --type path --alphabet hjklfdsagtyrueiwoqpbnvmcxz1234567890 --program -
#:: Select a path/filename and insert it into the terminal. Useful, #:: Select a path/filename and insert it into the terminal. Useful,
#:: for instance to run git commands on a filename output from a #:: for instance to run git commands on a filename output from a
#:: previous git command. #:: previous git command.
#: Open selected path #: Open selected path
# map kitty_mod+p>shift+f kitten hints --type path # map kitty_mod+p>shift+f kitten hints --type path
map kitty_mod+o>f kitten hints --type path
#:: Select a path/filename and open it with the default open program. #:: Select a path/filename and open it with the default open program.
#: Insert selected line #: Insert selected line
# map kitty_mod+p>l kitten hints --type line --program - # map kitty_mod+p>l kitten hints --type line --program -
map kitty_mod+i>l kitten hints --type line --program -
#:: Select a line of text and insert it into the terminal. Useful for #:: Select a line of text and insert it into the terminal. Useful for
#:: the output of things like: `ls -1`. #:: the output of things like: `ls -1`.
@ -2236,12 +2299,14 @@ clear_all_shortcuts yes
#: Insert selected word #: Insert selected word
# map kitty_mod+p>w kitten hints --type word --program - # map kitty_mod+p>w kitten hints --type word --program -
map kitty_mod+i>w kitten hints --type word --program -
#:: Select words and insert into terminal. #:: Select words and insert into terminal.
#: Insert selected hash #: yank selected hash
map kitty_mod+y>h kitten hints --type hash --program @
# map kitty_mod+p>h kitten hints --type hash --program - #: insert selected hash
map kitty_mod+i>h kitten hints --type hash --program -
#:: Select something that looks like a hash and insert it into the #:: Select something that looks like a hash and insert it into the
#:: terminal. Useful with git, which uses SHA1 hashes to identify #:: terminal. Useful with git, which uses SHA1 hashes to identify
@ -2250,6 +2315,7 @@ clear_all_shortcuts yes
#: Open the selected file at the selected line #: Open the selected file at the selected line
# map kitty_mod+p>n kitten hints --type linenum # map kitty_mod+p>n kitten hints --type linenum
map kitty_mod+o>n kitten hints --type linenum
#:: Select something that looks like filename:linenum and open it in #:: Select something that looks like filename:linenum and open it in
#:: vim at the specified line number. #:: vim at the specified line number.
@ -2257,6 +2323,8 @@ clear_all_shortcuts yes
#: Open the selected hyperlink #: Open the selected hyperlink
# map kitty_mod+p>y kitten hints --type hyperlink # map kitty_mod+p>y kitten hints --type hyperlink
map kitty_mod+o>h kitten hints --type hyperlink
map kitty_mod+o>l kitten hints --type hyperlink
#:: Select a hyperlink (i.e. a URL that has been marked as such by #:: Select a hyperlink (i.e. a URL that has been marked as such by
#:: the terminal program, for example, by `ls --hyperlink=auto`). #:: the terminal program, for example, by `ls --hyperlink=auto`).
@ -2289,6 +2357,7 @@ clear_all_shortcuts yes
#: Unicode input #: Unicode input
# map kitty_mod+u kitten unicode_input # map kitty_mod+u kitten unicode_input
map kitty_mod+shift+u kitten unicode_input
# map ctrl+cmd+space kitten unicode_input # map ctrl+cmd+space kitten unicode_input
#: Edit config file #: Edit config file
@ -2298,30 +2367,36 @@ clear_all_shortcuts yes
#: Open the kitty command shell #: Open the kitty command shell
# map kitty_mod+escape kitty_shell window map kitty_mod+escape kitty_shell window
#:: Open the kitty shell in a new window / tab / overlay / os_window #:: Open the kitty shell in a new window / tab / overlay / os_window
#:: to control kitty using commands. #:: to control kitty using commands.
#: Increase background opacity #: Increase background opacity
map kitty_mod+ctrl+i set_background_opacity +0.1
# map kitty_mod+a>m set_background_opacity +0.1 # map kitty_mod+a>m set_background_opacity +0.1
#: Decrease background opacity #: Decrease background opacity
map kitty_mod+ctrl+d set_background_opacity -0.1
# map kitty_mod+a>l set_background_opacity -0.1 # map kitty_mod+a>l set_background_opacity -0.1
#: Make background fully opaque #: Make background fully opaque
map kitty_mod+ctrl+f set_background_opacity 1
# map kitty_mod+a>1 set_background_opacity 1 # map kitty_mod+a>1 set_background_opacity 1
#: Reset background opacity #: Reset background opacity
map kitty_mod+ctrl+r set_background_opacity default
# map kitty_mod+a>d set_background_opacity default # map kitty_mod+a>d set_background_opacity default
#: Reset the terminal #: Reset the terminal
# map kitty_mod+delete clear_terminal reset active # map kitty_mod+delete clear_terminal reset active
map kitty_mod+delete clear_terminal reset active
map kitty_mod+backspace clear_terminal reset active
# map opt+cmd+r clear_terminal reset active # map opt+cmd+r clear_terminal reset active
#:: You can create shortcuts to clear/reset the terminal. For #:: You can create shortcuts to clear/reset the terminal. For
@ -2379,7 +2454,7 @@ clear_all_shortcuts yes
#: Reload kitty.conf #: Reload kitty.conf
# map kitty_mod+f5 load_config_file map kitty_mod+f5 load_config_file
# map ctrl+cmd+, load_config_file # map ctrl+cmd+, load_config_file
#:: Reload kitty.conf, applying any changes since the last time it #:: Reload kitty.conf, applying any changes since the last time it
@ -2405,6 +2480,8 @@ clear_all_shortcuts yes
#: Send arbitrary text on key presses #: Send arbitrary text on key presses
#:: E.g. map ctrl+shift+alt+h send_text all Hello World #:: E.g. map ctrl+shift+alt+h send_text all Hello World
#send ctrl+l with kitty mod
map kitty_mod+l send_text application \f
#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the #:: You can tell kitty to send arbitrary (UTF-8) encoded text to the
#:: client program when pressing specified shortcut keys. For #:: client program when pressing specified shortcut keys. For

View File

@ -0,0 +1,33 @@
# Open script files
protocol file
ext sh,command,tool
action launch --hold --type=os-window kitty +shebang $FILE_PATH $SHELL
# Open shell specific script files
protocol file
ext fish,bash,zsh
action launch --hold --type=os-window kitty +shebang $FILE_PATH __ext__
# Open directories
protocol file
mime inode/directory
action launch --type=os-window --cwd $FILE_PATH
# Open executable file
protocol file
mime inode/executable,application/vnd.microsoft.portable-executable
action launch --hold --type=os-window $FILE_PATH
# Open text files without fragments in the editor
protocol file
mime text/*
action launch --type=os-window $EDITOR $FILE_PATH
# Open image files with icat
protocol file
mime image/*
action launch --type=os-window kitten icat --hold $FILE_PATH
# Open ssh URLs with ssh command
protocol ssh
action launch --type=os-window ssh $URL

View File

@ -0,0 +1,174 @@
# vim:fileencoding=utf-8:foldmethod=marker:ft=kitty
# these shortcuts are here for just reference.
# TODO: update this shortcuts with actual kitty config
# and import this file directly
map f1 launch_tab ${EDITOR}
# masked by create new window but let's see
# map kitty_mod+c copy_to_clipboard
map kitty_mod+v paste_from_clipboard
map kitty_mod+k scroll_line_up
map kitty_mod+j scroll_line_down
map kitty_mod+u scroll_page_up
map kitty_mod+page_up scroll_page_up
map kitty_mod+d scroll_page_down
map kitty_mod+page_down scroll_page_down
map kitty_mod+home scroll_home
map kitty_mod+end scroll_end
map kitty_mod+z scroll_to_prompt -1
map kitty_mod+x scroll_to_prompt 1
map kitty_mod+h show_scrollback
map kitty_mod+g show_last_command_output
#: New window
map kitty_mod+c launch --cwd=current
## new window beside
map kitty_mod+b launch --location=neighbor
map kitty_mod+f launch --location=first
map kitty_mod+q close_window
map kitty_mod+w close_tab
map kitty_mod+. move_window_forward
map kitty_mod+, move_window_backward
map kitty_mod+shift+. move_tab_forward
map kitty_mod+shift+, move_tab_backward
#: Make window mAin window
map kitty_mod+a move_window_to_top
map kitty_mod+escape kitty_shell window
map kitty_mod+shift+u kitten unicode_input
map kitty_mod+m toggle_layout stack
map kitty_mod+e open_url_with_hints
#: Insert selected path
map kitty_mod+i>f kitten hints --type path --alphabet hjklfdsagtyrueiwoqpbnvmcxz1234567890 --program -
#: Insert selected line
map kitty_mod+i>l kitten hints --type line --program -
#: Insert selected word
map kitty_mod+i>w kitten hints --type word --program -
#: Open selected path
map kitty_mod+o>f kitten hints --type path
#:: Select something that looks like filename:linenum and open it in
#:: vim at the specified line number.
map kitty_mod+o>n kitten hints --type linenum
#:: Select a hyperlink (i.e. a URL that has been marked as such by
#:: the terminal program, for example, by `ls --hyperlink=auto`).
map kitty_mod+o>h kitten hints --type hyperlink
map kitty_mod+o>l kitten hints --type hyperlink
#: yank selected hash
map kitty_mod+y>h kitten hints --type hash --program @
#insert selected hash
map kitty_mod+i>h kitten hints --type hash --program -
map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j
map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k
map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h
map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l
# the 3 here is the resize amount, adjust as needed
map kitty_mod+ctrl+j kitten pass_keys.py relative_resize down 3 alt+j
map kitty_mod+ctrl+k kitten pass_keys.py relative_resize up 3 alt+k
map kitty_mod+ctrl+h kitten pass_keys.py relative_resize left 3 alt+h
map kitty_mod+ctrl+l kitten pass_keys.py relative_resize right 3 alt+l
#switch to window
map kitty_mod+s focus_visible_window
map kitty_mod+ctrl+s swap_with_window
map kitty_mod+n next_tab
map kitty_mod+p previous_tab
map kitty_mod+t new_tab !neighbor
map kitty_mod+shift+t new_tab
# rename
map kitty_mod+r set_tab_title
map kitty_mod+space next_layout
map kitty_mod+shift+space last_used_layout
map kitty_mod+ctrl+space last_used_layout
map kitty_mod+tab goto_tab -1
map kitty_mod+1 goto_tab 1
map kitty_mod+2 goto_tab 2
map kitty_mod+3 goto_tab 3
map kitty_mod+4 goto_tab 4
map kitty_mod+5 goto_tab 5
map kitty_mod+6 goto_tab 6
map kitty_mod+7 goto_tab 7
map kitty_mod+8 goto_tab 8
map kitty_mod+9 goto_tab 9
# map kitty_mod+ctrl+q goto_tab 1
# map kitty_mod+ctrl+w goto_tab 2
# map kitty_mod+ctrl+e goto_tab 3
# map kitty_mod+ctrl+r goto_tab 4
# map kitty_mod+ctrl+t goto_tab 5
# map kitty_mod+ctrl+y goto_tab 6
# map kitty_mod+ctrl+u goto_tab 7
# map kitty_mod+ctrl+i goto_tab 8
# map kitty_mod+ctrl+o goto_tab 9
map kitty_mod+equal change_font_size all +0.5
map kitty_mod+plus change_font_size all +0.5
map kitty_mod+kp_add change_font_size all +0.5
# map cmd+plus change_font_size all +2.0
# map cmd+equal change_font_size all +2.0
# map shift+cmd+equal change_font_size all +2.0
#: Decrease font size
map kitty_mod+minus change_font_size all -0.5
map kitty_mod+kp_subtract change_font_size all -0.5
# map cmd+minus change_font_size all -2.0
# map shift+cmd+minus change_font_size all -2.0
#: Reset font size
map kitty_mod+backspace change_font_size all 0
map kitty_mod+0 change_font_size all 0
map kitty_mod+ctrl+i set_background_opacity +0.1
map kitty_mod+ctrl+d set_background_opacity -0.1
map kitty_mod+ctrl+f set_background_opacity 1
map kitty_mod+ctrl+r set_background_opacity default
map kitty_mod+delete clear_terminal reset active
map kitty_mod+backspace clear_terminal reset active
map kitty_mod+f5 load_config_file
#send ctrl+l with kitty mod
map kitty_mod+l send_text application \f

View File

@ -0,0 +1,21 @@
# Open any image in the full kitty window by clicking on it
protocol file
mime image/*
action launch --type=overlay kitten icat --hold ${FILE_PATH}
# Open any file with a fragment in vim, fragments are generated
# by the hyperlink_grep kitten or ripgrep v13.0+
protocol file
fragment_matches [0-9]+
action launch --type=overlay --cwd=current ${EDITOR} +${FRAGMENT} ${FILE_PATH}
# open file in $EDITOR when clicked
protocol file
mime text/*
action launch --type=overlay --cwd=current ${EDITOR} ${FILE_PATH}
# Tail a log file (*.log) in a new OS Window and reduce its font size
# protocol file
# ext log
# action launch --title ${FILE} --type=os-window tail -f ${FILE_PATH}
# action change_font_size current -2

106
.config/kitty/pass_keys.py Normal file
View File

@ -0,0 +1,106 @@
import re
from kittens.tui.handler import result_handler
from kitty.key_encoding import KeyEvent, parse_shortcut
def is_window_vim(window, vim_id):
from kittens.tui.loop import debug
debug(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 relative_resize_window(direction, amount, target_window_id, boss):
window = boss.window_id_map.get(target_window_id)
if window is None:
return
neighbors = boss.active_tab.current_layout.neighbors_for_window(window, boss.active_tab.windows)
current_window_id = boss.active_tab.active_window
left_neighbors = neighbors.get('left')
right_neighbors = neighbors.get('right')
top_neighbors = neighbors.get('top')
bottom_neighbors = neighbors.get('bottom')
# has a neighbor on both sides
if direction == 'left' and (left_neighbors and right_neighbors):
boss.active_tab.resize_window('narrower', amount)
# only has left neighbor
elif direction == 'left' and left_neighbors:
boss.active_tab.resize_window('wider', amount)
# only has right neighbor
elif direction == 'left' and right_neighbors:
boss.active_tab.resize_window('narrower', amount)
# has a neighbor on both sides
elif direction == 'right' and (left_neighbors and right_neighbors):
boss.active_tab.resize_window('wider', amount)
# only has left neighbor
elif direction == 'right' and left_neighbors:
boss.active_tab.resize_window('narrower', amount)
# only has right neighbor
elif direction == 'right' and right_neighbors:
boss.active_tab.resize_window('wider', amount)
# has a neighbor above and below
elif direction == 'up' and (top_neighbors and bottom_neighbors):
boss.active_tab.resize_window('shorter', amount)
# only has top neighbor
elif direction == 'up' and top_neighbors:
boss.active_tab.resize_window('taller', amount)
# only has bottom neighbor
elif direction == 'up' and bottom_neighbors:
boss.active_tab.resize_window('shorter', amount)
# has a neighbor above and below
elif direction == 'down' and (top_neighbors and bottom_neighbors):
boss.active_tab.resize_window('taller', amount)
# only has top neighbor
elif direction == 'down' and top_neighbors:
boss.active_tab.resize_window('shorter', amount)
# only has bottom neighbor
elif direction == 'down' and bottom_neighbors:
boss.active_tab.resize_window('taller', amount)
def main():
pass
@result_handler(no_ui=True)
def handle_result(args, result, target_window_id, boss):
window = boss.window_id_map.get(target_window_id)
action = args[1]
direction = args[2]
key_mapping = args[3] if action == 'neighboring_window' else args[4]
amount = int(args[3]) if action == 'relative_resize' else None
vim_id_idx = 4 if action == 'neighboring_window' else 5
vim_id = args[vim_id_idx] if len(args) > vim_id_idx else "n?vim"
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)
elif action == 'neighboring_window':
boss.active_tab.neighboring_window(direction)
elif action == 'relative_resize':
relative_resize_window(direction, amount, target_window_id, boss)

View File

@ -0,0 +1,77 @@
# Tokyo Night color scheme for kitty terminal emulator
# https://github.com/davidmathers/tokyo-night-kitty-theme
#
# Based on Tokyo Night color theme for Visual Studio Code
# https://github.com/enkia/tokyo-night-vscode-theme
foreground #a9b1d6
background #1a1b26
# Black
color0 #414868
color8 #414868
# Red
color1 #f7768e
color9 #f7768e
# Green
color2 #73daca
color10 #73daca
# Yellow
color3 #e0af68
color11 #e0af68
# Blue
color4 #7aa2f7
color12 #7aa2f7
# Magenta
color5 #bb9af7
color13 #bb9af7
# Cyan
color6 #7dcfff
color14 #7dcfff
# White
color7 #c0caf5
color15 #c0caf5
# Cursor
cursor #c0caf5
cursor_text_color #1a1b26
# Selection highlight
selection_foreground none
selection_background #28344a
# The color for highlighting URLs on mouse-over
url_color #9ece6a
# Window borders
active_border_color #3d59a1
inactive_border_color #101014
bell_border_color #e0af68
# Tab bar
tab_bar_style fade
tab_fade 1
active_tab_foreground #3d59a1
active_tab_background #16161e
active_tab_font_style bold
inactive_tab_foreground #787c99
inactive_tab_background #16161e
inactive_tab_font_style bold
tab_bar_background #101014
# Title bar
macos_titlebar_color #16161e
# Storm
# background #24283b
# cursor_text_color #24283b
# active_tab_background #1f2335
# inactive_tab_background #1f2335
# macos_titlebar_color #1f2335

1
.config/nvim Submodule

Submodule .config/nvim added at fce1f36161

53
.config/swaylock/config Normal file
View File

@ -0,0 +1,53 @@
ignore-empty-password
#font=Ubuntu Mono Nerd Font
#clock
#timestr=%R
image=~/Pictures/Wallpapers/kill-win.png
# fade-in=0.2
#effect-blur=15x2
#effect-greyscale
#effect-scale=0.1
# show-keyboard-layout
# indicator
indicator-radius=170
indicator-thickness=10
indicator-caps-lock
indicator-x-position=1165
indicator-y-position=625
key-hl-color=880033ff
separator-color=00000000
inside-color=01010133
inside-clear-color=ffd20433
inside-caps-lock-color=009ddc33
inside-ver-color=d9d8d833
inside-wrong-color=ee2e2433
ring-color=231f20D9
ring-clear-color=231f20D9
ring-caps-lock-color=231f20D9
ring-ver-color=231f20D9
ring-wrong-color=231f20D9
line-color=00000000
line-clear-color=ffd204FF
line-caps-lock-color=009ddcFF
line-ver-color=d9d8d8FF
line-wrong-color=ee2e24FF
text-color=dededeff
text-clear-color=ffd204ff
text-ver-color=000000ff
text-wrong-color=ee2e24ff
bs-hl-color=ffd204ff
caps-lock-key-hl-color=ffd204FF
caps-lock-bs-hl-color=dededeFF
text-caps-lock-color=009ddcff

View File

@ -0,0 +1,67 @@
#!/usr/bin/env python3
'''Timewarrior on-modify hook to call timew on start,stop, done commands.'''
import json
import shlex
import subprocess
import sys
def retrieve_args_dict():
'''Read process arguments and store them in a dictionary.'''
process_args = sys.argv[1:]
dictionary = dict()
for process_arg in process_args:
splitted = process_arg.split(':')
if len(splitted) > 1:
key = splitted[0]
value = ''.join(splitted[1:])
dictionary[key] = value
return dictionary
def determine_timew_tags(task):
'''Determine which timew "tags" should be used for the task.'''
tags = list()
# Keys associated with one value
for key in ['uuid', 'project', 'description']:
if key in task:
tags.append('{}:{}'.format(key, task[key]))
# Keys associated with several values
if 'tags' in task:
for value in task['tags']:
tags.append('tag:{}'.format(value))
return tags
def generate_timew_command(cmd, tags):
'''Generate an input for subprocess.call.'''
tags_as_string = ' '.join([shlex.quote(tag) for tag in tags])
if cmd == 'done':
cmd = 'stop'
cmd_string = f'timew {cmd} {tags_as_string} :yes'
return shlex.split(cmd_string)
def main():
'''Main function of this module.'''
old_task = json.loads(sys.stdin.readline())
new_task = json.loads(sys.stdin.readline())
args = retrieve_args_dict()
# Do something.
feedback = None
if 'api' in args: # Only do something for known API.
if args['api'] in ['2']: # APIs that give us a 'command' key.
cmd = args['command']
if cmd in ['start', 'stop', 'done']: # Only do something on 'start', 'stop' or 'done'
timew_tags = determine_timew_tags(new_task)
timew_cmd = generate_timew_command(cmd, timew_tags)
subprocess.call(timew_cmd)
# Generate output as task expects it.
print(json.dumps(new_task))
if feedback is not None:
print(feedback)
sys.exit(0)
if __name__ == "__main__":
main()

48
.config/task/taskrc Normal file
View File

@ -0,0 +1,48 @@
# [Created by task 2.6.2 12/23/2023 17:46:47]
# Taskwarrior program configuration file.
# For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color',
# 'man task-sync' or 'man taskrc'
# Here is an example of entries that use the default, override and blank values
# variable=foo -- By specifying a value, this overrides the default
# variable= -- By specifying no value, this means no default
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
# You can also refence environment variables:
# variable=$HOME/task
# variable=$VALUE
# Use the command 'task show' to see all defaults and overrides
# data.location=/home/sahin/.task
# To use the default location of the XDG directories,
# move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below
# Files
include holidays.tr-TR.rc
data.location=~/.local/share/task
hooks.location=~/.config/task/hooks
# Color theme (uncomment one to use)
# include solarized-dark-256.theme
# include dark-16.theme
# include light-16.theme
# include light-256.theme
# include dark-256.theme
#include dark-red-256.theme
#include dark-green-256.theme
#include dark-blue-256.theme
#include dark-violets-256.theme
#include dark-yellow-green.theme
#include dark-gray-256.theme
#include dark-gray-blue-256.theme
#include solarized-light-256.theme
#include no-color.theme
news.version=2.6.0
#
color.calendar.holiday=black on yellow
include light-256.theme

View File

@ -0,0 +1,192 @@
#!/usr/bin/env python3
###############################################################################
#
# Copyright 2016 - 2023, Thomas Lauf, Paul Beckingham, Federico Hernandez.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# https://www.opensource.org/licenses/mit-license.php
#
###############################################################################
import datetime
import json
import sys
from dateutil import tz
DATEFORMAT = "%Y%m%dT%H%M%SZ"
def format_seconds(seconds):
"""Convert seconds to a formatted string
Convert seconds: 3661
To formatted: " 1:01:01"
"""
hours = seconds // 3600
minutes = seconds % 3600 // 60
seconds = seconds % 60
return "{:4d}:{:02d}:{:02d}".format(hours, minutes, seconds)
def calculate_totals(input_stream):
from_zone = tz.tzutc()
to_zone = tz.tzlocal()
# Extract the configuration settings.
header = 1
configuration = dict()
body = ""
for line in input_stream:
if header:
if line == "\n":
header = 0
else:
fields = line.strip().split(": ", 2)
if len(fields) == 2:
configuration[fields[0]] = fields[1]
else:
configuration[fields[0]] = ""
else:
body += line
j = json.loads(body)
if "temp.report.start" in configuration:
report_start_utc = datetime.datetime.strptime(configuration["temp.report.start"], DATEFORMAT)
report_start_utc = report_start_utc.replace(tzinfo=from_zone)
report_start = report_start_utc.astimezone(tz=to_zone)
else:
report_start_utc = None
report_start = None
if "temp.report.end" in configuration:
report_end_utc = datetime.datetime.strptime(configuration["temp.report.end"], DATEFORMAT)
report_end_utc = report_end_utc.replace(tzinfo=from_zone)
report_end = report_end_utc.astimezone(tz=to_zone)
else:
report_end_utc = None
report_end = None
if len(j) == 0:
if report_start is not None and report_end is not None:
return ["No data in the range {:%Y-%m-%d %H:%M:%S} - {:%Y-%m-%d %H:%M:%S}".format(report_start, report_end)]
elif report_start is None and report_end is not None:
return ["No data in the range until {:%Y-%m-%d %H:%M:%S}".format(report_end)]
elif report_start is not None and report_end is None:
return ["No data in the range since {:%Y-%m-%d %H:%M:%S}".format(report_start)]
else:
return ["No data to display"]
if "start" in j[0]:
if report_start_utc is not None:
j[0]["start"] = max(report_start_utc, datetime.datetime.strptime(j[0]["start"], DATEFORMAT).replace(tzinfo=from_zone)).strftime(DATEFORMAT)
else:
report_start_utc = datetime.datetime.strptime(j[0]["start"], DATEFORMAT).replace(tzinfo=from_zone)
report_start = report_start_utc.astimezone(tz=to_zone)
else:
return ["Cannot display an past open range"]
if "end" in j[-1]:
if report_end_utc is not None:
j[-1]["end"] = min(report_end_utc, datetime.datetime.strptime(j[-1]["end"], DATEFORMAT).replace(tzinfo=from_zone)).strftime(DATEFORMAT)
else:
report_end_utc = datetime.datetime.strptime(j[-1]["end"], DATEFORMAT).replace(tzinfo=from_zone)
report_end = report_end_utc.astimezone(tz=to_zone)
else:
if report_end_utc is not None:
j[-1]["end"] = min(report_end_utc, datetime.datetime.now(tz=from_zone)).strftime(DATEFORMAT)
else:
j[-1]["end"] = datetime.datetime.now(tz=from_zone).strftime(DATEFORMAT)
report_end = datetime.datetime.now(tz=to_zone)
# Sum the seconds tracked by tag.
totals = dict()
untagged = None
for object in j:
start = datetime.datetime.strptime(object["start"], DATEFORMAT).replace(tzinfo=from_zone)
end = datetime.datetime.strptime(object["end"], DATEFORMAT).replace(tzinfo=from_zone)
tracked = end - start
if "tags" not in object or object["tags"] == []:
if untagged is None:
untagged = tracked
else:
untagged += tracked
else:
for tag in object["tags"]:
if tag in totals:
totals[tag] += tracked
else:
totals[tag] = tracked
# Determine largest tag width.
max_width = len("Total")
for tag in totals:
if len(tag) > max_width:
max_width = len(tag)
# Compose report header.
output = [
"",
"Total by Tag, for {:%Y-%m-%d %H:%M:%S} - {:%Y-%m-%d %H:%M:%S}".format(report_start, report_end),
""
]
# Compose table header.
if configuration["color"] == "on":
output.append("{:{width}} {:>10}".format("Tag", "Total", width=max_width))
else:
output.append("{:{width}} {:>10}".format("Tag", "Total", width=max_width))
output.append("{} {}".format("-" * max_width, "----------"))
# Compose table rows.
grand_total = 0
for tag in sorted(totals):
seconds = int(totals[tag].total_seconds())
formatted = format_seconds(seconds)
grand_total += seconds
output.append("{:{width}} {:10}".format(tag, formatted, width=max_width))
if untagged is not None:
seconds = int(untagged.total_seconds())
formatted = format_seconds(seconds)
grand_total += seconds
output.append("{:{width}} {:10}".format("", formatted, width=max_width))
# Compose total.
if configuration["color"] == "on":
output.append("{} {}".format(" " * max_width, " "))
else:
output.append("{} {}".format(" " * max_width, "----------"))
output.append("{:{width}} {:10}".format("Total", format_seconds(grand_total), width=max_width))
output.append("")
return output
if __name__ == "__main__":
for line in calculate_totals(sys.stdin):
print(line)

View File

@ -0,0 +1,35 @@
# Timewarrior Holiday Files
The holiday files were created by the `refresh` script using data from [holidata.net](https://holidata.net).
They can be updated using the following command:
```shell
$ ./refresh
```
This updates all present holiday files with holiday data for the current and the following year (default).
If you need another locale (for example `sv-SE`), do this:
```shell
$ ./refresh --locale sv-SE
```
This creates a file `holidays.sv-SE` containing holiday data for the current and following year.
The id for the locale is composed of the [ISO 639-1 language code](https://en.wikipedia.org/wiki/ISO_639-1) and the [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
If you need a specific locale region, do this:
```shell
$ ./refresh --locale de-CH --region BE
```
For regions use the corresponding [ISO 3166-2 code for principal subdivisions](https://en.wikipedia.org/wiki/ISO_3166-2).
To specify a set of years to update, do this:
```shell
$ ./refresh --locale en-US --year 2020 2021 2022
```
If the locale is not yet supported by [holidata.net](https://holidata.net), or there is no data available for the requested year, you will see an error.

View File

@ -0,0 +1,34 @@
# Holiday data provided by holidata.net
# Generated 2023-12-25T12:05:27
define holidays:
tr-TR:
2023_01_01 = Yılbaşı
2023_04_21 = Ramazan Bayramı (1. Gün)
2023_04_22 = Ramazan Bayramı (2. Gün)
2023_04_23 = Ulusal Egemenlik ve Çocuk Bayramı
2023_05_01 = Emek ve Dayanışma Günü
2023_05_19 = Atatürk'ü Anma, Gençlik ve Spor Bayramı
2023_06_28 = Kurban Bayramı (1. Gün)
2023_06_29 = Kurban Bayramı (2. Gün)
2023_06_30 = Kurban Bayramı (3. Gün)
2023_07_01 = Kurban Bayramı (4. Gün)
2023_07_15 = Demokrasi ve Milli Birlik Günü
2023_08_30 = Zafer Bayramı
2023_10_29 = Cumhuriyet Bayramı
2024_01_01 = Yılbaşı
2024_04_10 = Ramazan Bayramı (1. Gün)
2024_04_11 = Ramazan Bayramı (2. Gün)
2024_04_12 = Ramazan Bayramı (3. Gün)
2024_04_23 = Ulusal Egemenlik ve Çocuk Bayramı
2024_05_01 = Emek ve Dayanışma Günü
2024_05_19 = Atatürk'ü Anma, Gençlik ve Spor Bayramı
2024_06_16 = Kurban Bayramı (1. Gün)
2024_06_17 = Kurban Bayramı (2. Gün)
2024_06_18 = Kurban Bayramı (3. Gün)
2024_06_19 = Kurban Bayramı (4. Gün)
2024_07_15 = Demokrasi ve Milli Birlik Günü
2024_08_30 = Zafer Bayramı
2024_10_29 = Cumhuriyet Bayramı

View File

@ -0,0 +1,144 @@
#!/usr/bin/env python3
###############################################################################
#
# Copyright 2016, 2018 - 2022, Gothenburg Bit Factory
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# https://www.opensource.org/licenses/mit-license.php
#
###############################################################################
import argparse
import datetime
import json
import os
import re
from textwrap import dedent
from urllib.error import HTTPError
from urllib.request import urlopen
def gather_locale_files(path):
"""Enumerate all holiday files in the current directory."""
locale_file_map = {}
re_holiday_file = re.compile(r"/holidays.([a-z]{2}-[A-Z]{2})$")
for file in enumerate(path):
result = re_holiday_file.search(file)
if result:
# Extract the locale name.
locale_file_map[result.group(1)] = file
return locale_file_map
def enumerate(path):
if not os.path.exists(path):
raise Exception(f"Directory '{path}' does not exist")
found = []
for path, dirs, files in os.walk(path, topdown=True, onerror=None, followlinks=False):
found.extend([os.path.join(path, x) for x in files])
return found
def create_locale_files(path, locales):
locale_file_map = {}
for locale in locales:
locale_file_map[locale] = os.path.join(path, f"holidays.{locale}")
return locale_file_map
def update_locale_files(locales, regions, years):
now = datetime.datetime.now()
if not years:
years = [now.year, now.year + 1]
for locale, file in locales.items():
with open(file, "w") as fh:
fh.write(dedent(f"""\
# Holiday data provided by holidata.net
# Generated {now:%Y-%m-%dT%H:%M:%S}
define holidays:
{locale}:
"""))
for year in years:
try:
holidays = get_holidata(locale, regions, year)
for date, desc in holidays.items():
fh.write(f" {date} = {desc}\n")
fh.write("\n")
except HTTPError as e:
if e.code == 404:
print(f"holidata.net does not have data for {locale}, for {year}.")
else:
print(e.code, e.read())
def get_holidata(locale, regions, year):
url = f"https://holidata.net/{locale}/{year}.json"
print(url)
holidays = dict()
lines = urlopen(url).read().decode("utf-8")
for line in lines.split("\n"):
if line:
j = json.loads(line)
if not j["region"] or not regions or j["region"] in regions:
day = j["date"].replace("-", "_")
desc = j["description"]
holidays[day] = desc
return holidays
def main(args):
locale_files = create_locale_files(args.path, args.locale) if args.locale else gather_locale_files(args.path)
update_locale_files(locale_files, args.region, args.year)
if __name__ == "__main__":
usage = """See https://holidata.net for details of supported locales and regions."""
parser = argparse.ArgumentParser(
description="Update holiday data files. Simply run 'refresh' to update all of them.",
usage="refresh [-h] [path] [--locale LOCALE [LOCALE ...]] [--region REGION [REGION ...]] [--year YEAR [YEAR ...]]"
)
parser.add_argument("--locale", nargs="+", help="specify locale to update")
parser.add_argument("--region", nargs="+", help="specify locale region to update", default=[])
parser.add_argument("--year", nargs="+", help="specify year to fetch (defaults to current and next year)", type=int, default=[])
parser.add_argument("path", nargs="?", help="base path to search for locales (defaults to current directory)", default=".")
try:
main(parser.parse_args())
except Exception as msg:
print("Error:", msg)

View File

@ -0,0 +1 @@
import /home/sahin/.config/timewarrior/holidays/holidays.tr-TR

View File

@ -30,11 +30,21 @@
# st.color7: #ACB0D0 # st.color7: #ACB0D0
# st.color15: #ABB2BF # st.color15: #ABB2BF
darker_accent="#e0af68" # # tokyonight
accent="#528ef5" # darker_accent="#e0af68"
lighter_accent="#3b4261" # accent="#518DF6"
# lighter_accent="#0B55D5"
# bg="default"
# fg_text="#111111"
# kanagawa
darker_accent="#44300D"
accent="#986e1f"
lighter_accent="#664915"
bg="default" bg="default"
fg_text="#111111" fg_text="#E4BC77"
prefix="#{?client_prefix,#[reverse]^Space#[noreverse],}" prefix="#{?client_prefix,#[reverse]^Space#[noreverse],}"
sync="#{?pane_synchronized,#[reverse] SYNC #[noreverse],}" sync="#{?pane_synchronized,#[reverse] SYNC #[noreverse],}"
mode="#{?pane_in_mode,#[reverse] #{pane_mode} #[noreverse],}" mode="#{?pane_in_mode,#[reverse] #{pane_mode} #[noreverse],}"
@ -56,9 +66,9 @@ setw -g window-status-activity-style "none"
setw -g window-status-separator "" setw -g window-status-separator ""
setw -g window-status-style "none,fg=$fg_text,bg=$bg" setw -g window-status-style "none,fg=$fg_text,bg=$bg"
set -g status-left "#[fg=$fg_text,bg=$accent] #S #[fg=$accent,bg=$bg,nobold,nounderscore,noitalics] " set -g status-left "#[fg=$fg_text,bg=$lighter_accent] #S #[fg=$lighter_accent,bg=$bg,nobold,nounderscore,noitalics] "
setw -g window-status-format "#[fg=$lighter_accent,bg=$bg]#[fg=$accent,bg=$lighter_accent] #I#[fg=$accent,bg=$lighter_accent]#W#[bg=$bg,fg=$lighter_accent]" setw -g window-status-format "#[fg=$lighter_accent,bg=$bg]#[fg=$fg_text,bg=$lighter_accent] #I#[fg=$fg_text,bg=$lighter_accent]#W#[bg=$bg,fg=$lighter_accent]"
setw -g window-status-current-format "#[fg=$accent,bg=$bg,nobold,nounderscore,noitalics]#[fg=$fg_text,bg=$accent,bold]#I#[fg=$fg_text,bg=$accent]#W#F#[fg=$accent,bg=$bg,nobold,nounderscore,noitalics]" setw -g window-status-current-format "#[fg=$accent,bg=$bg,nobold,nounderscore,noitalics]#[fg=$fg_text,bg=$accent,bold]#I#[fg=$fg_text,bg=$accent]#W#F#[fg=$accent,bg=$bg,nobold,nounderscore,noitalics]"
# set -g status-right "#[fg=$accent,bg=$bg,nobold,nounderscore,noitalics]#[fg=$fg_text,bg=$accent] $uptime %H:%M %d/%m/%Y#[bg=$accent,fg=$darker_accent,nobold,nounderscore,noitalics]#[bg=$fg_text,fg=$darker_accent,bold]$prefix$sync$mode" # set -g status-right "#[fg=$accent,bg=$bg,nobold,nounderscore,noitalics]#[fg=$fg_text,bg=$accent] $uptime %H:%M %d/%m/%Y#[bg=$accent,fg=$darker_accent,nobold,nounderscore,noitalics]#[bg=$fg_text,fg=$darker_accent,bold]$prefix$sync$mode"

View File

@ -11,7 +11,7 @@
# st.color5: #9854f1 # st.color5: #9854f1
# st.color6: #007197 # st.color6: #007197
# st.color7: #6172b0 # st.color7: #6172b0
# st.color8: #a1a6c5 # st.color8: #a1a6c5j
# st.color9: #f52a65 # st.color9: #f52a65
# st.color10: #587539 # st.color10: #587539
# st.color11: #8c6c3e # st.color11: #8c6c3e
@ -28,12 +28,20 @@
# prefix_color="colour11" # prefix_color="colour11"
# TokyoNight colors for Tmux # TokyoNight colors for Tmux
darker_accent="#6172b0" # darker_accent="#6172b0"
accent="#2e7de9" # accent="#2e7de9"
bg1="#d1d4e3" # bg1="#d1d4e3"
# bg2="default"
# grayish="#a8aecb"
# prefix_color="#8c6c3e"
# kanagawa colors
darker_accent="#727169"
accent="#727169"
bg1="#DCD7BA"
bg2="default" bg2="default"
grayish="#a8aecb" grayish="#C8C093"
prefix_color="#8c6c3e" prefix_color="#77713f"
prefix="#{?client_prefix,#[reverse]^Space#[noreverse],}" prefix="#{?client_prefix,#[reverse]^Space#[noreverse],}"
sync="#{?pane_synchronized,#[reverse] SYNC #[noreverse],}" sync="#{?pane_synchronized,#[reverse] SYNC #[noreverse],}"

View File

@ -1,12 +1,20 @@
# remap prefix to Control + Space # remap prefix to Control + Space
set -g prefix C-Space set -g prefix C-s
bind C-Space last-window bind C-s send-prefix
bind-key C-] send-keys "C-]"
# set -g prefix Escape # set -g prefix Escape
# bind Escape send-keys Escape # bind Escape send-keys Escape
# bind "'" last-window bind "'" last-window
unbind C-b unbind C-b
set-option -g allow-passthrough on set -sg escape-time 0 # see https://github.com/neovim/neovim/issues/2035
### required for showing images in terminal
set-option -gq allow-passthrough on
# for hiding images when window is switched
set -g visual-activity off
###
# Smart pane switching with awareness of Vim splits. # Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator # See: https://github.com/christoomey/vim-tmux-navigator
@ -33,7 +41,7 @@ bind-key -n 'C-M-c' copy-mode
bind-key -T copy-mode-vi 'C-h' select-pane -L bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi kC-l' select-pane -R bind-key -T copy-mode-vi 'C-l' select-pane -R
# vim like copy mode # vim like copy mode
bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi v send-keys -X begin-selection
@ -86,7 +94,7 @@ bind-key -n C-Down swap-pane -s '{down-of}'
bind-key -n C-Left swap-pane -s '{left-of}' bind-key -n C-Left swap-pane -s '{left-of}'
bind-key -n C-Right swap-pane -s '{right-of}' bind-key -n C-Right swap-pane -s '{right-of}'
# set -g default-terminal "xterm-256color" set -g default-terminal "xterm-256color"
# tell Tmux that outside terminal supports true color # tell Tmux that outside terminal supports true color
# set -ga terminal-overrides ",xterm-256color*:Tc" # set -ga terminal-overrides ",xterm-256color*:Tc"
@ -122,7 +130,10 @@ bind-key C-j join-pane
# status bar theme # status bar theme
# set -g status 'on' # set -g status 'on'
set-option -g status-position bottom set-option -g status-position bottom
source-file ~/.config/tmux/dark.conf
if-shell '[ `darkman get` == "light" ]' \
'source-file ~/.config/tmux/light.conf' \
'source-file ~/.config/tmux/dark.conf'

1
.config/zsh Submodule

Submodule .config/zsh added at 09c94608f1

17
.gitconfig Normal file
View File

@ -0,0 +1,17 @@
[user]
email = sahin@sahinakkaya.dev
name = Şahin Akkaya
signingkey = sahin@sahinakkaya.dev
[init]
defaultBranch = main
[diff]
tool = kitty
guitool = kitty.gui
[difftool]
prompt = false
trustExitCode = true
[difftool "kitty"]
cmd = kitten diff $LOCAL $REMOTE
[difftool "kitty.gui"]
cmd = kitten diff $LOCAL $REMOTE

17
.gitmodules vendored
View File

@ -1,3 +1,16 @@
[submodule "/home/sahin/.config/tmux/plugins/tpm"] [submodule ".config/tmux/plugins/tpm"]
path = /home/sahin/.config/tmux/plugins/tpm path = .config/tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm.git url = https://github.com/tmux-plugins/tpm.git
branch = master
[submodule ".config/alacritty/themes"]
path = .config/alacritty/themes
url = https://github.com/alacritty/alacritty-theme.git
branch = master
[submodule ".config/nvim"]
path = .config/nvim
url = https://github.com/sahinakkaya/nvim-config.git
branch = linux
[submodule ".config/zsh"]
path = .config/zsh
url = https://github.com/sahinakkaya/zsh-config.git
branch = linux

35
.local/bin/passmenu Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
if [[ -n $WAYLAND_DISPLAY ]]; then
dmenu=wofi
xdotool="ydotool type --file -"
elif [[ -n $DISPLAY ]]; then
dmenu=dmenu
xdotool="xdotool type --clearmodifiers --file -"
else
echo "Error: No Wayland or X11 display detected" >&2
exit 1
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | "$dmenu" --show dmenu --normal-window "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
fi

3
.zshenv Executable file
View File

@ -0,0 +1,3 @@
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}"
export PATH="$HOME/scripts/:$HOME/.local/bin/:$PATH"

20
scripts/check-battery.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# Set limit to shell argument
batteryLimit=$1
fullAt=92
# Get the current battery level with acpi
batteryLevel=$(acpi | cut -d ' ' -f 4 | tr -d '%|,| ')
charging=$(acpi | cut -d ' ' -f 3 | tr -d ',| ')
echo $batteryLevel
if [[ "$batteryLevel" -le "$batteryLimit" ]] && [[ "$charging" == "Discharging" ]]; then
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt -t 10000
/usr/bin/mpv /usr/share/sounds/Oxygen-Sys-Warning.ogg
# /usr/bin/aplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
#elif [[ "$batteryLevel" -gt "$fullAt" ]] && [[ ! "$charging" == "Discharging" ]]; then
# /usr/bin/notify-send -a "Battery Warning" "Battery is full: ${batteryLevel}" -i abrt -t 10000
# /usr/bin/paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
fi

41
scripts/dim-screen Executable file
View File

@ -0,0 +1,41 @@
#!/usr/bin/python3
# Gradually decrease brightness level. Thanks ChatGPT
import subprocess
import time
def set_brightness(brightness):
subprocess.call(['light', '-S', str(brightness)])
def smooth_dimming(initial_brightness, final_brightness, duration, steps):
brightness_step = (initial_brightness - final_brightness) / steps
sleep_time = duration / steps
for i in range(steps + 1):
current_brightness = round(initial_brightness - i * brightness_step,2)
set_brightness(current_brightness)
print(current_brightness)
time.sleep(sleep_time)
set_brightness(final_brightness)
# Save brighness value for later
subprocess.call(['light', '-O'])
initial_brightness = float(subprocess.getoutput('light'))
if initial_brightness < 20:
final_brightness = max(0, initial_brightness - 10)
elif initial_brightness < 40:
final_brightness = max(10, initial_brightness - 20)
elif initial_brightness < 60:
final_brightness = max(30, initial_brightness - 30)
elif initial_brightness < 80:
final_brightness = max(40, initial_brightness - 40)
elif initial_brightness < 100:
final_brightness = max(50, initial_brightness - 50)
dimming_duration = 0.3 if initial_brightness < 20 else .5
num_steps = 20 if initial_brightness < 20 else 50
smooth_dimming(initial_brightness, final_brightness, dimming_duration, num_steps)

3
scripts/lock-screen Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
swaylock -f

22
scripts/smart-exec Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Get the currently focused workspace
current_workspace=$(hyprctl monitors -j | jq '.[] | .activeWorkspace.id' )
# Define preferred apps based on workspace
case $current_workspace in
1) app="kitty --single-instance";;
2) app="default";;
3) app="thunderbird";;
4) app="firefox";;
5) app="default";;
esac
if [[ "$app" == "default" ]]; then
hyprctl dispatch exec "wofi --show drun --normal-window"
else
notify-send -t 500 "opening $app"
hyprctl dispatch exec "$app"
fi

21
scripts/smart-switch Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
monitors=$(hyprctl monitors -j | jq '.[] | .name')
edp=$(echo "$monitors" | grep eDP)
hdmi=$(echo "$monitors" | grep HDMI)
if [[ "$1" == "close" ]]; then # lid is closing
if [[ -n "$hdmi" ]]; then # -n means if string is not empty
hyprctl keyword monitor "eDP-1, disable"
else
hyprctl dispatch exec lock-screen
fi
else
if [[ -z "$edp" ]]; then # -z means if string is empty
hyprctl keyword monitor eDP-1,preferred,0x1107,2.0
killall ags
ags
fi
fi

16
scripts/smart-tab Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
focusedClient=$(hyprctl clients -j | jq '[.[] | select(.focusHistoryID|contains(0))][0]')
if [[ -n "$focusedClient" ]]; then
clientClass=$(echo "$focusedClient" | jq '.class' )
case "$clientClass" in
kitty) hyprctl pass "" # cannot pass arbitrary keys to applications atm. abort mission
;;
d|D) exit 0
;;
*) exit 1
esac
fi

24
scripts/tasks Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
#
tasks_window=$(tmux list-windows | grep tasks | cut -d: -f1)
if [[ -z "$tasks_window" ]]; then
tmux create-window
tmux split-window -h
tmux split-window
tmux resize-pane -U 14
tmux resize-pane -R 5
tmux send-keys -t0 "btop" Enter
tmux send-keys -t1 "while true;do task next limit:5;sleep 2;done" Enter
tmux send-keys -t2 "while true;do task burndown.daily;sleep 3;done" Enter
tmux rename-window "tasks"
else
tmux select-window -t $tasks_window
fi

9
scripts/toggle-monitor Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
monitor=$(hyprctl -j monitors | jq '.[] | select(.name == "eDP-1") | .id')
if [[ $monitor == "" ]]; then
hyprctl keyword monitor eDP-1,preferred,0x1107,2.0
else
hyprctl keyword monitor eDP-1,disable
fi

7
scripts/undim-screen Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
if pid=$(pgrep -x "dim-screen"); then
kill $pid
fi
light -I

59
scripts/volume Executable file
View File

@ -0,0 +1,59 @@
#!/bin/bash
VOLUME_STEP=2
# Function to check if the audio is currently muted
is_muted() {
amixer sget Master | grep -q "\[off\]"
}
# Function to toggle mute status
toggle_mute() {
amixer sset Master toggle
}
# Function to increase volume
increase_volume() {
amixer sset Master "${VOLUME_STEP}%+"
}
# Function to decrease volume
decrease_volume() {
amixer sset Master "${VOLUME_STEP}%-"
}
# Main function
main() {
case "$1" in
"up")
if is_muted; then
toggle_mute
fi
increase_volume
;;
"down")
if is_muted; then
toggle_mute
fi
decrease_volume
;;
"toggle-mute")
toggle_mute
;;
*)
echo "Usage: $0 {up|down|toggle-mute}"
exit 1
;;
esac
# Display the current volume
amixer get Master | grep -oE "[0-9]+%"
}
# Check if an argument is provided
if [ $# -eq 1 ]; then
main "$1"
else
echo "Usage: $0 {up|down|toggle-mute}"
exit 1
fi