Full Code of MathisP75/hyppuccin for AI

main 45c6ae813ac4 cached
90 files
411.3 KB
114.4k tokens
168 symbols
1 requests
Download .txt
Showing preview only (438K chars total). Download the full file or copy to clipboard to get everything.
Repository: MathisP75/hyppuccin
Branch: main
Commit: 45c6ae813ac4
Files: 90
Total size: 411.3 KB

Directory structure:
gitextract_tylkocls/

├── README.md
├── copy-configs.sh
├── dunst/
│   ├── dunstrc
│   └── mocha.conf
├── eww/
│   ├── README.md
│   ├── css/
│   │   ├── _colors.scss
│   │   ├── _colorscheme.scss
│   │   └── _overview.scss
│   ├── eww.scss
│   ├── eww.yuck
│   ├── modules/
│   │   └── variables.yuck
│   ├── scripts/
│   │   ├── activewin
│   │   ├── activews
│   │   ├── focuswindow
│   │   ├── get-icon.py
│   │   ├── overview1
│   │   ├── overview2
│   │   ├── selectwindow
│   │   ├── winlist
│   │   ├── winnumbers
│   │   └── workspaces
│   ├── tmp/
│   │   ├── _colorscheme.colorpallete
│   │   ├── _iconcolor.txt
│   │   └── colors_generated.conf
│   └── windows/
│       └── overview.yuck
├── hypr/
│   ├── desktop-portals.sh
│   ├── hyprland.conf
│   ├── hyprpaper-desktop.conf
│   ├── hyprpaper-laptop.conf
│   ├── mocha.conf
│   ├── per-monitor-launcher.sh
│   ├── portals-log
│   ├── scripts/
│   │   ├── focused-window
│   │   ├── get-last-focused-window.sh
│   │   └── last-focused-window
│   └── toggle-gaps.sh
├── kitty/
│   └── kitty.conf
├── nvim/
│   ├── init.vim
│   └── keymappings.lua
├── ranger/
│   ├── commands.py
│   ├── commands_full.py
│   ├── rc.conf
│   ├── rifle.conf
│   └── scope.sh
├── rofi/
│   ├── colors.rasi
│   ├── config.rasi
│   └── style.rasi
├── wallpapers/
│   └── catppuccin-custom.xcf
├── waybar/
│   ├── colors/
│   │   └── mocha.css
│   ├── desktop-bar/
│   │   ├── config
│   │   └── style.css
│   ├── laptop-bar/
│   │   ├── config
│   │   └── style.css
│   └── scripts/
│       ├── dunst.sh
│       ├── mediaplayer.py
│       ├── power-menu/
│       │   ├── powermenu.sh
│       │   ├── shared/
│       │   │   ├── colors/
│       │   │   │   ├── adapta.rasi
│       │   │   │   ├── arc.rasi
│       │   │   │   ├── black.rasi
│       │   │   │   ├── catppuccin.rasi
│       │   │   │   ├── cyberpunk.rasi
│       │   │   │   ├── dracula.rasi
│       │   │   │   ├── everforest.rasi
│       │   │   │   ├── gruvbox.rasi
│       │   │   │   ├── lovelace.rasi
│       │   │   │   ├── navy.rasi
│       │   │   │   ├── nord.rasi
│       │   │   │   ├── onedark.rasi
│       │   │   │   ├── paper.rasi
│       │   │   │   ├── solarized.rasi
│       │   │   │   ├── tokyonight.rasi
│       │   │   │   └── yousai.rasi
│       │   │   ├── colors.rasi
│       │   │   └── fonts.rasi
│       │   ├── style-1.rasi
│       │   ├── style-2.rasi
│       │   ├── style-3.rasi
│       │   ├── style-4.rasi
│       │   └── style-5.rasi
│       ├── rofi-wifi-menu.sh
│       ├── spotify.sh
│       └── weather.py
├── wofi/
│   ├── colors/
│   │   └── mocha.css
│   ├── config
│   ├── powermenu.sh
│   ├── style.css
│   └── wifimenu.sh
├── wrappedhl
└── zsh/
    ├── .p10k.zsh
    └── .zshrc

================================================
FILE CONTENTS
================================================

================================================
FILE: README.md
================================================
# hyppuccin
Catppuccin theme for Hyprland

* Compositor: Hyprland
* Terminal: Kitty
* Shell: zsh
* Color scheme (and all themes): Cattpuccin
* GUI file manager: Thunar
* TUI file manager: Ranger
* Bar: Waybar
* App launcher: Wofi
* Text editor: nvim
* Note taker: Joplin
* Cursor theme: Bibata modern classic
* PDF viewer: Zathura

![alt text](./screenshots/screenshot1.png)
![alt text](./screenshots/screenshot2.png)
![alt text](./screenshots/screenshot3.png)
![alt text](./screenshots/screenshot4.png)
![alt text](./screenshots/screenshot5.png)



================================================
FILE: copy-configs.sh
================================================
#!/bin/sh

cp -r -l $HOME/.config/hypr/ ./
cp -r -l $HOME/.config/waybar/ ./
cp -r -l $HOME/.config/wofi/ ./
cp -r -l $HOME/.config/nvim/ ./
cp -r -l $HOME/.config/dunst/ ./
cp -r -l $HOME/.config/kitty/ ./
cp -r -l $HOME/.config/rofi/ ./
cp -r -l $HOME/.config/eww/ ./
cp -r -l $HOME/.zshrc ./zsh
cp -r -l $HOME/.p10k.zsh ./zsh


================================================
FILE: dunst/dunstrc
================================================
# See dunst(5) for all configuration options

[global]
    ### Display ###

    # Which monitor should the notifications be displayed on.
    monitor = 0

    # Display notification on focused monitor.  Possible modes are:
    #   mouse: follow mouse pointer
    #   keyboard: follow window with keyboard focus
    #   none: don't follow anything
    #
    # "keyboard" needs a window manager that exports the
    # _NET_ACTIVE_WINDOW property.
    # This should be the case for almost all modern window managers.
    #
    # If this option is set to mouse or keyboard, the monitor option
    # will be ignored.
    follow = none

    ### Geometry ###

    # dynamic width from 0 to 300
    # width = (0, 300)
    # constant width of 300
    width = 500

    # The maximum height of a single notification, excluding the frame.
    height = 300

    # Position the notification in the top right corner
    origin = top-right

    # Offset from the origin
    offset = 25x25

    # Scale factor. It is auto-detected if value is 0.
    scale = 0

    # Maximum number of notification (0 means no limit)
    notification_limit = 0

    ### Progress bar ###

    # Turn on the progess bar. It appears when a progress hint is passed with
    # for example dunstify -h int:value:12
    progress_bar = true

    # Set the progress bar height. This includes the frame, so make sure
    # it's at least twice as big as the frame width.
    progress_bar_height = 10

    # Set the frame width of the progress bar
    progress_bar_frame_width = 1

    # Set the minimum width for the progress bar
    progress_bar_min_width = 150

    # Set the maximum width for the progress bar
    progress_bar_max_width = 300


    # Show how many messages are currently hidden (because of
    # notification_limit).
    indicate_hidden = yes

    # The transparency of the window.  Range: [0; 100].
    # This option will only work if a compositing window manager is
    # present (e.g. xcompmgr, compiz, etc.). (X11 only)
    transparency = 100

    # Draw a line of "separator_height" pixel height between two
    # notifications.
    # Set to 0 to disable.
    # If gap_size is greater than 0, this setting will be ignored.
    separator_height = 2

    # Padding between text and separator.
    padding = 8

    # Horizontal padding.
    horizontal_padding = 8

    # Padding between text and icon.
    text_icon_padding = 0

    # Defines width in pixels of frame around the notification window.
    # Set to 0 to disable.
    frame_width = 3

    # Defines color of the frame around the notification window.
    frame_color = "#FFFFFF"

    # Size of gap to display between notifications - requires a compositor.
    # If value is greater than 0, separator_height will be ignored and a border
    # of size frame_width will be drawn around each notification instead.
    # Click events on gaps do not currently propagate to applications below.
    gap_size = 15

    # Define a color for the separator.
    # possible values are:
    #  * auto: dunst tries to find a color fitting to the background;
    #  * foreground: use the same color as the foreground;
    #  * frame: use the same color as the frame;
    #  * anything else will be interpreted as a X color.
    separator_color = frame

    # Sort messages by urgency.
    sort = yes

    # Don't remove messages, if the user is idle (no mouse or keyboard input)
    # for longer than idle_threshold seconds.
    # Set to 0 to disable.
    # A client can set the 'transient' hint to bypass this. See the rules
    # section for how to disable this if necessary
    # idle_threshold = 120

    ### Text ###

    font = SFPro 12

    # The spacing between lines.  If the height is smaller than the
    # font height, it will get raised to the font height.
    line_height = 0

    # Possible values are:
    # full: Allow a small subset of html markup in notifications:
    #        <b>bold</b>
    #        <i>italic</i>
    #        <s>strikethrough</s>
    #        <u>underline</u>
    #
    #        For a complete reference see
    #        <https://docs.gtk.org/Pango/pango_markup.html>.
    #
    # strip: This setting is provided for compatibility with some broken
    #        clients that send markup even though it's not enabled on the
    #        server. Dunst will try to strip the markup but the parsing is
    #        simplistic so using this option outside of matching rules for
    #        specific applications *IS GREATLY DISCOURAGED*.
    #
    # no:    Disable markup parsing, incoming notifications will be treated as
    #        plain text. Dunst will not advertise that it has the body-markup
    #        capability if this is set as a global setting.
    #
    # It's important to note that markup inside the format option will be parsed
    # regardless of what this is set to.
    markup = full

    # The format of the message.  Possible variables are:
    #   %a  appname
    #   %s  summary
    #   %b  body
    #   %i  iconname (including its path)
    #   %I  iconname (without its path)
    #   %p  progress value if set ([  0%] to [100%]) or nothing
    #   %n  progress value if set without any extra characters
    #   %%  Literal %
    # Markup is allowed
    format = "<b>%s</b>\n%b"

    # Alignment of message text.
    # Possible values are "left", "center" and "right".
    alignment = left

    # Vertical alignment of message text and icon.
    # Possible values are "top", "center" and "bottom".
    vertical_alignment = center

    # Show age of message if message is older than show_age_threshold
    # seconds.
    # Set to -1 to disable.
    show_age_threshold = 60

    # Specify where to make an ellipsis in long lines.
    # Possible values are "start", "middle" and "end".
    ellipsize = middle

    # Ignore newlines '\n' in notifications.
    ignore_newline = no

    # Stack together notifications with the same content
    stack_duplicates = true

    # Hide the count of stacked notifications with the same content
    hide_duplicate_count = false

    # Display indicators for URLs (U) and actions (A).
    show_indicators = yes

    ### Icons ###

    # Recursive icon lookup. You can set a single theme, instead of having to
    # define all lookup paths.
    enable_recursive_icon_lookup = true

    # Set icon theme (only used for recursive icon lookup)
    icon_theme = Adwaita
    # You can also set multiple icon themes, with the leftmost one being used first.
    # icon_theme = "Adwaita, breeze"

    # Align icons left/right/top/off
    icon_position = off

    # Scale small icons up to this size, set to 0 to disable. Helpful
    # for e.g. small files or high-dpi screens. In case of conflict,
    # max_icon_size takes precedence over this.
    min_icon_size = 32

    # Scale larger icons down to this size, set to 0 to disable
    max_icon_size = 128

    # Paths to default icons (only neccesary when not using recursive icon lookup)
    icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/

    ### History ###

    # Should a notification popped up from history be sticky or timeout
    # as if it would normally do.
    sticky_history = yes

    # Maximum amount of notifications kept in history
    history_length = 20

    ### Misc/Advanced ###

    # dmenu path.
    dmenu = /usr/bin/dmenu -p dunst:

    # Browser for opening urls in context menu.
    browser = /usr/bin/xdg-open

    # Always run rule-defined scripts, even if the notification is suppressed
    always_run_script = true

    # Define the title of the windows spawned by dunst
    title = Dunst

    # Define the class of the windows spawned by dunst
    class = Dunst

    # Define the corner radius of the notification window
    # in pixel size. If the radius is 0, you have no rounded
    # corners.
    # The radius will be automatically lowered if it exceeds half of the
    # notification height to avoid clipping text and/or icons.
    corner_radius = 15

    # Ignore the dbus closeNotification message.
    # Useful to enforce the timeout set by dunst configuration. Without this
    # parameter, an application may close the notification sent before the
    # user defined timeout.
    ignore_dbusclose = false

    ### Wayland ###
    # These settings are Wayland-specific. They have no effect when using X11

    # Uncomment this if you want to let notications appear under fullscreen
    # applications (default: overlay)
    # layer = top

    # Set this to true to use X11 output on Wayland.
    force_xwayland = false

    ### Legacy

    # Use the Xinerama extension instead of RandR for multi-monitor support.
    # This setting is provided for compatibility with older nVidia drivers that
    # do not support RandR and using it on systems that support RandR is highly
    # discouraged.
    #
    # By enabling this setting dunst will not be able to detect when a monitor
    # is connected or disconnected which might break follow mode if the screen
    # layout changes.
    force_xinerama = false

    ### mouse

    # Defines list of actions for each mouse event
    # Possible values are:
    # * none: Don't do anything.
    # * do_action: Invoke the action determined by the action_name rule. If there is no
    #              such action, open the context menu.
    # * open_url: If the notification has exactly one url, open it. If there are multiple
    #             ones, open the context menu.
    # * close_current: Close current notification.
    # * close_all: Close all notifications.
    # * context: Open context menu for the notification.
    # * context_all: Open context menu for all notifications.
    # These values can be strung together for each mouse event, and
    # will be executed in sequence.
    mouse_left_click = close_current
    mouse_middle_click = do_action, close_current
    mouse_right_click = close_all

# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
    # Calculate the dpi to use on a per-monitor basis.
    # If this setting is enabled the Xft.dpi value will be ignored and instead
    # dunst will attempt to calculate an appropriate dpi value for each monitor
    # using the resolution and physical size. This might be useful in setups
    # where there are multiple screens with very different dpi values.
    per_monitor_dpi = true


[global]
frame_color = "#89B4FA"
separator_color= frame

[urgency_low]
background = "#1E1E2E"
foreground = "#CDD6F4"

[urgency_normal]
background = "#1E1E2E"
foreground = "#CDD6F4"

[urgency_critical]
background = "#1E1E2E"
foreground = "#CDD6F4"
frame_color = "#FAB387"

# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
#    appname (discouraged, see desktop_entry)
#    body
#    category
#    desktop_entry
#    icon
#    match_transient
#    msg_urgency
#    stack_tag
#    summary
#
# and you can override the
#    background
#    foreground
#    format
#    frame_color
#    fullscreen
#    new_icon
#    set_stack_tag
#    set_transient
#    set_category
#    timeout
#    urgency
#    icon_position
#    skip_display
#    history_ignore
#    action_name
#    word_wrap
#    ellipsize
#    alignment
#    hide_text
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
#   script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.

# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
#    match_transient = yes
#    set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
#    match_transient = yes
#    history_ignore = yes

# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
#        If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
#           withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
#    fullscreen = delay
#[fullscreen_show_critical]
#    msg_urgency = critical
#    fullscreen = show

#[espeak]
#    summary = "*"
#    script = dunst_espeak.sh

#[script-test]
#    summary = "*script*"
#    script = dunst_test.sh

#[ignore]
#    # This notification will not be displayed
#    summary = "foobar"
#    skip_display = true

#[history-ignore]
#    # This notification will not be saved in history
#    summary = "foobar"
#    history_ignore = yes

#[skip-display]
#    # This notification will not be displayed, but will be included in the history
#    summary = "foobar"
#    skip_display = yes

#[signed_on]
#    appname = Pidgin
#    summary = "*signed on*"
#    urgency = low
#
#[signed_off]
#    appname = Pidgin
#    summary = *signed off*
#    urgency = low
#
#[says]
#    appname = Pidgin
#    summary = *says*
#    urgency = critical
#
#[twitter]
#    appname = Pidgin
#    summary = *twitter.com*
#    urgency = normal
#
#[stack-volumes]
#    appname = "some_volume_notifiers"
#    set_stack_tag = "volume"
#
# vim: ft=cfg


================================================
FILE: dunst/mocha.conf
================================================
[global]
frame_color = "#89B4FA"
separator_color= frame

[urgency_low]
background = "#1E1E2E"
foreground = "#CDD6F4"

[urgency_normal]
background = "#1E1E2E"
foreground = "#CDD6F4"

[urgency_critical]
background = "#1E1E2E"
foreground = "#CDD6F4"
frame_color = "#FAB387"


================================================
FILE: eww/README.md
================================================
# Eww configuration

This configuration aims to provide a fully working shell replacement for
compositors/window managers. Features constantly get added and existing ones
get improved.

## ❔ Usage

To quickly install this config, grab all the files in this directory and put
them in `~/.config/eww`. Then run `eww daemon` and `eww open bar`. Enjoy!

Dependencies:
- Icon fonts: `material-design-icons`, `material-icons`
- Text font: Torus (get it from the osu! website with DevTools)

## 🎨 Theme
- tokyonight


================================================
FILE: eww/css/_colors.scss
================================================


$blue: #89b4fa;
$lavender: #b4befe;
$sapphire: #74c7ec;
$sky: #89dceb;
$teal: #94e2d5;
$green: #a6e3a1;
$yellow: #f9e2af;
$peach: #fab387;
$maroon: #eba0ac;
$red: #f38ba8;
$mauve: #cba6f7;
$pink: #f5c2e7;
$flamingo: #f2cdcd;
$rosewater: #f5e0dc;

$true: #EF738A;
$false: #A9B1D6;


$forestgreen: #A8B468;
$forestyellow : #8e8370;
$foresttext : #d3c6ab;
$forestblack : #1e201f;
$forestred : #e76c69;
$forestpink : #d698b5;
$forestorange : #e59576;
$forestgray : #75817b;
$forestgraylight: #495156;
$forestgreendark: #7fba90;
$forestblue: #77AEA7;

$tokyobluedark: #1A1B26;
$tokyobluelessdark: #1f212e;
$tokyotext: #a9b1d6;
$tokyopink: #ff79b1; //nah theres no pink in tokyonight, but i need one so added
$tokyored: #EF738A;
$tokyoorange: #FF9E64;
$tokyoyellow: #E0AF68;
$tokyogreen: #9ECE6A;
$tokyoturquoise: #73daca;
$tokyoice: #b4f9f8;
$tokyocyan: #0DB9D7;
$tokyoblue: #7AA2F7;
$tokyopurple: #9778D0;
$tokyogrey: #444B6A;
$catbg: #1E1E2E;

$text: #cdd6f4;
$subtext0: #a6adc8;
$subtext1: #bac2de;

$overlay0: #6c7086;
$overlay1: #7f849c;
$overlay2: #9399b2;

$surface0: #313244;
$surface1: #45475a;
$surface2: #585b70;


$base: #1e1e2e;
$mantle: #181825;
$crust: #11111b;

$fg: $tokyotext;
$bg: #171726;
$barbg: #131426;
$shadow: $crust;

// $battcolor: $tokyogreen;
// $memcolor: $tokyoorange;
// $cpucolor: $tokyoblue;

================================================
FILE: eww/css/_colorscheme.scss
================================================
//Auto generated color theme for image at: https://i.ytimg.com/vi/xKbIQaKEE8s/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLC_6DS9-dITi7axcFf2eedEZ_68EQ
@function bluetint($color, $percentage) { @return mix(#CDDFED, $color, $percentage); }
@function blueshade($color, $percentage) { @return mix(#152E50, $color, $percentage); }
$colorbg: #0f1a1b;
$colortext: #c8e7e8;
$color0: #96A46E;
$color1: #3B6E8F;
$color2: #629C9D;
$color3: #5EB3CB;
$color4: #9BAC9A;
$color5: #B9CCAB;
$color6: #c8e7e8;
$color7: #5EB3CB;


================================================
FILE: eww/css/_overview.scss
================================================
.overview-window {
  @include window;
  font-family: 'SFPro', 'Material Symbols Rounded';
  border-radius: 20px;
  background-color: $crust;
  // background-color: transparent;
  // border: 3px solid $color0;
  padding: 5px;
}

.overview-window-top {
  @include rounding;
  background-color: transparent;
  border: 3px solid transparent;
  padding: 5px;
}

.overview-ws {
  border-radius: 11px;
  background-color: $mantle;
  margin: 5px;
}

.overview-ws-window {
  border: 2px solid $peach;
  border-radius: 11px;
  margin: 3px; 
  padding-left: 5px;
  padding-right: 5px;
}

.overview-icon {
  margin-top: 5px;
  margin-bottom: 5px;
  padding-left: 17px;
  padding-right: 17px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.overview-ws-text {
  padding-left: 5px;
  font-size: 13pt;
}
.overview-ws-subtext {
  padding-left: 5px;
  font-size: 9pt;
}

.overview-ws-number { //Note: height 100px width 356px
  font-size: 25pt;
  border-radius: 11px;
  background-color: $overlay0;
  color: $colortext;
  margin: 10px;
  min-height: 40px;
  min-width: 40px;
}

.overview-title {
  font-weight: bold;
  font-size: 15pt;
  padding-top: .6rem;
  padding-bottom: .6rem;
}

================================================
FILE: eww/eww.scss
================================================
@import 'css/colors';
@import 'css/colorscheme';

$colorbar: #c8e7e8;
$battcolor: $colorbar;
$memcolor: $color1;
$cpucolor: $color3;
$border: $color7;
$surface0: tint($colorbg, 10%);
$bg1: $surface0;

@mixin rounding {
  border-radius: 8px;
}

@mixin filter {
  saturate {
    filter: saturate(3);
  }

  grayscale {
    filter: grayscale(100%);
  }

  contrast {
    filter: contrast(160%);
  }

  brightness {
    filter: brightness(0.25);
  }

  blur {
    filter: blur(3px);
  }

  invert {
    filter: invert(100%);
  }

  .sepia {
    filter: sepia(100%);
  }

  huerotate {
    filter: hue-rotate(180deg);
  }

  rss.opacity {
    filter: opacity(50%);
  }
}

@mixin window {
  border: 3px solid $sky;
  // box-shadow: 0 2px 3px $shadow;
  margin: 5px 5px 10px;
  @include rounding;
}

* {
  all: unset;
  transition: 200ms cubic-bezier(0.05, 0.9, 0.1, 1);
  background-repeat: no-repeat;
}

@import 'css/overview';

================================================
FILE: eww/eww.yuck
================================================
(include "./modules/variables.yuck")
(include "./windows/overview.yuck")

================================================
FILE: eww/modules/variables.yuck
================================================
(defvar selected '')
(deflisten wsjsona `scripts/overview1`)
(deflisten wsjsonb `scripts/overview2`)

================================================
FILE: eww/scripts/activewin
================================================
#!/usr/bin/bash

getactivewin(){
  winname=$(hyprctl activewindow | grep -e 'title: ' | sed 's/title: //' | sed 's/\t//')
  echo "$winname"
}

getactivewin

if [ "$1" == "--once" ]; then
  exit 0
else
  socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "window>>" | while read -r line; do
    getactivewin
  done
fi



================================================
FILE: eww/scripts/activews
================================================
#!/usr/bin/bash

focusedws=$(hyprctl activewindow -j | gojq '.workspace.id')

if [ "$1" == "--once" ]; then
  exit 0
else
  socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "workspace>>" | while read -r line; do
    case ${line%>>*} in
      "workspace")
        focusedws=${line#*>>}
        echo $focusedws
        ;;
    esac  
  done
fi



================================================
FILE: eww/scripts/focuswindow
================================================
#!/usr/bin/bash
if [[ $1 == '_none' ]]; then
  hyprctl dispatch workspace $2
else 
  hyprctl dispatch focuswindow address:$1
fi

================================================
FILE: eww/scripts/get-icon.py
================================================
#!/usr/bin/env python3
import gi
import sys
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

# Predefine class corrections
if sys.argv[1] == 'Code':
    sys.argv[1] = 'code'
elif sys.argv[1] == 'code-url-handler':
    sys.argv[1] = 'code'
elif sys.argv[1] == 'Microsoft-edge':
    sys.argv[1] = 'microsoft-edge'
elif sys.argv[1] == 'GitHub Desktop':
    sys.argv[1] = 'github-desktop'
elif sys.argv[1] == 'org.kde.kolourpaint':
    sys.argv[1] = 'kolourpaint'
elif sys.argv[1] == 'osu!':
    sys.argv[1] = 'osu'
elif sys.argv[1] == 'Electron':
    sys.argv[1] = 'discord'
elif sys.argv[1] == 'WebCord':
    sys.argv[1] = 'discord'

icon_name = sys.argv[1]
icon_theme = Gtk.IconTheme.get_default()
icon = icon_theme.lookup_icon(icon_name, 48, 0)
if icon:
    print(icon.get_filename())
else:
    print("not found")


================================================
FILE: eww/scripts/overview1
================================================
#!/usr/bin/bash
dummy='{"address":"_none","at":[0,0],"class":"workspace","size":[0,0],"title":"<___overview_workspace>","workspace":{"id":<___overview_workspace>, "name": "<___overview_workspace>"}}'

getwins() {
  hyprctlclients=$(hyprctl clients -j \
    | grep -v '"xwayland": ' \
    | grep -v '"grouped": ' \
    | grep -v '"pid": ' \
    | grep -v '"fullscreenMode": ' \
    | grep -v '"monitor": ' \
    | grep -v '"floating": ' \
    | grep -v '"fullscreen": ' \
    | grep -v '"pinned":') # | grep -v ""name":")
  # echo '-=-=-=- final output -=-=-=-'
  # echo "$toprint"
  # echo $(echo "$hyprctlclients")  # Print on one line only

  workspace=('[' '[' '[' '[' '[' '[' '[' '[' '[' '[')
  workspacecnt=(0 0 0 0 0 0 0 0 0 0)

  wsid=0

  # echo $hyprctlclients | gojq -c '.[]'

  IFS=$'\n'
  clientsarr=( $(echo $hyprctlclients | gojq -c '.[]') )
  for client in "${clientsarr[@]}"; do
    wsid=$(echo $client | gojq -c '.workspace.id')
    ((wsid-=1))
    if [[ "${workspacecnt[wsid]}" != "0" ]]; then 
      workspace[wsid]+=","
    fi

    clientclass=$(echo $client | gojq '.class' | sed 's/"//g')
    iconpath=''

    if [ -f "scripts/cache/$clientclass" ]; then
        iconpath=$(cat scripts/cache/$clientclass)
        if [ ! -f "${iconpath}" ]; then # Cache refresh if icon doesnt exist
            iconpath=$(scripts/get-icon.py "$clientclass")
            echo "${iconpath}" > "scripts/cache/$clientclass"
        fi
    else
        iconpath=$(scripts/get-icon.py "$clientclass")
        echo "${iconpath}" > "scripts/cache/$clientclass"
    fi
    if [[ ${iconpath} = "not found" ]]; then
      iconpath=$(scripts/get-icon.py "$(echo "${classarr[i]##*.}" | tr '[:upper:]' '[:lower:]')")
      if [[ ! ${iconpath} = "not found" ]]; then
        rm "scripts/cache/$clientclass"
        echo "${iconpath}" > "scripts/cache/$clientclass"
      else 
        iconpath="/home/$USER/.local/share/icons/candy-icons/mimetypes/scalable/application-x-theme.svg"
        rm "scripts/cache/$clientclass"
        echo "${iconpath}" > "scripts/cache/$clientclass"
      fi
    fi

    client=${client::-1}
    client+=",\"icon\": \"$iconpath\"}"
    workspace[wsid]+="$client" # Add window to workspace JSON

    # echo -n "Window: $clientclass"
    # echo '; icon path: '"$iconpath"
    

    # echo "Count: ${workspacecnt[wsid]}"
    # echo 'ADDED TO: workspace '"$wsid"
    # echo ' --> '"${workspace[wsid]}"
    ((workspacecnt[wsid]+=1))
  done
  
  for i in 0 1 2 3 4; do
    if [[ ${workspace[i]} == "[" ]]; then 
      workspace[i]+=$(echo $dummy | sed "s/<___overview_workspace>/$((i+1))/g")
    fi
  done

  for i in 0 1 2 3 4; do
    workspace[i]+=']'
  done

  # echo '-=-=-=-=-=- Summary -=-=-=-=-=-'

  # -=-=-=-=-=-=-=-=-=-=-=-=-=-=- PRINT STUFF HERE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  echo -n '['
  for i in 0 1 2 3 4; do
    if [[ $i != 0 ]]; then
      echo -n ','
    fi
    echo -n "${workspace[i]}"
  done
  echo ']'
}

# Do stuff here
getwins

if [ "$1" == "--once" ]; then
  exit 0
else
  socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "window>>" | while read -r line; do
    getwins
  done
fi

================================================
FILE: eww/scripts/overview2
================================================
#!/usr/bin/bash
dummy='{"address":"_none","at":[0,0],"class":"workspace","size":[0,0],"title":"<___overview_workspace>","workspace":{"id":<___overview_workspace>, "name": "<___overview_workspace>"}}'

getwins() {
  hyprctlclients=$(hyprctl clients -j \
    | grep -v '"xwayland": ' \
    | grep -v '"grouped": ' \
    | grep -v '"pid": ' \
    | grep -v '"fullscreenMode": ' \
    | grep -v '"monitor": ' \
    | grep -v '"floating": ' \
    | grep -v '"fullscreen": ' \
    | grep -v '"pinned":') # | grep -v ""name":")
  # echo '-=-=-=- final output -=-=-=-'
  # echo "$toprint"
  # echo $(echo "$hyprctlclients")  # Print on one line only

  workspace=('[' '[' '[' '[' '[' '[' '[' '[' '[' '[')
  workspacecnt=(0 0 0 0 0 0 0 0 0 0)

  wsid=0

  # echo $hyprctlclients | gojq -c '.[]'

  IFS=$'\n'
  clientsarr=( $(echo $hyprctlclients | gojq -c '.[]') )
  for client in "${clientsarr[@]}"; do
    wsid=$(echo $client | gojq -c '.workspace.id')
    ((wsid-=1))
    if [[ "${workspacecnt[wsid]}" != "0" ]]; then 
      workspace[wsid]+=","
    fi

    clientclass=$(echo $client | gojq '.class' | sed 's/"//g')
    iconpath=''

    if [ -f "scripts/cache/$clientclass" ]; then
        iconpath=$(cat scripts/cache/$clientclass)
        if [ ! -f "${iconpath}" ]; then # Cache refresh if icon doesnt exist
            iconpath=$(scripts/get-icon.py "$clientclass")
            echo "${iconpath}" > "scripts/cache/$clientclass"
        fi
    else
        iconpath=$(scripts/get-icon.py "$clientclass")
        echo "${iconpath}" > "scripts/cache/$clientclass"
    fi
    if [[ ${iconpath} = "not found" ]]; then
      iconpath=$(scripts/get-icon.py "$(echo "${classarr[i]##*.}" | tr '[:upper:]' '[:lower:]')")
      if [[ ! ${iconpath} = "not found" ]]; then
        rm "scripts/cache/$clientclass"
        echo "${iconpath}" > "scripts/cache/$clientclass"
      else 
        iconpath="/home/$USER/.local/share/icons/candy-icons/mimetypes/scalable/application-x-theme.svg"
        rm "scripts/cache/$clientclass"
        echo "${iconpath}" > "scripts/cache/$clientclass"
      fi
    fi

    client=${client::-1}
    client+=",\"icon\": \"$iconpath\"}"
    workspace[wsid]+="$client" # Add window to workspace JSON

    # echo -n "Window: $clientclass"
    # echo '; icon path: '"$iconpath"
    

    # echo "Count: ${workspacecnt[wsid]}"
    # echo 'ADDED TO: workspace '"$wsid"
    # echo ' --> '"${workspace[wsid]}"
    ((workspacecnt[wsid]+=1))
  done
  
  for i in 5 6 7 8 9; do
    if [[ ${workspace[i]} == "[" ]]; then 
      workspace[i]+=$(echo $dummy | sed "s/<___overview_workspace>/$((i+1))/g")
    fi
  done

  for i in 5 6 7 8 9; do
    workspace[i]+=']'
  done

  # echo '-=-=-=-=-=- Summary -=-=-=-=-=-'

  # -=-=-=-=-=-=-=-=-=-=-=-=-=-=- PRINT STUFF HERE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  echo -n '['
  for i in 5 6 7 8 9; do
    if [[ $i != 5 ]]; then
      echo -n ','
    fi
    echo -n "${workspace[i]}"
  done
  echo ']'
}

# Do stuff here
getwins

if [ "$1" == "--once" ]; then
  exit 0
else
  socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "window>>" | while read -r line; do
    getwins
  done
fi

================================================
FILE: eww/scripts/selectwindow
================================================
#!/usr/bin/bash

selected=$(eval $2 get selected)


if [[ $selected == "_none" ]] || [[ $selected == "" ]]; then
  eval "$2 update selected=$1"
  selected=$(eval $2 get selected)
else
  hyprctl dispatch movetoworkspacesilent $3,address:$selected

  eval "$2 update selected=_none"
  selected=$(eval $2 get selected)
fi

================================================
FILE: eww/scripts/winlist
================================================
#!/usr/bin/bash
getwinlist(){
  toprint=$(hyprctl clients -j \
    | grep -v '"xwayland": ' \
    | grep -v '"grouped": ' \
    | grep -v '"pid": ' \
    | grep -v '"fullscreenMode": ' \
    | grep -v '"monitor": ' \
    | grep -v '"floating": ' \
    | grep -v '"fullscreen": ' \
    | grep -v '"at": ' \
    | grep -v '"size": ' \
    | grep -v '"pinned":') # | grep -v ""name":")
  # echo '-=-=-=- final output -=-=-=-'
  # echo "$toprint"
  echo $(echo "$toprint")  # Print on one line only
}

getwinlist

if [ "$1" == "--once" ]; then
  exit 0
else
  socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "window>>" | while read -r line; do
    echo $line
    # getwinlist
  done
fi

================================================
FILE: eww/scripts/winnumbers
================================================
#!/usr/bin/bash

geticonlist() {
    classes=$(hyprctl clients | grep -e 'class: ' | sed 's/class: Code/class: code/' | sed 's/\tclass: //')
    addresses=$(hyprctl clients | grep -e ' -> ')
    # echo "$classes"
    IFS=$'\n'
    classarr=($(echo "$classes"))
    
    printf '['
    for i in "${!classarr[@]}"; do
        if [ $i -ne 0 ]; then
            printf ', '
        fi
        printf "$i"
    done
    echo ']'
}

geticonlist

if [ "$1" == "--once" ]; then
  exit 0
else
  socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "window>>" | while read -r line; do
    geticonlist
  done
fi



================================================
FILE: eww/scripts/workspaces
================================================
#!/usr/bin/env bash

# define colors
colors=("#FFFFFF" "#fab387" "#a6e3a1" "#89b4fa") # Active Workspaces
dimmed=("#838383" "#f9e2af" "#94e2d5" "#b4befe") # Inactive workspaces
empty="#313244" # Empty workspaces

# get initial focused workspace
focusedws=$(hyprctl -j monitors | gojq -r '.[] | select(.focused == true) | .activeWorkspace.id')

declare -A o=([1]=0 [2]=0 [3]=0 [4]=0 [5]=0 [6]=0 [7]=0 [8]=0 [9]=0 [10]=0)
declare -A monitormap
declare -A workspaces

# set color for each workspace
status() {
  if [ "${o[$1]}" -eq 1 ]; then 
    mon=${monitormap[${workspaces[$1]}]}

    if [ $focusedws -eq "$1" ]; then
      echo -n "${colors[$mon]}"
    else
      echo -n "${dimmed[$mon]}"
    fi
  else
    echo -n "$empty"
  fi
}

status_activity() {
  if [ "${o[$1]}" -eq 1 ]; then 
    mon=${monitormap[${workspaces[$1]}]}

    if [ $focusedws -eq "$1" ]; then
      echo -n "active"
    else
      echo -n "inactive"
    fi
  else
    echo -n "empty"
  fi
}

# handle workspace create/destroy
workspace_event() {
  o[$1]=$2
  while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
}
# handle monitor (dis)connects
monitor_event() {
  while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | gojq -r '.[]|"\(.name) \(.id) "')
}

# generate the json for eww
generate() {
  echo -n '['

  for i in {1..10}; do
    echo -n ''$([ $i -eq 1 ] || echo ,)'{"num":"'$i'","class":"'$(status_activity "$i")'"}'
    # echo -n ''$([ $i -eq 1 ] || echo ,) '{ "number": "'"$i"'", "activity": "'"$(status_activity $i)"'", "color": "'$(status "$i")'" }'
  done

  # echo -n ',{"num":"'$focusedws'","clr":"'$(status "$focusedws")'"}'

  echo ']'
}

# setup

# add monitors
monitor_event

# add workspaces
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')

# check occupied workspaces
for num in "${!workspaces[@]}"; do
  o[$num]=1
done
# generate initial widget
generate

# main loop
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r line; do
  case ${line%>>*} in
    "workspace")
      focusedws=${line#*>>}
      generate
      ;;
    "focusedmon")
      focusedws=${line#*,}
      generate
      ;;
    "createworkspace")
      workspace_event "${line#*>>}" 1
      generate
      ;;
    "destroyworkspace")
      workspace_event "${line#*>>}" 0
      generate
      ;;
    "monitor"*)
      monitor_event
      generate
      ;;
  esac
  # echo $line
  # generate
done


================================================
FILE: eww/tmp/_colorscheme.colorpallete
================================================
//Auto generated color theme for image at: https://i.ytimg.com/vi/1y2wUv8R-0M/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB1AaAAuADigIMCAAQARgwIEcofzAP&rs=AOn4CLC7Y8ZWbbAadA7DCL3H9YDr3eO7HQ
@function bluetint($color, $percentage) { @return mix(#CDDFED, $color, $percentage); }
@function blueshade($color, $percentage) { @return mix(#152E50, $color, $percentage); }
$colorbg: #0a080d;
$colortext: #e1e8ea;
$color0: #2E6598;
$color1: #57729D;
$color2: #6696C2;
$color3: #9F9FAA;
$color4: #A0B0C9;
$color5: #B1D8E6;
$color6: #e1e8ea;
$color7: #9F9FAA;


================================================
FILE: eww/tmp/_iconcolor.txt
================================================
#e1e8ea


================================================
FILE: eww/tmp/colors_generated.conf
================================================
# Auto generated color theme for image at: https://i.ytimg.com/vi/1y2wUv8R-0M/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB1AaAAuADigIMCAAQARgwIEcofzAP&rs=AOn4CLC7Y8ZWbbAadA7DCL3H9YDr3eO7HQ
general {
    col.active_border = rgba(2E6598FF) rgba(57729DFF) rgba(9F9FAAFF) 45deg
    col.inactive_border = rgba(2E659866)
}


================================================
FILE: eww/windows/overview.yuck
================================================
(defwidget overview []
  (overlay
    (box
      :orientation "v"
      :class "overview-window"
      ; :space-evenly false
      ; (label :text "${wsjsona}")
      ; (label :text "${selected}")
      (box
        :orientation "h"
        (for wspace in wsjsona
          (box ; Note: height 100px width 356px
            :class "overview-ws"
            (box
              :orientation "v"
              (for ws-window in wspace
                (eventbox
                  :onrightclick "scripts/selectwindow ${ws-window.address} '${EWW_CMD}' ${ws-window.workspace.id}"
                  :onmiddleclick "hyprctl dispatch closewindow address:${ws-window.address}"
                  :onclick "scripts/focuswindow ${ws-window.address} ${ws-window.workspace.id} && ${EWW_CMD} close overview"
                  (box
                    :class "overview-ws-window"
                    :orientation "h"
                    :space-evenly false
                    :spacing 10
                    :style "${ws-window.address == selected ? 'border: 2px solid #FFFFFF' : ''}; ${ws-window.address == '_none' ? 'border: none' : ''};"
                    (box
                      :class "overview-icon"
                      :style "background-image: url('${ws-window.icon}')"
                    )
                    (box
                      :orientation "v"
                      :space-evenly false
                      :valign "center"
                      (label :xalign 0 :halign "start" :class "overview-ws-text" :text "${ws-window.title}" :limit-width 28 :wrap false )
                      (label :xalign 0 :halign "start" :class "overview-ws-subtext" :text "${ws-window.class}" :limit-width 30 :wrap false )
                    )
                  )
                )
              )
            )
          )
        )
      )
      (box
        :orientation "h"
        (for wspace in wsjsonb
          (box ; Note: height 100px width 178px
            :class "overview-ws"
            (box
              :orientation "v"
              (for ws-window in wspace
                (eventbox
                  :onrightclick "scripts/selectwindow ${ws-window.address} '${EWW_CMD}' ${ws-window.workspace.id}"
                  :onmiddleclick "hyprctl dispatch closewindow address:${ws-window.address}"
                  :onclick "scripts/focuswindow ${ws-window.address} ${ws-window.workspace.id} && ${EWW_CMD} close overview"
                  (box
                    :class "overview-ws-window"
                    :orientation "h"
                    :space-evenly false
                    :spacing 10
                    :style "${ws-window.address == selected ? 'border: 2px solid #FFFFFF' : ''}; ${ws-window.address == '_none' ? 'border: none' : ''};"
                    (box
                      :class "overview-icon"
                      :style "background-image: url('${ws-window.icon}')"
                    )
                    (box
                      :orientation "v"
                      :space-evenly false
                      :valign "center"
                      (label :xalign 0 :halign "start" :class "overview-ws-text" :text "${ws-window.title}" :limit-width 28 :wrap false )
                      (label :xalign 0 :halign "start" :class "overview-ws-subtext" :text "${ws-window.class}" :limit-width 30 :wrap false )
                    )
                  )
                )
              )
            )
          )
        )
      )
    )
  )
)

(defwidget testing []
  (box
    :class "overview-window"
    (overlay
      (box
        :class "overview-ws-window"
        :style "margin: 2px;"
      )
    )
  )
)

(defwindow overview
  :wm-ignore true
  :monitor 0
  :geometry (geometry
    :x "300px"
    :y "32px"
    :anchor "center"
    :width "1780px"
    :height "405px"
  )
  ; (testing)
  (overview)
)


================================================
FILE: hypr/desktop-portals.sh
================================================
#!/bin/sh
echo "amogus" > ~/.config/hypr/portals-log
sleep 1
killall xdg-desktop-portal-hyprland
killall xdg-desktop-portal-wlr
killall xdg-desktop-portal
/usr/lib/xdg-desktop-portal-hyprland &
sleep 2
/usr/lib/xdg-desktop-portal &



================================================
FILE: hypr/hyprland.conf
================================================
# Catppuccin Hyprland config

# Catppuccin colors
source = ~/.config/hypr/mocha.conf

#monitor=,preferred,auto,1
monitor = DP-1,3840x2160@60,5760x0,2
monitor = DP-2,3840x2160@60,1920x0,1
monitor = eDP-1,1920x1080@60,0x0,1 

workspace=eDP-1,1
workspace=DP-2,2
workspace=DP-1,3

# Startup programs and scipts
exec-once = sh .config/hypr/desktop-portals.sh

exec-once = sh .config/hypr/per-monitor-launcher.sh # My bar and wallpaper are set depending on the monitor
exec-once = dunst
exec-once = ckb-next -b
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
exec-once = /usr/lib/polkit-kde-authentication-agent-1
exec-once = swayidle -w before-sleep swaylock
exec = sh .config/hypr/scripts/get-last-focused-window.sh
exec = eww daemon
#exec-once = sleep 2 & swaylock

input {
    kb_layout = ca
    kb_variant = multix
    kb_model =
    kb_options =
    kb_rules =
    numlock_by_default=true

    follow_mouse = 1

    touchpad {
        natural_scroll = yes
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}

gestures {
    workspace_swipe=1
    workspace_swipe_distance=400
    workspace_swipe_invert=1
    workspace_swipe_min_speed_to_force=30
    workspace_swipe_cancel_ratio=0.5
    workspace_swipe_create_new=0
    workspace_swipe_forever=1
}

general {
    gaps_in = 10
    gaps_out = 20

    border_size = 3
    col.active_border=$teal
    col.inactive_border=$surface2

    layout = dwindle
}

decoration {
    rounding = 15

    blur = no
    blur_size = 9
    blur_passes = 4
    blur_new_optimizations = on

    drop_shadow = yes
    shadow_range = 15
    shadow_render_power = 3
    col.shadow = rgba(000000ee)

    dim_inactive = false
    dim_strength = 0.2

    multisample_edges = true
}

animations {
    enabled = yes

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05
    bezier = myBezier2, 0.65, 0, 0.35, 1

    bezier=slow,0,0.85,0.3,1
    bezier=overshot,0.7,0.6,0.1,1.1
    bezier=bounce,1,1.6,0.1,0.85
    bezier=slingshot,1,-1,0.15,1.25
    bezier=nice,0,6.9,0.5,-4.20
	
    animation=windows,1,5,bounce,popin
    animation=border,1,20,default
    animation=fade,1,5,default
    animation=workspaces,1,5,overshot,slide
}

dwindle {
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this

    col.group_border = $surface2
    col.group_border_active = $teal
}

master {
    new_is_master = true
}

gestures {
    workspace_swipe = on
}

device:epic mouse V1 {
    sensitivity = -0.5
}

binds {
	workspace_back_and_forth = true

}

misc {
	no_vfr = true
}

windowrule = float, ^(pavucontrol)$
windowrule = maxsize 600 800, ^(pavucontrol)$
windowrule = center, ^(pavucontrol)$
windowrule = tile, ^(libreoffice)$
windowrule = float, ^(blueman-manager)$
windowrule = nofullscreenrequest, ^(.*libreoffice.*)$
windowrule = size 490 600, ^(org.gnome.Calculator)$
windowrule = float, ^(org.gnome.Calculator)$
windowrule = float, ^(org.kde.polkit-kde-authentication-agent-1)$

$mainMod = SUPER

# Main binds
bind = $mainMod, return, exec, kitty
bind = $mainMod, Q, killactive, 
bind = $mainMod, M, exit, 
bind = $mainMod, E, exec, thunar
bind = $mainMod, V, togglefloating, 
bind = $mainMod, D, exec, wofi --show drun --term=kitty --width=40% --columns 2 -I -s ~/.config/wofi/style.css
bind = $mainMod, C, exec, rofi -show calc -modi calc -no-show-match -no-sort -terse -no-persist-history -theme ~/.config/rofi/style.rasi
bind = $mainMod, L, exec, swaylock
bind = $mainMod, G, togglegroup
bind = $mainMod, F, fullscreen,
bind = $mainMod, A, movetoworkspace, special
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, B, exec, sh .config/wofi/powermenu.sh
bind = $mainMod, W, exec, eww open --toggle overview  && eww update selected=_none
bind = $mainMod, N, exec, ~/wofi-emoji/wofi-emoji
bind = $mainMod, F10, pass, ^(com\.obsproject\.Studio)$
bind = ALT, Tab, exec, hyprctl dispatch focuswindow pid:$(cat .config/hypr/scripts/last-focused-window | sed 's/.*\(pid: \([0-9]*\)\).*/\2 /')

# Hardware controls using function keys
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
binde = , XF86AudioRaiseVolume, exec, pactl -- set-sink-volume @DEFAULT_SINK@ +5%
binde = , XF86AudioLowerVolume, exec, pactl -- set-sink-volume @DEFAULT_SINK@ -5%
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle

# Toggle gaps
bind = $mainMod, H, exec, sh .config/hypr/toggle-gaps.sh

# Toggle between floating windows
#bind = ALT, Tab, cyclenext,
#bind = ALT, Tab, bringactivetotop,

bind = $mainMod, Tab, changegroupactive,

# Resize focused window with arrow keys, indicated with borders of a different color
bind = $mainMod, R, exec, hyprctl --batch keyword "general:col.active_border rgba(fab387ff);"
bind = $mainMod, R, exec, hyprctl --batch keyword "dwindle:col.group_border_active rgba(fab387ff);"
bind = $mainMod, R, submap, resize
submap = resize
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
bind = , escape, exec, hyprctl --batch keyword "general:col.active_border rgba(94e2d5ff);"
bind = , escape, exec, hyprctl --batch keyword "dwindle:col.group_border_active rgba(94e2d5ff);"
bind = , escape, submap, reset
submap = reset

# Change DPI on external monitor
bind = $mainMod, F11, exec, hyprctl keyword monitor DP-2,3840x2160@60,0x0,1.25
bind = $mainMod, F12, exec, hyprctl keyword monitor DP-2,3840x2160@60,0x0,1

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, MINUS, workspace, special 
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d

bind = $mainMod CTRL, left, workspace, e-1
bind = $mainMod CTRL, right, workspace, e+1

# Take a screenshot
bind = $mainMod,Print, exec, grim -g "$(slurp)" "$HOME/Pictures/screenshots/$(date +'%s_grim.png')"
bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy

exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP


================================================
FILE: hypr/hyprpaper-desktop.conf
================================================
preload = Pictures/wallpapers/catppuccin-custom-darker-corners-desktop.png
preload = Pictures/wallpapers/catppuccin-custom-darker.png
preload = Pictures/wallpapers/result.png

wallpaper = DP-2,Pictures/wallpapers/catppuccin-custom-darker-corners-desktop.png
wallpaper = eDP-1,Pictures/wallpapers/catppuccin-custom-darker.png


================================================
FILE: hypr/hyprpaper-laptop.conf
================================================
preload = Pictures/wallpapers/catppuccin-custom-darker-corners.png

wallpaper = ,Pictures/wallpapers/catppuccin-custom-darker-corners.png


================================================
FILE: hypr/mocha.conf
================================================
$rosewater = 0xfff5e0dc
$flamingo  = 0xfff2cdcd
$pink      = 0xfff5c2e7
$mauve     = 0xffcba6f7
$red       = 0xfff38ba8
$maroon    = 0xffeba0ac
$peach     = 0xfffab387
$yellow    = 0xfff9e2af
$green     = 0xffa6e3a1
$teal      = 0xff94e2d5
$sky       = 0xff89dceb
$sapphire  = 0xff74c7ec
$blue      = 0xff89b4fa
$lavender  = 0xffb4befe

$text      = 0xffcdd6f4
$subtext1  = 0xffbac2de
$subtext0  = 0xffa6adc8

$overlay2  = 0xff9399b2
$overlay1  = 0xff7f849c
$overlay0  = 0xff6c7086

$surface2  = 0xff585b70
$surface1  = 0xff45475a
$surface0  = 0xff313244

$base      = 0xff1e1e2e
$mantle    = 0xff181825
$crust     = 0xff11111b


================================================
FILE: hypr/per-monitor-launcher.sh
================================================
#!/bin/sh
pkill waybar
pkill hyprpaper

m=$(printenv LAPTOP)

if [ $m = 1 ]; then
    hyprpaper -c .config/hypr/hyprpaper-laptop.conf &
    sleep 2 & waybar --config .config/waybar/laptop-bar/config --style .config/waybar/laptop-bar/style.css
else
    hyprpaper -c .config/hypr/hyprpaper-desktop.conf &
    sleep 2 & waybar --config .config/waybar/desktop-bar/config --style .config/waybar/desktop-bar/style.css
fi


================================================
FILE: hypr/portals-log
================================================
amogus


================================================
FILE: hypr/scripts/focused-window
================================================
Window a9ea0840 -> git add -A: at: 973,73 size: 924,984 workspace: 1 (1) floating: 0 monitor: 0 class: kitty title: git add -A pid: 158327 xwayland: 0 pinned: 0 fullscreen: 0 fullscreenmode: 0 fakefullscreen: 0 grouped: 0 swallowing: 0


================================================
FILE: hypr/scripts/get-last-focused-window.sh
================================================
#!/bin/sh

function handle {
  if [[ ${1:0:12} == "activewindow" ]]; then
    if [[ $1 != "activewindow>>," ]]; then
      cat ~/.config/hypr/scripts/focused-window > ~/.config/hypr/scripts/last-focused-window
      window=$(hyprctl activewindow)
      echo $window > ~/.config/hypr/scripts/focused-window
      #notify-send $1
    fi
  fi
}

socat - UNIX-CONNECT:/tmp/hypr/$(echo $HYPRLAND_INSTANCE_SIGNATURE)/.socket2.sock | while read line; do handle $line; done

================================================
FILE: hypr/scripts/last-focused-window
================================================
Window a9ea0840 -> mathis_hyprland@LEGION-Mathis:~/hyppuccin: at: 973,73 size: 924,984 workspace: 1 (1) floating: 0 monitor: 0 class: kitty title: mathis_hyprland@LEGION-Mathis:~/hyppuccin pid: 158327 xwayland: 0 pinned: 0 fullscreen: 0 fullscreenmode: 0 fakefullscreen: 0 grouped: 0 swallowing: 0


================================================
FILE: hypr/toggle-gaps.sh
================================================
#!/bin/sh

TOGGLE=$HOME/.toggle

if [ ! -e $TOGGLE ]; then
	touch $TOGGLE
	hyprctl keyword general:gaps_in 0
	hyprctl keyword general:gaps_out 0
	hyprctl keyword decoration:rounding 0
else
	rm $TOGGLE
	hyprctl keyword general:gaps_in 10
	hyprctl keyword general:gaps_out 20
	hyprctl keyword decoration:rounding 15
fi


================================================
FILE: kitty/kitty.conf
================================================
# vim:fileencoding=utf-8:foldmethod=marker

#: Fonts {{{

#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.

# font_family      monospace
# bold_font        auto
# italic_font      auto
# bold_italic_font auto

#: You can specify different fonts for the bold/italic/bold-italic
#: variants. To get a full list of supported fonts use the `kitty
#: +list-fonts` command. By default they are derived automatically, by
#: the OSes font system. When bold_font or bold_italic_font is set to
#: auto on macOS, the priority of bold fonts is semi-bold, bold,
#: heavy. Setting them manually is useful for font families that have
#: many weight variants like Book, Medium, Thick, etc. For example::

     font_family      SF Mono
#:     bold_font        Operator Mono Medium
#:     italic_font      Operator Mono Book Italic
#:     bold_italic_font Operator Mono Medium Italic

 font_size 12.0

#: Font size (in pts)

# force_ltr no

#: kitty does not support BIDI (bidirectional text), however, for RTL
#: scripts, words are automatically displayed in RTL. That is to say,
#: in an RTL script, the words "HELLO WORLD" display in kitty as
#: "WORLD HELLO", and if you try to select a substring of an RTL-
#: shaped string, you will get the character that would be there had
#: the the string been LTR. For example, assuming the Hebrew word
#: ירושלים, selecting the character that on the screen appears to be ם
#: actually writes into the selection buffer the character י.  kitty's
#: default behavior is useful in conjunction with a filter to reverse
#: the word order, however, if you wish to manipulate RTL glyphs, it
#: can be very challenging to work with, so this option is provided to
#: turn it off. Furthermore, this option can be used with the command
#: line program GNU FriBidi
#: <https://github.com/fribidi/fribidi#executable> to get BIDI
#: support, because it will force kitty to always treat the text as
#: LTR, which FriBidi expects for terminals.

# symbol_map

#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols

#: Map the specified Unicode codepoints to a particular font. Useful
#: if you need special rendering for some symbols, such as for
#: Powerline. Avoids the need for patched fonts. Each Unicode code
#: point is specified in the form `U+<code point in hexadecimal>`. You
#: can specify multiple code points, separated by commas and ranges
#: separated by hyphens. This option can be specified multiple times.
#: The syntax is::

#:     symbol_map codepoints Font Family Name

# narrow_symbols

#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1

#: Usually, for Private Use Unicode characters and some symbol/dingbat
#: characters, if the character is followed by one or more spaces,
#: kitty will use those extra cells to render the character larger, if
#: the character in the font has a wide aspect ratio. Using this
#: option you can force kitty to restrict the specified code points to
#: render in the specified number of cells (defaulting to one cell).
#: This option can be specified multiple times. The syntax is::

#:     narrow_symbols codepoints [optionally the number of cells]

# disable_ligatures never

#: 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::

#:     map alt+1 disable_ligatures_in active always
#:     map alt+2 disable_ligatures_in all never
#:     map alt+3 disable_ligatures_in tab cursor

#: Note that this refers to programming ligatures, typically
#: implemented using the calt OpenType feature. For disabling general
#: ligatures, use the font_features option.

# font_features

#: E.g. font_features none

#: Choose exactly which OpenType features to enable or disable. This
#: is useful as some fonts might have features worthwhile in a
#: terminal. For example, Fira Code includes a discretionary feature,
#: zero, which in that font changes the appearance of the zero (0), to
#: make it more easily distinguishable from Ø. Fira Code also includes
#: other discretionary features known as Stylistic Sets which have the
#: tags ss01 through ss20.

#: For the exact syntax to use for individual features, see the
#: HarfBuzz documentation <https://harfbuzz.github.io/harfbuzz-hb-
#: common.html#hb-feature-from-string>.

#: Note that this code is indexed by PostScript name, and not the font
#: family. This allows you to define very precise feature settings;
#: e.g. you can disable a feature in the italic font but not in the
#: regular font.

#: On Linux, font features are first read from the FontConfig database
#: and then this option is applied, so they can be configured in a
#: single, central place.

#: To get the PostScript name for a font, use `kitty +list-fonts
#: --psnames`:

#: .. code-block:: sh

#:     $ kitty +list-fonts --psnames | grep Fira
#:     Fira Code
#:     Fira Code Bold (FiraCode-Bold)
#:     Fira Code Light (FiraCode-Light)
#:     Fira Code Medium (FiraCode-Medium)
#:     Fira Code Regular (FiraCode-Regular)
#:     Fira Code Retina (FiraCode-Retina)

#: The part in brackets is the PostScript name.

#: Enable alternate zero and oldstyle numerals::

#:     font_features FiraCode-Retina +zero +onum

#: Enable only alternate zero in the bold font::

#:     font_features FiraCode-Bold +zero

#: Disable the normal ligatures, but keep the calt feature which (in
#: this font) breaks up monotony::

#:     font_features TT2020StyleB-Regular -liga +calt

#: In conjunction with force_ltr, you may want to disable Arabic
#: shaping entirely, and only look at their isolated forms if they
#: show up in a document. You can do this with e.g.::

#:     font_features UnifontMedium +isol -medi -fina -init

# modify_font

#: Modify font characteristics such as the position or thickness of
#: the underline and strikethrough. The modifications can have the
#: suffix px for pixels or % for percentage of original value. No
#: suffix means use pts. For example::

#:     modify_font underline_position -2
#:     modify_font underline_thickness 150%
#:     modify_font strikethrough_position 2px

#: Additionally, you can modify the size of the cell in which each
#: font glyph is rendered and the baseline at which the glyph is
#: placed in the cell. For example::

#:     modify_font cell_width 80%
#:     modify_font cell_height -2px
#:     modify_font baseline 3

#: Note that modifying the baseline will automatically adjust the
#: underline and strikethrough positions by the same amount.
#: Increasing the baseline raises glyphs inside the cell and
#: decreasing it lowers them. Decreasing the cell size might cause
#: rendering artifacts, so use with care.

 box_drawing_scale 0.001, 1, 1.5, 2

#: The sizes of the lines used for the box drawing Unicode characters.
#: These values are in pts. They will be scaled by the monitor DPI to
#: arrive at a pixel value. There must be four values corresponding to
#: thin, normal, thick, and very thick lines.

#: }}}

#: Cursor customization {{{

# cursor #cccccc

#: 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
#: the color of the text in the cell it is over and the text will be
#: rendered with the background color of the cell. Note that if the
#: program running in the terminal sets a cursor color, this takes
#: precedence. Also, the cursor colors are modified if the cell
#: background and foreground colors have very low contrast.

# cursor_text_color #111111

#: The color of text under the cursor. If you want it rendered with
#: the background color of the cell underneath instead, use the
#: special keyword: background. Note that if cursor is set to none
#: then this option is ignored.

# cursor_shape block

#: The cursor shape can be one of block, beam, underline. Note that
#: when reloading the config this will be changed only if the cursor
#: shape has not been set by the program running in the terminal. This
#: sets the default cursor shape, applications running in the terminal
#: can override it. In particular, shell integration
#: <https://sw.kovidgoyal.net/kitty/shell-integration/> in kitty sets
#: the cursor shape to beam at shell prompts. You can avoid this by
#: setting shell_integration to no-cursor.

# cursor_beam_thickness 1.5

#: The thickness of the beam cursor (in pts).

# cursor_underline_thickness 2.0

#: The thickness of the underline cursor (in pts).

# cursor_blink_interval -1

#: The interval to blink the cursor (in seconds). Set to zero to
#: disable blinking. Negative values mean use system default. Note
#: that the minimum interval will be limited to repaint_delay.

# cursor_stop_blinking_after 15.0

#: Stop blinking cursor after the specified number of seconds of
#: keyboard inactivity. Set to zero to never stop blinking.

#: }}}

#: Scrollback {{{

# scrollback_lines 2000

#: Number of lines of history to keep in memory for scrolling back.
#: Memory is allocated on demand. Negative numbers are (effectively)
#: infinite scrollback. Note that using very large scrollback is not
#: recommended as it can slow down performance of the terminal and
#: also use large amounts of RAM. Instead, consider using
#: scrollback_pager_history_size. Note that on config reload if this
#: is changed it will only affect newly created windows, not existing
#: ones.

# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER

#: Program with which to view scrollback in a new window. The
#: scrollback buffer is passed as STDIN to this program. If you change
#: it, make sure the program you use can handle ANSI escape sequences
#: for colors and text formatting. INPUT_LINE_NUMBER in the command
#: line above will be replaced by an integer representing which line
#: should be at the top of the screen. Similarly CURSOR_LINE and
#: CURSOR_COLUMN will be replaced by the current cursor position or
#: set to 0 if there is no cursor, for example, when showing the last
#: command output.

# scrollback_pager_history_size 0

#: Separate scrollback history size (in MB), used only for browsing
#: the scrollback buffer with pager. This separate buffer is not
#: available for interactive scrolling but will be piped to the pager
#: program when viewing scrollback buffer in a separate window. The
#: current implementation stores the data in UTF-8, so approximatively
#: 10000 lines per megabyte at 100 chars per line, for pure ASCII,
#: unformatted text. A value of zero or less disables this feature.
#: The maximum allowed size is 4GB. Note that on config reload if this
#: is changed it will only affect newly created windows, not existing
#: ones.

# scrollback_fill_enlarged_window no

#: Fill new space with lines from the scrollback buffer after
#: enlarging a window.

# wheel_scroll_multiplier 5.0

#: Multiplier for the number of lines scrolled by the mouse wheel.
#: Note that this is only used for low precision scrolling devices,
#: not for high precision scrolling devices on platforms such as macOS
#: and Wayland. Use negative numbers to change scroll direction. See
#: also wheel_scroll_min_lines.

# wheel_scroll_min_lines 1

#: The minimum number of lines scrolled by the mouse wheel. The scroll
#: multiplier wheel_scroll_multiplier only takes effect after it
#: reaches this number. Note that this is only used for low precision
#: scrolling devices like wheel mice that scroll by very small amounts
#: when using the wheel. With a negative number, the minimum number of
#: lines will always be added.

# touch_scroll_multiplier 1.0

#: Multiplier for the number of lines scrolled by a touchpad. Note
#: that this is only used for high precision scrolling devices on
#: platforms such as macOS and Wayland. Use negative numbers to change
#: scroll direction.

#: }}}

#: Mouse {{{

# mouse_hide_wait 3.0

#: Hide mouse cursor after the specified number of seconds of the
#: mouse not being used. Set to zero to disable mouse cursor hiding.
#: Set to a negative value to hide the mouse cursor immediately when
#: typing text. Disabled by default on macOS as getting it to work
#: robustly with the ever-changing sea of bugs that is Cocoa is too
#: much effort.

# url_color #0087bd
# url_style curly

#: The color and style for highlighting URLs on mouse-over. url_style
#: can be one of: none, straight, double, curly, dotted, dashed.

# open_url_with default

#: The program to open clicked URLs. The special value default with
#: first look for any URL handlers defined via the open_actions
#: <https://sw.kovidgoyal.net/kitty/open_actions/> facility and if non
#: are found, it will use the Operating System's default URL handler
#: (open on macOS and xdg-open on Linux).

# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh

#: The set of URL prefixes to look for when detecting a URL under the
#: mouse cursor.

# detect_urls yes

#: Detect URLs under the mouse. Detected URLs are highlighted with an
#: underline and the mouse cursor becomes a hand over them. Even if
#: this option is disabled, URLs are still clickable.

# url_excluded_characters

#: Additional characters to be disallowed from URLs, when detecting
#: URLs under the mouse cursor. By default, all characters that are
#: legal in URLs are allowed.

# copy_on_select no

#: 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
#: copied to clipboard. Useful on platforms such as macOS that do not
#: have the concept of primary selection. You can instead specify a
#: name such as a1 to copy to a private kitty buffer. Map a shortcut
#: with the paste_from_buffer action to paste from this private
#: buffer. For example::

#:     copy_on_select a1
#:     map shift+cmd+v paste_from_buffer a1

#: Note that copying to the clipboard is a security risk, as all
#: programs, including websites open in your browser can read the
#: contents of the system clipboard.

# paste_actions quote-urls-at-prompt

#: A comma separated list of actions to take when pasting text into
#: the terminal. The supported paste actions are:

#: quote-urls-at-prompt:
#:     If the text being pasted is a URL and the cursor is at a shell prompt,
#:     automatically quote the URL (needs shell_integration).
#: confirm:
#:     Confirm the paste if bracketed paste mode is not active or there is more
#:     a large amount of text being pasted.
#: filter:
#:     Run the filter_paste() function from the file paste-actions.py in
#:     the kitty config directory on the pasted text. The text returned by the
#:     function will be actually pasted.

# strip_trailing_spaces never

#: Remove spaces at the end of lines when copying to clipboard. A
#: value of smart will do it when using normal selections, but not
#: rectangle selections. A value of always will always do it.

# select_by_word_characters @-./_~?&=%+#

#: Characters considered part of a word when double clicking. In
#: addition to these characters any character that is marked as an
#: alphanumeric character in the Unicode database will be matched.

# select_by_word_characters_forward

#: Characters considered part of a word when extending the selection
#: forward on double clicking. In addition to these characters any
#: character that is marked as an alphanumeric character in the
#: Unicode database will be matched.

#: If empty (default) select_by_word_characters will be used for both
#: directions.

# click_interval -1.0

#: The interval between successive clicks to detect double/triple
#: clicks (in seconds). Negative numbers will use the system default
#: instead, if available, or fallback to 0.5.

# focus_follows_mouse no

#: Set the active window to the window under the mouse when moving the
#: mouse around.

# pointer_shape_when_grabbed arrow

#: The shape of the mouse pointer when the program running in the
#: terminal grabs the mouse. Valid values are: arrow, beam and hand.

# default_pointer_shape beam

#: The default shape of the mouse pointer. Valid values are: arrow,
#: beam and hand.

# pointer_shape_when_dragging beam

#: The default shape of the mouse pointer when dragging across text.
#: Valid values are: arrow, beam and hand.

#: Mouse actions {{{

#: Mouse buttons can be mapped to perform arbitrary actions. The
#: syntax is:

#: .. code-block:: none

#:     mouse_map button-name event-type modes action

#: Where button-name is one of left, middle, right, b1 ... b8 with
#: added keyboard modifiers. For example: ctrl+shift+left refers to
#: holding the Ctrl+Shift keys while clicking with the left mouse
#: button. The value b1 ... b8 can be used to refer to up to eight
#: buttons on a mouse.

#: event-type is one of press, release, doublepress, triplepress,
#: click, doubleclick. modes indicates whether the action is performed
#: when the mouse is grabbed by the program running in the terminal,
#: or not. The values are grabbed or ungrabbed or a comma separated
#: combination of them. grabbed refers to when the program running in
#: the terminal has requested mouse events. Note that the click and
#: double click events have a delay of click_interval to disambiguate
#: from double and triple presses.

#: You can run kitty with the kitty --debug-input command line option
#: to see mouse events. See the builtin actions below to get a sense
#: of what is possible.

#: If you want to unmap an action, map it to no_op. For example, to
#: disable opening of URLs with a plain click::

#:     mouse_map left click ungrabbed no_op

#: See all the mappable actions including mouse actions here
#: <https://sw.kovidgoyal.net/kitty/actions/>.

#: .. note::
#:     Once a selection is started, releasing the button that started it will
#:     automatically end it and no release event will be dispatched.

# clear_all_mouse_actions no

#: Remove all mouse action definitions up to this point. Useful, for
#: instance, to remove the default mouse actions.

#: Click the link under the mouse or move the cursor

# mouse_map left click ungrabbed mouse_handle_click selection link prompt

#::  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
#::  it. Finally check if the click happened at the current shell
#::  prompt and if so, move the cursor to the click location. Note
#::  that this requires shell integration
#::  <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.

#: 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

#::  Same as above, except that the action is performed even when the
#::  mouse is grabbed by the program running in the terminal.

#: Click the link under the mouse cursor

# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link

#::  Variant with Ctrl+Shift is present because the simple click based
#::  version has an unavoidable delay of click_interval, to
#::  disambiguate clicks from double clicks.

#: Discard press event for link click

# mouse_map ctrl+shift+left press grabbed discard_event

#::  Prevent this press event from being sent to the program that has
#::  grabbed the mouse, as the corresponding release event is used to
#::  open a URL.

#: Paste from the primary selection

# mouse_map middle release ungrabbed paste_from_selection

#: Start selecting text

# mouse_map left press ungrabbed mouse_selection normal

#: Start selecting text in a rectangle

# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle

#: Select a word

# mouse_map left doublepress ungrabbed mouse_selection word

#: Select a line

# mouse_map left triplepress ungrabbed mouse_selection line

#: Select line from point

# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point

#::  Select from the clicked point to the end of the line.

#: Extend the current selection

# mouse_map right press ungrabbed mouse_selection extend

#::  If you want only the end of the selection to be moved instead of
#::  the nearest boundary, use move-end instead of extend.

#: Paste from the primary selection even when grabbed

# mouse_map shift+middle release ungrabbed,grabbed paste_selection
# mouse_map shift+middle press grabbed discard_event

#: Start selecting text even when grabbed

# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal

#: Start selecting text in a rectangle even when grabbed

# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle

#: Select a word even when grabbed

# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word

#: Select a line even when grabbed

# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line

#: Select line from point even when grabbed

# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point

#::  Select from the clicked point to the end of the line even when
#::  grabbed.

#: Extend the current selection even when grabbed

# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend

#: Show clicked command output in pager

# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output

#::  Requires shell integration
#::  <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.

#: }}}

#: }}}

#: Performance tuning {{{

# repaint_delay 10

#: Delay between screen updates (in milliseconds). Decreasing it,
#: increases frames-per-second (FPS) at the cost of more CPU usage.
#: The default value yields ~100 FPS which is more than sufficient for
#: most uses. Note that to actually achieve 100 FPS, you have to
#: either set sync_to_monitor to no or use a monitor with a high
#: refresh rate. Also, to minimize latency when there is pending input
#: to be processed, this option is ignored.

# input_delay 3

#: Delay before input from the program running in the terminal is
#: processed (in milliseconds). Note that decreasing it will increase
#: responsiveness, but also increase CPU usage and might cause flicker
#: in full screen programs that redraw the entire screen on each loop,
#: because kitty is so fast that partial screen updates will be drawn.

# sync_to_monitor yes

#: Sync screen updates to the refresh rate of the monitor. This
#: prevents screen tearing
#: <https://en.wikipedia.org/wiki/Screen_tearing> when scrolling.
#: However, it limits the rendering speed to the refresh rate of your
#: monitor. With a very high speed mouse/high keyboard repeat rate,
#: you may notice some slight input latency. If so, set this to no.

#: }}}

#: Terminal bell {{{

# enable_audio_bell yes

#: The audio bell. Useful to disable it in environments that require
#: silence.

# visual_bell_duration 0.0

#: The visual bell duration (in seconds). Flash the screen when a bell
#: occurs for the specified number of seconds. Set to zero to disable.

# visual_bell_color none

#: The color used by visual bell. Set to none will fall back to
#: selection background color. If you feel that the visual bell is too
#: bright, you can set it to a darker color.

# window_alert_on_bell yes

#: Request window attention on bell. Makes the dock icon bounce on
#: macOS or the taskbar flash on linux.

# bell_on_tab "🔔 "

#: Some text or a Unicode symbol to show on the tab if a window in the
#: tab that does not have focus has a bell. If you want to use leading
#: or trailing spaces, surround the text with quotes. See
#: tab_title_template for how this is rendered.

#: For backwards compatibility, values of yes, y and true are
#: converted to the default bell symbol and no, n, false and none are
#: converted to the empty string.

# command_on_bell none

#: Program to run when a bell occurs. The environment variable
#: KITTY_CHILD_CMDLINE can be used to get the program running in the
#: window in which the bell occurred.

# bell_path none

#: Path to a sound file to play as the bell sound. If set to none, the
#: system default bell sound is used. Must be in a format supported by
#: the operating systems sound API, such as WAV or OGA on Linux
#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound)

#: }}}

#: Window layout {{{

# remember_window_size  yes
# initial_window_width  640
# initial_window_height 400

#: If enabled, the window size will be remembered so that new
#: instances of kitty will have the same size as the previous
#: instance. If disabled, the window will initially have size
#: configured by initial_window_width/height, in pixels. You can use a
#: suffix of "c" on the width/height values to have them interpreted
#: as number of cells instead of pixels.

# enabled_layouts *

#: The enabled window layouts. A comma separated list of layout names.
#: The special value all means all layouts. The first listed layout
#: will be used as the startup layout. Default configuration is all
#: layouts in alphabetical order. For a list of available layouts, see
#: the layouts <https://sw.kovidgoyal.net/kitty/overview/#layouts>.

# window_resize_step_cells 2
# window_resize_step_lines 2

#: The step size (in units of cell width/cell height) to use when
#: resizing kitty windows in a layout with the shortcut
#: start_resizing_window. The cells value is used for horizontal
#: resizing, and the lines value is used for vertical resizing.

# window_border_width 0.5pt

#: The width of window borders. Can be either in pixels (px) or pts
#: (pt). Values in pts will be rounded to the nearest number of pixels
#: based on screen resolution. If not specified, the unit is assumed
#: to be pts. Note that borders are displayed only when more than one
#: window is visible. They are meant to separate multiple windows.

# draw_minimal_borders yes

#: Draw only the minimum borders needed. This means that only the
#: borders that separate the inactive window from a neighbor are
#: drawn. Note that setting a non-zero window_margin_width overrides
#: this and causes all borders to be drawn.

 window_margin_width 15

#: The window margin (in pts) (blank area outside the border). A
#: single value sets all four sides. Two values set the vertical and
#: horizontal sides. Three values set top, horizontal and bottom. Four
#: values set top, right, bottom and left.

# single_window_margin_width -1

#: The window margin to use when only a single window is visible (in
#: pts). Negative values will cause the value of window_margin_width
#: to be used instead. A single value sets all four sides. Two values
#: set the vertical and horizontal sides. Three values set top,
#: horizontal and bottom. Four values set top, right, bottom and left.

# window_padding_width 0

#: The window padding (in pts) (blank area between the text and the
#: window border). A single value sets all four sides. Two values set
#: the vertical and horizontal sides. Three values set top, horizontal
#: and bottom. Four values set top, right, bottom and left.

# placement_strategy center

#: When the window size is not an exact multiple of the cell size, the
#: cell area of the terminal window will have some extra padding on
#: the sides. You can control how that padding is distributed with
#: this option. Using a value of center means the cell area will be
#: placed centrally. A value of top-left means the padding will be
#: only at the bottom and right edges.

# active_border_color #00ff00

#: The color for the border of the active window. Set this to none to
#: not draw borders around the active window.

# inactive_border_color #cccccc

#: The color for the border of inactive windows.

# bell_border_color #ff5a00

#: The color for the border of inactive windows in which a bell has
#: occurred.

# inactive_text_alpha 1.0

#: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded).

# hide_window_decorations no

#: Hide the window decorations (title-bar and window borders) with
#: yes. On macOS, titlebar-only can be used to only hide the titlebar.
#: Whether this works and exactly what effect it has depends on the
#: window manager/operating system. Note that the effects of changing
#: this option when reloading config are undefined.

# window_logo_path none

#: Path to a logo image. Must be in PNG format. Relative paths are
#: interpreted relative to the kitty config directory. The logo is
#: displayed in a corner of every kitty window. The position is
#: controlled by window_logo_position. Individual windows can be
#: configured to have different logos either using the launch action
#: or the remote control <https://sw.kovidgoyal.net/kitty/remote-
#: control/> facility.

# window_logo_position bottom-right

#: Where to position the window logo in the window. The value can be
#: one of: top-left, top, top-right, left, center, right, bottom-left,
#: bottom, bottom-right.

# window_logo_alpha 0.5

#: The amount the logo should be faded into the background. With zero
#: being fully faded and one being fully opaque.

# resize_debounce_time 0.1

#: The time to wait before redrawing the screen when a resize event is
#: received (in seconds). On platforms such as macOS, where the
#: operating system sends events corresponding to the start and end of
#: a resize, this number is ignored.

# resize_draw_strategy static

#: Choose how kitty draws a window while a resize is in progress. A
#: value of static means draw the current window contents, mostly
#: unchanged. A value of scale means draw the current window contents
#: scaled. A value of blank means draw a blank window. A value of size
#: means show the window size in cells.

# resize_in_steps no

#: Resize the OS window in steps as large as the cells, instead of
#: with the usual pixel accuracy. Combined with initial_window_width
#: and initial_window_height in number of cells, this option can be
#: used to keep the margins as small as possible when resizing the OS
#: window. Note that this does not currently work on Wayland.

# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ

#: The list of characters for visual window selection. For example,
#: for selecting a window to focus on with focus_visible_window. The
#: value should be a series of unique numbers or alphabets, case
#: insensitive, from the set [0-9A-Z]. Specify your preference as a
#: string of characters.

 confirm_os_window_close -0

#: Ask for confirmation when closing an OS window or a tab with at
#: least this number of kitty windows in it by window manager (e.g.
#: clicking the window close button or pressing the operating system
#: shortcut to close windows) or by the close_tab action. A value of
#: zero disables confirmation. This confirmation also applies to
#: requests to quit the entire application (all OS windows, via the
#: quit action). Negative values are converted to positive ones,
#: however, with shell_integration enabled, using negative values
#: means windows sitting at a shell prompt are not counted, only
#: windows where some command is currently running. Note that if you
#: want confirmation when closing individual windows, you can map the
#: close_window_with_confirmation action.

#: }}}

#: Tab bar {{{

# tab_bar_edge bottom

#: The edge to show the tab bar on, top or bottom.

# tab_bar_margin_width 0.0

#: The margin to the left and right of the tab bar (in pts).

# tab_bar_margin_height 0.0 0.0

#: The margin above and below the tab bar (in pts). The first number
#: is the margin between the edge of the OS Window and the tab bar.
#: The second number is the margin between the tab bar and the
#: contents of the current tab.

# tab_bar_style fade

#: The tab bar style, can be one of:

#: fade
#:     Each tab's edges fade into the background color. (See also tab_fade)
#: slant
#:     Tabs look like the tabs in a physical file.
#: separator
#:     Tabs are separated by a configurable separator. (See also
#:     tab_separator)
#: powerline
#:     Tabs are shown as a continuous line with "fancy" separators.
#:     (See also tab_powerline_style)
#: custom
#:     A user-supplied Python function called draw_tab is loaded from the file
#:     tab_bar.py in the kitty config directory. For examples of how to
#:     write such a function, see the functions named draw_tab_with_* in
#:     kitty's source code: kitty/tab_bar.py. See also
#:     this discussion <https://github.com/kovidgoyal/kitty/discussions/4447>
#:     for examples from kitty users.
#: hidden
#:     The tab bar is hidden. If you use this, you might want to create a mapping
#:     for the select_tab action which presents you with a list of tabs and
#:     allows for easy switching to a tab.

# tab_bar_align left

#: The horizontal alignment of the tab bar, can be one of: left,
#: center, right.

# tab_bar_min_tabs 2

#: The minimum number of tabs that must exist before the tab bar is
#: shown.

# tab_switch_strategy previous

#: The algorithm to use when switching to a tab when the current tab
#: is closed. The default of previous will switch to the last used
#: tab. A value of left will switch to the tab to the left of the
#: closed tab. A value of right will switch to the tab to the right of
#: the closed tab. A value of last will switch to the right-most tab.

# tab_fade 0.25 0.5 0.75 1

#: Control how each tab fades into the background when using fade for
#: the tab_bar_style. Each number is an alpha (between zero and one)
#: that controls how much the corresponding cell fades into the
#: background, with zero being no fade and one being full fade. You
#: can change the number of cells used by adding/removing entries to
#: this list.

# tab_separator " ┇"

#: The separator between tabs in the tab bar when using separator as
#: the tab_bar_style.

# tab_powerline_style angled

#: The powerline separator style between tabs in the tab bar when
#: using powerline as the tab_bar_style, can be one of: angled,
#: slanted, round.

# tab_activity_symbol none

#: Some text or a Unicode symbol to show on the tab if a window in the
#: tab that does not have focus has some activity. If you want to use
#: leading or trailing spaces, surround the text with quotes. See
#: tab_title_template for how this is rendered.

# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}"

#: A template to render the tab title. The default just renders the
#: title with optional symbols for bell and activity. If you wish to
#: include the tab-index as well, use something like: {index}:{title}.
#: Useful if you have shortcuts mapped for goto_tab N. If you prefer
#: to see the index as a superscript, use {sup.index}. All data
#: available is:

#: title
#:     The current tab title.
#: index
#:     The tab index useable with goto_tab N goto_tab shortcuts.
#: layout_name
#:     The current layout name.
#: num_windows
#:     The number of windows in the tab.
#: num_window_groups
#:     The number of window groups (not counting overlay windows) in the tab.
#: tab.active_wd
#:     The working directory of the currently active window in the tab (expensive,
#:     requires syscall).
#: max_title_length
#:     The maximum title length available.

#: Note that formatting is done by Python's string formatting
#: machinery, so you can use, for instance, {layout_name[:2].upper()}
#: to show only the first two letters of the layout name, upper-cased.
#: If you want to style the text, you can use styling directives, for
#: example:
#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`.
#: Similarly, for bold and italic:
#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`.
#: Note that for backward compatibility, if {bell_symbol} or
#: {activity_symbol} are not present in the template, they are
#: prepended to it.

# active_tab_title_template none

#: Template to use for active tabs. If not specified falls back to
#: tab_title_template.

# active_tab_foreground   #000
# active_tab_background   #eee
# active_tab_font_style   bold-italic
# inactive_tab_foreground #444
# inactive_tab_background #999
# inactive_tab_font_style normal

#: Tab bar colors and styles.

# tab_bar_background none

#: Background color for the tab bar. Defaults to using the terminal
#: background color.

# tab_bar_margin_color none

#: Color for the tab bar margin area. Defaults to using the terminal
#: background color.

#: }}}

# The basic colors
foreground              #CDD6F4
background              #1E1E2E
selection_foreground    #1E1E2E
selection_background    #F5E0DC

#: The foreground and background colors.

 background_opacity 1.0

#: 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
#: supported by the OS (for instance, when using a compositor under
#: X11). Note that it only sets the background color's opacity in
#: cells that have the same background color as the default terminal
#: background, so that things like the status bar in vim, powerline
#: prompts, etc. still look good. But it means that if you use a color
#: theme with a background color in your editor, it will not be
#: rendered as transparent. Instead you should change the default
#: background color in your kitty config and not use a background
#: color in the editor color scheme. Or use the escape codes to set
#: the terminals default colors in a shell script to launch your
#: editor. Be aware that using a value less than 1.0 is a (possibly
#: significant) performance hit. If you want to dynamically change
#: transparency of windows, set dynamic_background_opacity to yes
#: (this is off by default as it has a performance cost). Changing
#: this option when reloading the config will only work if
#: dynamic_background_opacity was enabled in the original config.

# background_image none

#: Path to a background image. Must be in PNG format.

# background_image_layout tiled

#: Whether to tile, scale or clamp the background image. The value can
#: be one of tiled, mirror-tiled, scaled, clamped or centered.

# background_image_linear no

#: When background image is scaled, whether linear interpolation
#: should be used.

# dynamic_background_opacity no

#: Allow changing of the background_opacity dynamically, using either
#: keyboard shortcuts (increase_background_opacity and
#: decrease_background_opacity) or the remote control facility.
#: Changing this option by reloading the config is not supported.

# background_tint 0.0

#: 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 current background color for each window. This option applies
#: only if background_opacity is set and transparent windows are
#: supported or background_image is set.

# dim_opacity 0.75

#: How much to dim text that has the DIM/FAINT attribute set. One
#: means no dimming and zero means fully dimmed (i.e. invisible).

# selection_foreground #000000
# selection_background #fffacd

#: The foreground and background colors for text selected with the
#: mouse. Setting both of these to none will cause a "reverse video"
#: effect for selections, where the selection will be the cell text
#: color and the text will become the cell background color. Setting
#: only selection_foreground to none will cause the foreground color
#: to be used unchanged. Note that these colors can be overridden by
#: the program running in the terminal.

# Cursor colors
cursor                  #F5E0DC
cursor_text_color       #1E1E2E

# URL underline color when hovering with mouse
url_color               #F5E0DC

# Kitty window border colors
active_border_color     #B4BEFE
inactive_border_color   #6C7086
bell_border_color       #F9E2AF

# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system

# Tab bar colors
active_tab_foreground   #11111B
active_tab_background   #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background      #11111B

# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC

# The 16 terminal colors

# black
color0 #45475A
color8 #585B70

# red
color1 #F38BA8
color9 #F38BA8

# green
color2  #A6E3A1
color10 #A6E3A1

# yellow
color3  #F9E2AF
color11 #F9E2AF

# blue
color4  #89B4FA
color12 #89B4FA

# magenta
color5  #F5C2E7
color13 #F5C2E7

# cyan
color6  #94E2D5
color14 #94E2D5

# white
color7  #BAC2DE
color15 #A6ADC8

#; }}}

#;  }}}

#: Advanced {{{

# shell .

#: The shell program to execute. The default value of . means to use
#: whatever shell is set as the default shell for the current user.
#: Note that on macOS if you change this, you might need to add
#: --login and --interactive to ensure that the shell starts in
#: interactive mode and reads its startup rc files.

# editor .

#: The terminal based text editor (such as vim or nano) to use when
#: editing the kitty config file or similar tasks.

#: The default value of . means to use the environment variables
#: VISUAL and EDITOR in that order. If these variables aren't set,
#: kitty will run your shell ($SHELL -l -i -c env) to see if your
#: shell startup rc files set VISUAL or EDITOR. If that doesn't work,
#: kitty will cycle through various known editors (vim, emacs, etc.)
#: and take the first one that exists on your system.

# close_on_child_death no

#: Close the window when the child process (shell) exits. With the
#: default value no, the terminal will remain open when the child
#: exits as long as there are still processes outputting to the
#: terminal (for example disowned or backgrounded processes). When
#: enabled with yes, the window will close as soon as the child
#: process exits. Note that setting it to yes means that any
#: background processes still using the terminal can fail silently
#: because their stdout/stderr/stdin no longer work.

# remote_control_password

#: Allow other programs to control kitty using passwords. This option
#: can be specified multiple times to add multiple passwords. If no
#: passwords are present kitty will ask the user for permission if a
#: program tries to use remote control with a password. A password can
#: also *optionally* be associated with a set of allowed remote
#: control actions. For example::

#:     remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab

#: Only the specified actions will be allowed when using this
#: password. Glob patterns can be used too, for example::

#:     remote_control_password "my passphrase" set-tab-* resize-*

#: To get a list of available actions, run::

#:     kitty @ --help

#: A set of actions to be allowed when no password is sent can be
#: specified by using an empty password, for example::

#:     remote_control_password "" *-colors

#: Finally, the path to a python module can be specified that provides
#: a function is_cmd_allowed that is used to check every remote
#: control command. See rc_custom_auth
#: <https://sw.kovidgoyal.net/kitty/remote-control/#rc-custom-auth>
#: for details. For example::

#:     remote_control_password "my passphrase" my_rc_command_checker.py

#: Relative paths are resolved from the kitty configuration directory.

# allow_remote_control no

#: Allow other programs to control kitty. If you turn this on, other
#: programs can control all aspects of kitty, including sending text
#: to kitty windows, opening new windows, closing windows, reading the
#: content of windows, etc. Note that this even works over SSH
#: connections. The default setting of no prevents any form of remote
#: control. The meaning of the various values are:

#: password
#:    Remote control requests received over both the TTY device and the socket are
#:    confirmed based on passwords, see remote_control_password.

#: socket-only
#:    Remote control requests received over a socket are accepted unconditionally.
#:    Requests received over the TTY are denied. See listen_on.

#: socket
#:    Remote control requests received over a socket are accepted unconditionally.
#:    Requests received over the TTY are confirmed based on password.

#: no
#:    Remote control is completely disabled.

#: yes
#:    Remote control requests are always accepted.

# listen_on none

#: Listen to the specified UNIX socket for remote control connections.
#: Note that this will apply to all kitty instances. It can be
#: overridden by the kitty --listen-on command line option, which also
#: supports listening on a TCP socket. This option accepts only UNIX
#: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux).
#: Environment variables are expanded and relative paths are resolved
#: with respect to the temporary directory. If {kitty_pid} is present,
#: then it is replaced by the PID of the kitty process, otherwise the
#: PID of the kitty process is appended to the value, with a hyphen.
#: See the help for kitty --listen-on for more details. Note that this
#: will be ignored unless allow_remote_control is set to either: yes,
#: socket or socket-only. Changing this option by reloading the config
#: is not supported.

# env

#: Specify the environment variables to be set in all child processes.
#: Using the name with an equal sign (e.g. env VAR=) will set it to
#: the empty string. Specifying only the name (e.g. env VAR) will
#: remove the variable from the child process' environment. Note that
#: environment variables are expanded recursively, for example::

#:     env VAR1=a
#:     env VAR2=${HOME}/${VAR1}/b

#: The value of VAR2 will be <path to home directory>/a/b.

# watcher

#: Path to python file which will be loaded for watchers
#: <https://sw.kovidgoyal.net/kitty/launch/#watchers>. Can be
#: specified more than once to load multiple watchers. The watchers
#: will be added to every kitty window. Relative paths are resolved
#: relative to the kitty config directory. Note that reloading the
#: config will only affect windows created after the reload.

# exe_search_path

#: Control where kitty finds the programs to run. The default search
#: order is: First search the system wide PATH, then ~/.local/bin and
#: ~/bin. If still not found, the PATH defined in the login shell
#: after sourcing all its startup files is tried. Finally, if present,
#: the PATH specified by the env option is tried.

#: This option allows you to prepend, append, or remove paths from
#: this search order. It can be specified multiple times for multiple
#: paths. A simple path will be prepended to the search order. A path
#: that starts with the + sign will be append to the search order,
#: after ~/bin above. A path that starts with the - sign will be
#: removed from the entire search order. For example::

#:     exe_search_path /some/prepended/path
#:     exe_search_path +/some/appended/path
#:     exe_search_path -/some/excluded/path

# update_check_interval 24

#: The interval to periodically check if an update to kitty is
#: available (in hours). If an update is found, a system notification
#: is displayed informing you of the available update. The default is
#: to check every 24 hours, set to zero to disable. Update checking is
#: only done by the official binary builds. Distro packages or source
#: builds do not do update checking. Changing this option by reloading
#: the config is not supported.

# startup_session none

#: Path to a session file to use for all kitty instances. Can be
#: overridden by using the kitty --session command line option for
#: individual instances. See sessions
#: <https://sw.kovidgoyal.net/kitty/overview/#sessions> in the kitty
#: documentation for details. Note that relative paths are interpreted
#: with respect to the kitty config directory. Environment variables
#: in the path are expanded. Changing this option by reloading the
#: config is not supported.

# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask

#: Allow programs running in kitty to read and write from the
#: clipboard. You can control exactly which actions are allowed. The
#: possible actions are: write-clipboard, read-clipboard, write-
#: primary, read-primary, read-clipboard-ask, read-primary-ask. The
#: default is to allow writing to the clipboard and primary selection
#: and to ask for permission when a program tries to read from the
#: clipboard. Note that disabling the read confirmation is a security
#: risk as it means that any program, even the ones running on a
#: remote server via SSH can read your clipboard. See also
#: clipboard_max_size.

# clipboard_max_size 64

#: The maximum size (in MB) of data from programs running in kitty
#: that will be stored for writing to the system clipboard. A value of
#: zero means no size limit is applied. See also clipboard_control.

# file_transfer_confirmation_bypass

#: The password that can be supplied to the file transfer kitten
#: <https://sw.kovidgoyal.net/kitty/kittens/transfer/> to skip the
#: transfer confirmation prompt. This should only be used when
#: initiating transfers from trusted computers, over trusted networks
#: or encrypted transports, as it allows any programs running on the
#: remote machine to read/write to the local filesystem, without
#: permission.

# allow_hyperlinks yes

#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8
#: escape sequences are ignored. Otherwise they become clickable
#: links, that you can click with the mouse or by using the hints
#: kitten <https://sw.kovidgoyal.net/kitty/kittens/hints/>. The
#: special value of ask means that kitty will ask before opening the
#: link when clicked.

# shell_integration enabled

#: Enable shell integration on supported shells. This enables features
#: such as jumping to previous prompts, browsing the output of the
#: previous command in a pager, etc. on supported shells. Set to
#: disabled to turn off shell integration, completely. It is also
#: possible to disable individual features, set to a space separated
#: list of these values: no-rc, no-cursor, no-title, no-cwd, no-
#: prompt-mark, no-complete. See Shell integration
#: <https://sw.kovidgoyal.net/kitty/shell-integration/> for details.

# allow_cloning ask

#: Control whether programs running in the terminal can request new
#: windows to be created. The canonical example is clone-in-kitty
#: <https://sw.kovidgoyal.net/kitty/shell-integration/#clone-shell>.
#: By default, kitty will ask for permission for each clone request.
#: Allowing cloning unconditionally gives programs running in the
#: terminal (including over SSH) permission to execute arbitrary code,
#: as the user who is running the terminal, on the computer that the
#: terminal is running on.

# clone_source_strategies venv,conda,env_var,path

#: Control what shell code is sourced when running clone-in-kitty in
#: the newly cloned window. The supported strategies are:

#: venv
#:     Source the file $VIRTUAL_ENV/bin/activate. This is used by the
#:     Python stdlib venv module and allows cloning venvs automatically.
#: conda
#:     Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual
#:     environments created by conda.
#: env_var
#:     Execute the contents of the environment variable
#:     KITTY_CLONE_SOURCE_CODE with eval.
#: path
#:     Source the file pointed to by the environment variable
#:     KITTY_CLONE_SOURCE_PATH.

#: This option must be a comma separated list of the above values.
#: This only source the first valid one in the above order.

# term xterm-kitty

#: The value of the TERM environment variable to set. Changing this
#: can break many terminal programs, only change it if you know what
#: you are doing, not because you read some advice on "Stack Overflow"
#: to change it. The TERM variable is used by various programs to get
#: information about the capabilities and behavior of the terminal. If
#: you change it, depending on what programs you run, and how
#: different the terminal you are changing it to is, various things
#: from key-presses, to colors, to various advanced features may not
#: work. Changing this option by reloading the config will only affect
#: newly created windows.

#: }}}

#: OS specific tweaks {{{

# wayland_titlebar_color system

#: The color of the kitty window's titlebar on Wayland systems with
#: client side window decorations such as GNOME. A value of system
#: means to use the default system color, a value of background means
#: to use the background color of the currently active window and
#: finally you can use an arbitrary color, such as #12af59 or red.

# macos_titlebar_color system

#: The color of the kitty window's titlebar on macOS. A value of
#: system means to use the default system color, light or dark can
#: also be used to set it explicitly. A value of background means to
#: use the background color of the currently active window and finally
#: you can use an arbitrary color, such as #12af59 or red. WARNING:
#: This option works by using a hack when arbitrary color (or
#: background) is configured, as there is no proper Cocoa API for it.
#: It sets the background color of the entire window and makes the
#: titlebar transparent. As such it is incompatible with
#: background_opacity. If you want to use both, you are probably
#: better off just hiding the titlebar with hide_window_decorations.

# macos_option_as_alt no

#: Use the Option key as an Alt key on macOS. With this set to no,
#: kitty will use the macOS native Option+Key to enter Unicode
#: character behavior. This will break any Alt+Key keyboard shortcuts
#: in your terminal programs, but you can use the macOS Unicode input
#: technique. You can use the values: left, right or both to use only
#: the left, right or both Option keys as Alt, instead. Note that
#: kitty itself always treats Option the same as Alt. This means you
#: cannot use this option to configure different kitty shortcuts for
#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using
#: Option/Alt+Key will take priority, so that any such key presses
#: will not be passed to terminal programs running inside kitty.
#: Changing this option by reloading the config is not supported.

# macos_hide_from_tasks no

#: Hide the kitty window from running tasks on macOS (⌘+Tab and the
#: Dock). Changing this option by reloading the config is not
#: supported.

# macos_quit_when_last_window_closed no

#: Have kitty quit when all the top-level windows are closed on macOS.
#: By default, kitty will stay running, even with no open windows, as
#: is the expected behavior on macOS.

# macos_window_resizable yes

#: Disable this if you want kitty top-level OS windows to not be
#: resizable on macOS. Changing this option by reloading the config
#: will only affect newly created OS windows.

# macos_thicken_font 0

#: Draw an extra border around the font with the given width, to
#: increase legibility at small font sizes on macOS. For example, a
#: value of 0.75 will result in rendering that looks similar to sub-
#: pixel antialiasing at common font sizes.

# macos_traditional_fullscreen no

#: Use the macOS traditional full-screen transition, that is faster,
#: but less pretty.

# macos_show_window_title_in all

#: Control where the window title is displayed on macOS. A value of
#: window will show the title of the currently active window at the
#: top of the macOS window. A value of menubar will show the title of
#: the currently active window in the macOS global menu bar, making
#: use of otherwise wasted space. A value of all will show the title
#: in both places, and none hides the title. See
#: macos_menubar_title_max_length for how to control the length of the
#: title in the menu bar.

# macos_menubar_title_max_length 0

#: The maximum number of characters from the window title to show in
#: the macOS global menu bar. Values less than one means that there is
#: no maximum limit.

# macos_custom_beam_cursor no

#: Use a custom mouse cursor for macOS that is easier to see on both
#: light and dark backgrounds. Nowadays, the default macOS cursor
#: already comes with a white border. WARNING: this might make your
#: mouse cursor invisible on dual GPU machines. Changing this option
#: by reloading the config is not supported.

# macos_colorspace srgb

#: The colorspace in which to interpret terminal colors. The default
#: of srgb will cause colors to match those seen in web browsers. The
#: value of default will use whatever the native colorspace of the
#: display is. The value of displayp3 will use Apple's special
#: snowflake display P3 color space, which will result in over
#: saturated (brighter) colors with some color shift. Reloading
#: configuration will change this value only for newly created OS
#: windows.

# linux_display_server auto

#: Choose between Wayland and X11 backends. By default, an appropriate
#: backend based on the system state is chosen automatically. Set it
#: to x11 or wayland to force the choice. Changing this option by
#: reloading the config is not supported.

#: }}}

#: Keyboard shortcuts {{{

#: Keys are identified simply by their lowercase Unicode characters.
#: For example: a for the A key, [ for the left square bracket key,
#: etc. For functional keys, such as Enter or Escape, the names are
#: present at Functional key definitions
#: <https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional>.
#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt
#: (opt, option, ⌥), super (cmd, command, ⌘). See also: GLFW mods
#: <https://www.glfw.org/docs/latest/group__mods.html>

#: On Linux you can also use XKB key names to bind keys that are not
#: supported by GLFW. See XKB keys
#: <https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-
#: keysyms.h> for a list of key names. The name to use is the part
#: after the XKB_KEY_ prefix. Note that you can only use an XKB key
#: name for keys that are not known as GLFW keys.

#: Finally, you can use raw system key codes to map keys, again only
#: for keys that are not known as GLFW keys. To see the system key
#: code for a key, start kitty with the kitty --debug-input option,
#: kitty will output some debug text for every key event. In that text
#: look for native_code, the value of that becomes the key name in the
#: shortcut. For example:

#: .. code-block:: none

#:     on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a'

#: Here, the key name for the A key is 0x61 and you can use it with::

#:     map ctrl+0x61 something

#: to map Ctrl+A to something.

#: You can use the special action no_op to unmap a keyboard shortcut
#: that is assigned in the default configuration::

#:     map kitty_mod+space no_op

#: If you would like kitty to completely ignore a key event, not even
#: sending it to the program running in the terminal, map it to
#: discard_event::

#:     map kitty_mod+f1 discard_event

#: You can combine multiple actions to be triggered by a single
#: shortcut with combine action, using the syntax below::

#:     map key combine <separator> action1 <separator> action2 <separator> action3 ...

#: For example::

#:     map kitty_mod+e combine : new_window : next_layout

#: This will create a new window and switch to the next available
#: layout.

#: You can use multi-key shortcuts with the syntax shown below::

#:     map key1>key2>key3 action

#: For example::

#:     map ctrl+f>2 set_font_size 20

#: The full list of actions that can be mapped to key presses is
#: available here <https://sw.kovidgoyal.net/kitty/actions/>.

# kitty_mod ctrl+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.

# clear_all_shortcuts no

#: Remove all shortcut definitions up to this point. Useful, for
#: instance, to remove the default shortcuts.

# action_alias

#: E.g. action_alias launch_tab launch --type=tab --cwd=current

#: Define action aliases to avoid repeating the same options in
#: multiple mappings. Aliases can be defined for any action and will
#: be expanded recursively. For example, the above alias allows you to
#: create mappings to launch a new tab in the current working
#: directory without duplication::

#:     map f1 launch_tab vim
#:     map f2 launch_tab emacs

#: Similarly, to alias kitten invocation::

#:     action_alias hints kitten hints --hints-offset=0

# kitten_alias

#: E.g. kitten_alias hints hints --hints-offset=0

#: Like action_alias above, but specifically for kittens. Generally,
#: prefer to use action_alias. This option is a legacy version,
#: present for backwards compatibility. It causes all invocations of
#: the aliased kitten to be substituted. So the example above will
#: cause all invocations of the hints kitten to have the --hints-
#: offset=0 option applied.

#: Clipboard {{{

#: Copy to clipboard

# map kitty_mod+c copy_to_clipboard
# map cmd+c       copy_to_clipboard

#::  There is also a copy_or_interrupt action that can be optionally
#::  mapped to Ctrl+C. It will copy only if there is a selection and
#::  send an interrupt otherwise. Similarly,
#::  copy_and_clear_or_interrupt will copy and clear the selection or
#::  send an interrupt if there is no selection.

#: Paste from clipboard

# map kitty_mod+v paste_from_clipboard
# map cmd+v       paste_from_clipboard

#: Paste from selection

# map kitty_mod+s  paste_from_selection
# map shift+insert paste_from_selection

#: Pass selection to program

# map kitty_mod+o pass_selection_to_program

#::  You can also pass the contents of the current selection to any
#::  program with pass_selection_to_program. By default, the system's
#::  open program is used, but you can specify your own, the selection
#::  will be passed as a command line argument to the program. For
#::  example::

#::      map kitty_mod+o pass_selection_to_program firefox

#::  You can pass the current selection to a terminal program running
#::  in a new kitty window, by using the @selection placeholder::

#::      map kitty_mod+y new_window less @selection

#: }}}

#: Scrolling {{{

#: Scroll line up

# map kitty_mod+up    scroll_line_up
# map kitty_mod+k     scroll_line_up
# map opt+cmd+page_up scroll_line_up
# map cmd+up          scroll_line_up

#: Scroll line down

# map kitty_mod+down    scroll_line_down
# map kitty_mod+j       scroll_line_down
# map opt+cmd+page_down scroll_line_down
# map cmd+down          scroll_line_down

#: Scroll page up

# map kitty_mod+page_up scroll_page_up
# map cmd+page_up       scroll_page_up

#: Scroll page down

# map kitty_mod+page_down scroll_page_down
# map cmd+page_down       scroll_page_down

#: Scroll to top

# map kitty_mod+home scroll_home
# map cmd+home       scroll_home

#: Scroll to bottom

# map kitty_mod+end scroll_end
# map cmd+end       scroll_end

#: Scroll to previous shell prompt

# map kitty_mod+z scroll_to_prompt -1

#::  Use a parameter of 0 for scroll_to_prompt to scroll to the last
#::  jumped to or the last clicked position. Requires shell
#::  integration <https://sw.kovidgoyal.net/kitty/shell-integration/>
#::  to work.

#: Scroll to next shell prompt

# map kitty_mod+x scroll_to_prompt 1

#: Browse scrollback buffer in pager

# map kitty_mod+h show_scrollback

#::  You can pipe the contents of the current screen and history
#::  buffer as STDIN to an arbitrary program using launch --stdin-
#::  source. For example, the following opens the scrollback buffer in
#::  less in an overlay window::

#::      map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R

#::  For more details on piping screen and buffer contents to external
#::  programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>.

#: Browse output of the last shell command in pager

# map kitty_mod+g show_last_command_output

#::  You can also define additional shortcuts to get the command
#::  output. For example, to get the first command output on screen::

#::      map f1 show_first_command_output_on_screen

#::  To get the command output that was last accessed by a keyboard
#::  action or mouse action::

#::      map f1 show_last_visited_command_output

#::  You can pipe the output of the last command run in the shell
#::  using the launch action. For example, the following opens the
#::  output in less in an overlay window::

#::      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
#::  @first_cmd_output_on_screen. To get the output of the last jumped
#::  to command, use @last_visited_cmd_output.

#::  Requires shell integration
#::  <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.

#: }}}

#: Window management {{{

#: New window

# map kitty_mod+enter new_window
# map cmd+enter       new_window

#::  You can open a new kitty window running an arbitrary program, for
#::  example::

#::      map kitty_mod+y launch mutt

#::  You can open a new window with the current working directory set
#::  to the working directory of the current window using::

#::      map ctrl+alt+enter launch --cwd=current

#::  You can open a new window that is allowed to control kitty via
#::  the kitty remote control facility with launch --allow-remote-
#::  control. Any programs running in that window will be allowed to
#::  control kitty. For example::

#::      map ctrl+enter launch --allow-remote-control some_program

#::  You can open a new window next to the currently active window or
#::  as the first window, with::

#::      map ctrl+n launch --location=neighbor
#::      map ctrl+f launch --location=first

#::  For more details, see launch
#::  <https://sw.kovidgoyal.net/kitty/launch/>.

#: New OS window

# map kitty_mod+n new_os_window
# map cmd+n       new_os_window

#::  Works like new_window above, except that it opens a top-level OS
#::  window. In particular you can use new_os_window_with_cwd to open
#::  a window with the current working directory.

#: Close window

# map kitty_mod+w close_window
# map shift+cmd+d close_window

#: Next window

# map kitty_mod+] next_window

#: Previous window

# map kitty_mod+[ previous_window

#: Move window forward

# map kitty_mod+f move_window_forward

#: Move window backward

# map kitty_mod+b move_window_backward

#: Move window to top

# map kitty_mod+` move_window_to_top

#: Start resizing window

# map kitty_mod+r start_resizing_window
# map cmd+r       start_resizing_window

#: First window

# map kitty_mod+1 first_window
# map cmd+1       first_window

#: Second window

# map kitty_mod+2 second_window
# map cmd+2       second_window

#: Third window

# map kitty_mod+3 third_window
# map cmd+3       third_window

#: Fourth window

# map kitty_mod+4 fourth_window
# map cmd+4       fourth_window

#: Fifth window

# map kitty_mod+5 fifth_window
# map cmd+5       fifth_window

#: Sixth window

# map kitty_mod+6 sixth_window
# map cmd+6       sixth_window

#: Seventh window

# map kitty_mod+7 seventh_window
# map cmd+7       seventh_window

#: Eight window

# map kitty_mod+8 eighth_window
# map cmd+8       eighth_window

#: Ninth window

# map kitty_mod+9 ninth_window
# map cmd+9       ninth_window

#: Tenth window

# map kitty_mod+0 tenth_window

#: Visually select and focus window

# map kitty_mod+f7 focus_visible_window

#::  Display overlay numbers and alphabets on the window, and switch
#::  the focus to the window when you press the key. When there are
#::  only two windows, the focus will be switched directly without
#::  displaying the overlay. You can change the overlay characters and
#::  their order with option visual_window_select_characters.

#: Visually swap window with another

# map kitty_mod+f8 swap_with_window

#::  Works like focus_visible_window above, but swaps the window.

#: }}}

#: Tab management {{{

#: Next tab

# map kitty_mod+right next_tab
# map shift+cmd+]     next_tab
# map ctrl+tab        next_tab

#: Previous tab

# map kitty_mod+left previous_tab
# map shift+cmd+[    previous_tab
# map ctrl+shift+tab previous_tab

#: New tab

# map kitty_mod+t new_tab
# map cmd+t       new_tab

#: Close tab

# map kitty_mod+q close_tab
# map cmd+w       close_tab

#: Close OS window

# map shift+cmd+w close_os_window

#: Move tab forward

# map kitty_mod+. move_tab_forward

#: Move tab backward

# map kitty_mod+, move_tab_backward

#: Set tab title

# map kitty_mod+alt+t set_tab_title
# map shift+cmd+i     set_tab_title


#: You can also create shortcuts to go to specific tabs, with 1 being
#: 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::

#:     map ctrl+alt+1 goto_tab 1
#:     map ctrl+alt+2 goto_tab 2

#: 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.
#: Finally, if you want the new tab to open next to the current tab
#: rather than at the end of the tabs list, use::

#:     map ctrl+t new_tab !neighbor [optional cmd to run]
#: }}}

#: Layout management {{{

#: Next layout

# map kitty_mod+l next_layout


#: You can also create shortcuts to switch to specific layouts::

#:     map ctrl+alt+t goto_layout tall
#:     map ctrl+alt+s goto_layout stack

#: Similarly, to switch back to the previous layout::

#:     map ctrl+alt+p last_used_layout

#: There is also a toggle_layout action that switches to the named
#: layout or back to the previous layout if in the named layout.
#: Useful to temporarily "zoom" the active window by switching to the
#: stack layout::

#:     map ctrl+alt+z toggle_layout stack
#: }}}

#: Font sizes {{{

#: You can change the font size for all top-level kitty OS windows at
#: a time or only the current one.

#: Increase font size

# map kitty_mod+equal  change_font_size all +2.0
# map kitty_mod+plus   change_font_size all +2.0
# map kitty_mod+kp_add 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 shift+cmd+equal  change_font_size all +2.0

#: Decrease font size

# map kitty_mod+minus       change_font_size all -2.0
# map kitty_mod+kp_subtract 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

#: Reset font size

# map kitty_mod+backspace change_font_size all 0
# map cmd+0               change_font_size all 0


#: To setup shortcuts for specific font sizes::

#:     map kitty_mod+f6 change_font_size all 10.0

#: To setup shortcuts to change only the current OS window's font
#: size::

#:     map kitty_mod+f6 change_font_size current 10.0
#: }}}

#: Select and act on visible text {{{

#: Use the hints kitten to select text and either pass it to an
#: external program or insert it into the terminal or copy it to the
#: clipboard.

#: Open URL

# map kitty_mod+e open_url_with_hints

#::  Open a currently visible URL using the keyboard. The program used
#::  to open the URL is specified in open_url_with.

#: Insert selected path

# map kitty_mod+p>f kitten hints --type path --program -

#::  Select a path/filename and insert it into the terminal. Useful,
#::  for instance to run git commands on a filename output from a
#::  previous git command.

#: Open selected path

# map kitty_mod+p>shift+f kitten hints --type path

#::  Select a path/filename and open it with the default open program.

#: Insert selected line

# map kitty_mod+p>l kitten hints --type line --program -

#::  Select a line of text and insert it into the terminal. Useful for
#::  the output of things like: `ls -1`.

#: Insert selected word

# map kitty_mod+p>w kitten hints --type word --program -

#::  Select words and insert into terminal.

#: Insert selected hash

# map kitty_mod+p>h kitten hints --type hash --program -

#::  Select something that looks like a hash and insert it into the
#::  terminal. Useful with git, which uses SHA1 hashes to identify
#::  commits.

#: Open the selected file at the selected line

# map kitty_mod+p>n kitten hints --type linenum

#::  Select something that looks like filename:linenum and open it in
#::  vim at the specified line number.

#: Open the selected hyperlink

# map kitty_mod+p>y kitten hints --type hyperlink

#::  Select a hyperlink (i.e. a URL that has been marked as such by
#::  the terminal program, for example, by `ls --hyperlink=auto`).


#: The hints kitten has many more modes of operation that you can map
#: to different shortcuts. For a full description see hints kitten
#: <https://sw.kovidgoyal.net/kitty/kittens/hints/>.
#: }}}

#: Miscellaneous {{{

#: Show documentation

# map kitty_mod+f1 show_kitty_doc overview

#: Toggle fullscreen

# map kitty_mod+f11 toggle_fullscreen
# map ctrl+cmd+f    toggle_fullscreen

#: Toggle maximized

# map kitty_mod+f10 toggle_maximized

#: Toggle macOS secure keyboard entry

# map opt+cmd+s toggle_macos_secure_keyboard_entry

#: Unicode input

# map kitty_mod+u    kitten unicode_input
# map ctrl+cmd+space kitten unicode_input

#: Edit config file

# map kitty_mod+f2 edit_config_file
# map cmd+,        edit_config_file

#: Open the kitty command shell

# map kitty_mod+escape kitty_shell window

#::  Open the kitty shell in a new window / tab / overlay / os_window
#::  to control kitty using commands.

#: Increase background opacity

# map kitty_mod+a>m set_background_opacity +0.1

#: Decrease background opacity

# map kitty_mod+a>l set_background_opacity -0.1

#: Make background fully opaque

# map kitty_mod+a>1 set_background_opacity 1

#: Reset background opacity

# map kitty_mod+a>d set_background_opacity default

#: Reset the terminal

# map kitty_mod+delete clear_terminal reset active
# map opt+cmd+r        clear_terminal reset active

#::  You can create shortcuts to clear/reset the terminal. For
#::  example::

#::      # Reset the terminal
#::      map f1 clear_terminal reset active
#::      # Clear the terminal screen by erasing all contents
#::      map f1 clear_terminal clear active
#::      # Clear the terminal scrollback by erasing it
#::      map f1 clear_terminal scrollback active
#::      # Scroll the contents of the screen into the scrollback
#::      map f1 clear_terminal scroll active
#::      # Clear everything up to the line with the cursor
#::      map f1 clear_terminal to_cursor active

#::  If you want to operate on all kitty windows instead of just the
#::  current one, use all instead of active.

#::  It is also possible to remap Ctrl+L to both scroll the current
#::  screen contents into the scrollback buffer and clear the screen,
#::  instead of just clearing the screen, for example, for ZSH add the
#::  following to ~/.zshrc:

#::  .. code-block:: zsh

#::      scroll-and-clear-screen() {
#::          printf '\n%.0s' {1..$LINES}
#::          zle clear-screen
#::      }
#::      zle -N scroll-and-clear-screen
#::      bindkey '^l' scroll-and-clear-screen

#: Clear up to cursor line

# map cmd+k clear_terminal to_cursor active

#: Reload kitty.conf

# map kitty_mod+f5 load_config_file
# map ctrl+cmd+,   load_config_file

#::  Reload kitty.conf, applying any changes since the last time it
#::  was loaded. Note that a handful of options cannot be dynamically
#::  changed and require a full restart of kitty. Particularly, when
#::  changing shortcuts for actions located on the macOS global menu
#::  bar, a full restart is needed. You can also map a keybinding to
#::  load a different config file, for example::

#::      map f5 load_config /path/to/alternative/kitty.conf

#::  Note that all options from the original kitty.conf are discarded,
#::  in other words the new configuration *replace* the old ones.

#: Debug kitty configuration

# map kitty_mod+f6 debug_config
# map opt+cmd+,    debug_config

#::  Show details about exactly what configuration kitty is running
#::  with and its host environment. Useful for debugging issues.

#: Send arbitrary text on key presses

#::  E.g. map ctrl+shift+alt+h send_text all Hello World

#::  You can tell kitty to send arbitrary (UTF-8) encoded text to the
#::  client program when pressing specified shortcut keys. For
#::  example::

#::      map ctrl+alt+a send_text all Special text

#::  This will send "Special text" when you press the Ctrl+Alt+A key
#::  combination. The text to be sent is a python string literal so
#::  you can use escapes like \x1b to send control codes or \u21fb to
#::  send Unicode characters (or you can just input the Unicode
#::  characters directly as UTF-8 text). You can use `kitty +kitten
#::  show_key` to get the key escape codes you want to emulate.

#::  The first argument to send_text is the keyboard modes in which to
#::  activate the shortcut. The possible values are normal,
#::  application, kitty or a comma separated combination of them. The
#::  modes normal and application refer to the DECCKM cursor key mode
#::  for terminals, and kitty refers to the kitty extended keyboard
#::  protocol. The special value all means all of them.

#::  Some more examples::

#::      # Output a word and move the cursor to the start of the line (like typing and pressing Home)
#::      map ctrl+alt+a send_text normal Word\x1b[H
#::      map ctrl+alt+a send_text application Word\x1bOH
#::      # Run a command at a shell prompt (like typing the command and pressing Enter)
#::      map ctrl+alt+a send_text normal,application some command with arguments\r

#: Open kitty Website

# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/

#: }}}

#: }}}


================================================
FILE: nvim/init.vim
================================================
set notermguicolors t_Co=16
set number
set autoindent
set selection=inclusive

if (has("termguicolors"))
  set termguicolors
endif

call plug#begin('~/.vim/plugged')

Plug 'neoclide/coc.nvim', {'branch': 'release'}

Plug 'nvim-tree/nvim-web-devicons' " optional, for file icons
Plug 'nvim-tree/nvim-tree.lua'

Plug 'nvim-tree/nvim-web-devicons'
Plug 'romgrk/barbar.nvim'

Plug 'psliwka/termcolors.nvim'

Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'

" For vsnip users.
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip'

Plug 'catppuccin/nvim', { 'as': 'catppuccin' }

Plug 'tmsvg/pear-tree'

Plug 'mfussenegger/nvim-dap'
Plug 'mfussenegger/nvim-dap'
Plug 'rcarriga/nvim-dap-ui'

Plug 'mfussenegger/nvim-dap'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'theHamsta/nvim-dap-virtual-text'

Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'antoinemadec/FixCursorHold.nvim'
Plug 'nvim-neotest/neotest'

Plug 'liuchengxu/vim-clap'

" Build the extra binary if cargo exists on your system.
Plug 'liuchengxu/vim-clap', { 'do': ':Clap install-binary' }

" The bang version will try to download the prebuilt binary if cargo does not exist.
Plug 'liuchengxu/vim-clap', { 'do': ':Clap install-binary!' }

" :Clap install-binary[!] will always try to compile the binary locally,
" if you do care about the disk used for the compilation, try using the force download way,
" which will download the prebuilt binary even you have installed cargo.
Plug 'liuchengxu/vim-clap', { 'do': { -> clap#installer#force_download() } }

" `:Clap install-binary[!]` will run using the terminal feature which is inherently async.
" If you don't want that and hope to run the hook synchorously:
Plug 'liuchengxu/vim-clap', { 'do': has('win32') ? 'cargo build --release' : 'make' }

Plug 'nvim-lualine/lualine.nvim'
" If you want to have icons in your statusline choose one of these
Plug 'kyazdani42/nvim-web-devicons'
Plug 'norcalli/nvim-colorizer.lua'

Plug 'elkowar/yuck.vim'
call plug#end()

set completeopt=menu,menuone,noselect

let bufferline = get(g:, 'bufferline', {})
let bufferline.icon_separator_active = '▎'
let bufferline.icon_separator_inactive = '▎'

lua << EOF

-- examples for your init.lua

-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1

-- set termguicolors to enable highlight groups
vim.opt.termguicolors = true

-- empty setup using defaults
require("nvim-tree").setup()
EOF

lua << EOF
  -- Set up nvim-cmp.
  local cmp = require'cmp'

  cmp.setup({
    snippet = {
      -- REQUIRED - you must specify a snippet engine
      expand = function(args)
        vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
        -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
        -- require('snippy').expand_snippet(args.body) -- For `snippy` users.
        -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
      end,
    },
    window = {
      -- completion = cmp.config.window.bordered(),
      -- documentation = cmp.config.window.bordered(),
    },
    mapping = cmp.mapping.preset.insert({
      ['<C-b>'] = cmp.mapping.scroll_docs(-4),
      ['<C-f>'] = cmp.mapping.scroll_docs(4),
      ['<C-Space>'] = cmp.mapping.complete(),
      ['<C-e>'] = cmp.mapping.abort(),
      ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
    }),
    sources = cmp.config.sources({
      { name = 'nvim_lsp' },
      { name = 'vsnip' }, -- For vsnip users.
      -- { name = 'luasnip' }, -- For luasnip users.
      -- { name = 'ultisnips' }, -- For ultisnips users.
      -- { name = 'snippy' }, -- For snippy users.
    }, {
      { name = 'buffer' },
    })
  })

  -- Set configuration for specific filetype.
  cmp.setup.filetype('gitcommit', {
    sources = cmp.config.sources({
      { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
    }, {
      { name = 'buffer' },
    })
  })

  -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
  cmp.setup.cmdline({ '/', '?' }, {
    mapping = cmp.mapping.preset.cmdline(),
    sources = {
      { name = 'buffer' }
    }
  })

  -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
  cmp.setup.cmdline(':', {
    mapping = cmp.mapping.preset.cmdline(),
    sources = cmp.config.sources({
      { name = 'path' }
    }, {
      { name = 'cmdline' }
    })
  })

  -- Set up lspconfig.
  local capabilities = require('cmp_nvim_lsp').default_capabilities()
  -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
  require('lspconfig')['clangd'].setup {
    capabilities = capabilities
  }
EOF

lua << EOF
local dap = require('dap')
dap.adapters.cppdbg = {
  id = 'cppdbg',
  type = 'executable',
  command = 'debug-adapters/extension/debugAdapters/bin/OpenDebugAD7',
}
EOF

lua << EOF
local dap = require('dap')
dap.configurations.c = {
  {
    name = "Launch file",
    type = "cppdbg",
    request = "launch",
    program = function()
      return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
    end,
    cwd = '${workspaceFolder}',
    stopAtEntry = true,
  },
  {
    name = 'Attach to gdbserver :1234',
    type = 'cppdbg',
    request = 'launch',
    MIMode = 'gdb',
    miDebuggerServerAddress = 'localhost:1234',
    miDebuggerPath = '/usr/bin/gdb',
    cwd = '${workspaceFolder}',
    program = function()
      return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
    end,
  },
}
EOF

lua << EOF
require("catppuccin").setup({
    flavour = "mocha", -- latte, frappe, macchiato, mocha
    background = { -- :h background
        light = "latte",
        dark = "mocha",
    },
    transparent_background = false,
    show_end_of_buffer = false, -- show the '~' characters after the end of buffers
    term_colors = false,
    dim_inactive = {
        enabled = false,
        shade = "dark",
        percentage = 0.15,
    },
    no_italic = false, -- Force no italic
    no_bold = false, -- Force no bold
    styles = {
        comments = { "italic" },
        conditionals = { "italic" },
        loops = {},
        functions = {},
        keywords = {},
        strings = {},
        variables = {},
        numbers = {},
        booleans = {},
        properties = {},
        types = {},
        operators = {},
    },
    color_overrides = {},
    custom_highlights = {},
    integrations = {
        cmp = true,
        gitsigns = true,
        nvimtree = true,
        telescope = true,
        notify = false,
        mini = false,
        -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
    },
})
EOF


lua << EOF
require('lualine').setup {
options = {
  component_separators = '|',
  section_separators = { left = '', right = '' },
  theme = "catppuccin"
},
sections = {
    lualine_a = {
      { 'mode', separator = { left = '' }, right_padding = 2 },
    },
    lualine_b = { 'filename', 'branch' },
    lualine_c = { 'fileformat' },
    lualine_x = {},
    lualine_y = { 'filetype', 'progress' },
    lualine_z = {
      { 'location', separator = { right = '' }, left_padding = 2 },
    },
  },
  inactive_sections = {
    lualine_a = { 'filename' },
    lualine_b = {},
    lualine_c = {},
    lualine_x = {},
    lualine_y = {},
    lualine_z = { 'location' },
  },
  tabline = {},
  extensions = {},
}
EOF

colorscheme catppuccin-mocha


================================================
FILE: nvim/keymappings.lua
================================================
map({ "n", "<F4>", ":lua require('dapui').toggle()<CR>" })
map({ "n", "<F5>", ":lua require('dap').toggle_breakpoint()<CR>" })
map({ "n", "<F9>", ":lua require('dap').continue()<CR>" })

map({ "n", "<F1>", ":lua require('dap').step_over()<CR>" })
map({ "n", "<F2>", ":lua require('dap').step_into()<CR>" })
map({ "n", "<F3>", ":lua require('dap').step_out()<CR>" })

map({ "n", "<Leader>dsc", ":lua require('dap').continue()<CR>" })
map({ "n", "<Leader>dsv", ":lua require('dap').step_over()<CR>" })
map({ "n", "<Leader>dsi", ":lua require('dap').step_into()<CR>" })
map({ "n", "<Leader>dso", ":lua require('dap').step_out()<CR>" })

map({ "n", "<Leader>dhh", ":lua require('dap.ui.variables').hover()<CR>" })
map({ "v", "<Leader>dhv", ":lua require('dap.ui.variables').visual_hover()<CR>" })

map({ "n", "<Leader>duh", ":lua require('dap.ui.widgets').hover()<CR>" })
map({ "n", "<Leader>duf", ":lua local widgets=require('dap.ui.widgets');widgets.centered_float(widgets.scopes)<CR>" })

map({ "n", "<Leader>dro", ":lua require('dap').repl.open()<CR>" })
map({ "n", "<Leader>drl", ":lua require('dap').repl.run_last()<CR>" })

map({ "n", "<Leader>dbc", ":lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>" })
map({ "n", "<Leader>dbm", ":lua require('dap').set_breakpoint({ nil, nil, vim.fn.input('Log point message: ') })<CR>" })
map({ "n", "<Leader>dbt", ":lua require('dap').toggle_breakpoint()<CR>" })

map({ "n", "<Leader>dc", ":lua require('dap.ui.variables').scopes()<CR>" })
map({ "n", "<Leader>di", ":lua require('dapui').toggle()<CR>" })



================================================
FILE: ranger/commands.py
================================================
# This is a sample commands.py.  You can add your own commands here.
#
# Please refer to commands_full.py for all the default commands and a complete
# documentation.  Do NOT add them all here, or you may end up with defunct
# commands when upgrading ranger.

# A simple command for demonstration purposes follows.
# -----------------------------------------------------------------------------

from __future__ import (absolute_import, division, print_function)

# You can import any python module as needed.
import os

# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import Command


# Any class that is a subclass of "Command" will be integrated into ranger as a
# command.  Try typing ":my_edit<ENTER>" in ranger!
class my_edit(Command):
    # The so-called doc-string of the class will be visible in the built-in
    # help that is accessible by typing "?c" inside ranger.
    """:my_edit <filename>

    A sample command for demonstration purposes that opens a file in an editor.
    """

    # The execute method is called when you run this command in ranger.
    def execute(self):
        # self.arg(1) is the first (space-separated) argument to the function.
        # This way you can write ":my_edit somefilename<ENTER>".
        if self.arg(1):
            # self.rest(1) contains self.arg(1) and everything that follows
            target_filename = self.rest(1)
        else:
            # self.fm is a ranger.core.filemanager.FileManager object and gives
            # you access to internals of ranger.
            # self.fm.thisfile is a ranger.container.file.File object and is a
            # reference to the currently selected file.
            target_filename = self.fm.thisfile.path

        # This is a generic function to print text in ranger.
        self.fm.notify("Let's edit the file " + target_filename + "!")

        # Using bad=True in fm.notify allows you to print error messages:
        if not os.path.exists(target_filename):
            self.fm.notify("The given file does not exist!", bad=True)
            return

        # This executes a function from ranger.core.acitons, a module with a
        # variety of subroutines that can help you construct commands.
        # Check out the source, or run "pydoc ranger.core.actions" for a list.
        self.fm.edit_file(target_filename)

    # The tab method is called when you press tab, and should return a list of
    # suggestions that the user will tab through.
    # tabnum is 1 for <TAB> and -1 for <S-TAB> by default
    def tab(self, tabnum):
        # This is a generic tab-completion function that iterates through the
        # content of the current directory.
        return self._tab_directory_content()


================================================
FILE: ranger/commands_full.py
================================================
# -*- coding: utf-8 -*-
# This file is part of ranger, the console file manager.
# This configuration file is licensed under the same terms as ranger.
# ===================================================================
#
# NOTE: If you copied this file to /etc/ranger/commands_full.py or
# ~/.config/ranger/commands_full.py, then it will NOT be loaded by ranger,
# and only serve as a reference.
#
# ===================================================================
# This file contains ranger's commands.
# It's all in python; lines beginning with # are comments.
#
# Note that additional commands are automatically generated from the methods
# of the class ranger.core.actions.Actions.
#
# You can customize commands in the files /etc/ranger/commands.py (system-wide)
# and ~/.config/ranger/commands.py (per user).
# They have the same syntax as this file.  In fact, you can just copy this
# file to ~/.config/ranger/commands_full.py with
# `ranger --copy-config=commands_full' and make your modifications, don't
# forget to rename it to commands.py.  You can also use
# `ranger --copy-config=commands' to copy a short sample commands.py that
# has everything you need to get started.
# But make sure you update your configs when you update ranger.
#
# ===================================================================
# Every class defined here which is a subclass of `Command' will be used as a
# command in ranger.  Several methods are defined to interface with ranger:
#   execute():   called when the command is executed.
#   cancel():    called when closing the console.
#   tab(tabnum): called when <TAB> is pressed.
#   quick():     called after each keypress.
#
# tab() argument tabnum is 1 for <TAB> and -1 for <S-TAB> by default
#
# The return values for tab() can be either:
#   None: There is no tab completion
#   A string: Change the console to this string
#   A list/tuple/generator: cycle through every item in it
#
# The return value for quick() can be:
#   False: Nothing happens
#   True: Execute the command afterwards
#
# The return value for execute() and cancel() doesn't matter.
#
# ===================================================================
# Commands have certain attributes and methods that facilitate parsing of
# the arguments:
#
# self.line: The whole line that was written in the console.
# self.args: A list of all (space-separated) arguments to the command.
# self.quantifier: If this command was mapped to the key "X" and
#      the user pressed 6X, self.quantifier will be 6.
# self.arg(n): The n-th argument, or an empty string if it doesn't exist.
# self.rest(n): The n-th argument plus everything that followed.  For example,
#      if the command was "search foo bar a b c", rest(2) will be "bar a b c"
# self.start(n): Anything before the n-th argument.  For example, if the
#      command was "search foo bar a b c", start(2) will be "search foo"
#
# ===================================================================
# And this is a little reference for common ranger functions and objects:
#
# self.fm: A reference to the "fm" object which contains most information
#      about ranger.
# self.fm.notify(string): Print the given string on the screen.
# self.fm.notify(string, bad=True): Print the given string in RED.
# self.fm.reload_cwd(): Reload the current working directory.
# self.fm.thisdir: The current working directory. (A File object.)
# self.fm.thisfile: The current file. (A File object too.)
# self.fm.thistab.get_selection(): A list of all selected files.
# self.fm.execute_console(string): Execute the string as a ranger command.
# self.fm.open_console(string): Open the console with the given string
#      already typed in for you.
# self.fm.move(direction): Moves the cursor in the given direction, which
#      can be something like down=3, up=5, right=1, left=1, to=6, ...
#
# File objects (for example self.fm.thisfile) have these useful attributes and
# methods:
#
# tfile.path: The path to the file.
# tfile.basename: The base name only.
# tfile.load_content(): Force a loading of the directories content (which
#      obviously works with directories only)
# tfile.is_directory: True/False depending on whether it's a directory.
#
# For advanced commands it is unavoidable to dive a bit into the source code
# of ranger.
# ===================================================================

from __future__ import (absolute_import, division, print_function)

from collections import deque
import os
import re

from ranger.api.commands import Command


class alias(Command):
    """:alias <newcommand> <oldcommand>

    Copies the oldcommand as newcommand.
    """

    context = 'browser'
    resolve_macros = False

    def execute(self):
        if not self.arg(1) or not self.arg(2):
            self.fm.notify('Syntax: alias <newcommand> <oldcommand>', bad=True)
            return

        self.fm.commands.alias(self.arg(1), self.rest(2))


class echo(Command):
    """:echo <text>

    Display the text in the statusbar.
    """

    def execute(self):
        self.fm.notify(self.rest(1))


class cd(Command):
    """:cd [-r] <path>

    The cd command changes the directory.
    If the path is a file, selects that file.
    The command 'cd -' is equivalent to typing ``.
    Using the option "-r" will get you to the real path.
    """

    def execute(self):
        if self.arg(1) == '-r':
            self.shift()
            destination = os.path.realpath(self.rest(1))
            if os.path.isfile(destination):
                self.fm.select_file(destination)
                return
        else:
            destination = self.rest(1)

        if not destination:
            destination = '~'

        if destination == '-':
            self.fm.enter_bookmark('`')
        else:
            self.fm.cd(destination)

    def _tab_args(self):
        # dest must be rest because path could contain spaces
        if self.arg(1) == '-r':
            start = self.start(2)
            dest = self.rest(2)
        else:
            start = self.start(1)
            dest = self.rest(1)

        if dest:
            head, tail = os.path.split(os.path.expanduser(dest))
            if head:
                dest_exp = os.path.join(os.path.normpath(head), tail)
            else:
                dest_exp = tail
        else:
            dest_exp = ''
        return (start, dest_exp, os.path.join(self.fm.thisdir.path, dest_exp),
                dest.endswith(os.path.sep))

    @staticmethod
    def _tab_paths(dest, dest_abs, ends_with_sep):
        if not dest:
            try:
                return next(os.walk(dest_abs))[1], dest_abs
            except (OSError, StopIteration):
                return [], ''

        if ends_with_sep:
            try:
                return [os.path.join(dest, path) for path in next(os.walk(dest_abs))[1]], ''
            except (OSError, StopIteration):
                return [], ''

        return None, None

    def _tab_match(self, path_user, path_file):
        if self.fm.settings.cd_tab_case == 'insensitive':
            path_user = path_user.lower()
            path_file = path_file.lower()
        elif self.fm.settings.cd_tab_case == 'smart' and path_user.islower():
            path_file = path_file.lower()
        return path_file.startswith(path_user)

    def _tab_normal(self, dest, dest_abs):
        dest_dir = os.path.dirname(dest)
        dest_base = os.path.basename(dest)

        try:
            dirnames = next(os.walk(os.path.dirname(dest_abs)))[1]
        except (OSError, StopIteration):
            return [], ''

        return [os.path.join(dest_dir, d) for d in dirnames if self._tab_match(dest_base, d)], ''

    def _tab_fuzzy_match(self, basepath, tokens):
        """ Find directories matching tokens recursively """
        if not tokens:
            tokens = ['']
        paths = [basepath]
        while True:
            token = tokens.pop()
            matches = []
            for path in paths:
                try:
                    directories = next(os.walk(path))[1]
                except (OSError, StopIteration):
                    continue
                matches += [os.path.join(path, d) for d in directories
                            if self._tab_match(token, d)]
            if not tokens or not matches:
                return matches
            paths = matches

        return None

    def _tab_fuzzy(self, dest, dest_abs):
        tokens = []
        basepath = dest_abs
        while True:
            basepath_old = basepath
            basepath, token = os.path.split(basepath)
            if basepath == basepath_old:
                break
            if os.path.isdir(basepath_old) and not token.startswith('.'):
                basepath = basepath_old
                break
            tokens.append(token)

        paths = self._tab_fuzzy_match(basepath, tokens)
        if not os.path.isabs(dest):
            paths_rel = self.fm.thisdir.path
            paths = [os.path.relpath(os.path.join(basepath, path), paths_rel)
                     for path in paths]
        else:
            paths_rel = ''
        return paths, paths_rel

    def tab(self, tabnum):
        from os.path import sep

        start, dest, dest_abs, ends_with_sep = self._tab_args()

        paths, paths_rel = self._tab_paths(dest, dest_abs, ends_with_sep)
        if paths is None:
            if self.fm.settings.cd_tab_fuzzy:
                paths, paths_rel = self._tab_fuzzy(dest, dest_abs)
            else:
                paths, paths_rel = self._tab_normal(dest, dest_abs)

        paths.sort()

        if self.fm.settings.cd_bookmarks:
            paths[0:0] = [
                os.path.relpath(v.path, paths_rel) if paths_rel else v.path
                for v in self.fm.bookmarks.dct.values() for path in paths
                if v.path.startswith(os.path.join(paths_rel, path) + sep)
            ]

        if not paths:
            return None
        if len(paths) == 1:
            return start + paths[0] + sep
        return [start + dirname + sep for dirname in paths]


class chain(Command):
    """:chain <command1>; <command2>; ...

    Calls multiple commands at once, separated by semicolons.
    """
    resolve_macros = False

    def execute(self):
        if not self.rest(1).strip():
            self.fm.notify('Syntax: chain <command1>; <command2>; ...', bad=True)
            return
        for command in [s.strip() for s in self.rest(1).split(";")]:
            self.fm.execute_console(command)


class shell(Command):
    escape_macros_for_shell = True

    def execute(self):
        if self.arg(1) and self.arg(1)[0] == '-':
            flags = self.arg(1)[1:]
            command = self.rest(2)
        else:
            flags = ''
            command = self.rest(1)

        if command:
            self.fm.execute_command(command, flags=flags)

    def tab(self, tabnum):
        from ranger.ext.get_executables import get_executables
        if self.arg(1) and self.arg(1)[0] == '-':
            command = self.rest(2)
        else:
            command = self.rest(1)
        start = self.line[0:len(self.line) - len(command)]

        try:
            position_of_last_space = command.rindex(" ")
        except ValueError:
            return (start + program + ' ' for program
                    in get_executables() if program.startswith(command))
        if position_of_last_space == len(command) - 1:
            selection = self.fm.thistab.get_selection()
            if len(selection) == 1:
                return self.line + selection[0].shell_escaped_basename + ' '
            return self.line + '%s '

        before_word, start_of_word = self.line.rsplit(' ', 1)
        return (before_word + ' ' + file.shell_escaped_basename
                for file in self.fm.thisdir.files or []
                if file.shell_escaped_basename.startswith(start_of_word))


class open_with(Command):

    def execute(self):
        app, flags, mode = self._get_app_flags_mode(self.rest(1))
        self.fm.execute_file(
            files=[f for f in self.fm.thistab.get_selection()],
            app=app,
            flags=flags,
            mode=mode)

    def tab(self, tabnum):
        return self._tab_through_executables()

    def _get_app_flags_mode(self, string):  # pylint: disable=too-many-branches,too-many-statements
        """Extracts the application, flags and mode from a string.

        examples:
        "mplayer f 1" => ("mplayer", "f", 1)
        "atool 4" => ("atool", "", 4)
        "p" => ("", "p", 0)
        "" => None
        """

        app = ''
        flags = ''
        mode = 0
        split = string.split()

        if len(split) == 1:
            part = split[0]
            if self._is_app(part):
                app = part
            elif self._is_flags(part):
                flags = part
            elif self._is_mode(part):
                mode = part

        elif len(split) == 2:
            part0 = split[0]
            part1 = split[1]

            if self._is_app(part0):
                app = part0
                if self._is_flags(part1):
                    flags = part1
                elif self._is_mode(part1):
                    mode = part1
            elif self._is_flags(part0):
                flags = part0
                if self._is_mode(part1):
                    mode = part1
            elif self._is_mode(part0):
                mode = part0
                if self._is_flags(part1):
                    flags = part1

        elif len(split) >= 3:
            part0 = split[0]
            part1 = split[1]
            part2 = split[2]

            if self._is_app(part0):
                app = part0
                if self._is_flags(part1):
                    flags = part1
                    if self._is_mode(part2):
                        mode = part2
                elif self._is_mode(part1):
                    mode = part1
                    if self._is_flags(part2):
                        flags = part2
            elif self._is_flags(part0):
                flags = part0
                if self._is_mode(part1):
                    mode = part1
            elif self._is_mode(part0):
                mode = part0
                if self._is_flags(part1):
                    flags = part1

        return app, flags, int(mode)

    def _is_app(self, arg):
        return not self._is_flags(arg) and not arg.isdigit()

    @staticmethod
    def _is_flags(arg):
        from ranger.core.runner import ALLOWED_FLAGS
        return all(x in ALLOWED_FLAGS for x in arg)

    @staticmethod
    def _is_mode(arg):
        return all(x in '0123456789' for x in arg)


class set_(Command):
    """:set <option name>=<python expression>

    Gives an option a new value.

    Use `:set <option>!` to toggle or cycle it, e.g. `:set flush_input!`
    """
    name = 'set'  # don't override the builtin set class

    def execute(self):
        name = self.arg(1)
        name, value, _, toggle = self.parse_setting_line_v2()
        if toggle:
            self.fm.toggle_option(name)
        else:
            self.fm.set_option_from_string(name, value)

    def tab(self, tabnum):  # pylint: disable=too-many-return-statements
        from ranger.gui.colorscheme import get_all_colorschemes
        name, value, name_done = self.parse_setting_line()
        settings = self.fm.settings
        if not name:
            return sorted(self.firstpart + setting for setting in settings)
        if not value and not name_done:
            return sorted(self.firstpart + setting for setting in settings
                          if setting.startswith(name))
        if not value:
            value_completers = {
                "colorscheme":
                # Cycle through colorschemes when name, but no value is specified
                lambda: sorted(self.firstpart + colorscheme for colorscheme
                               in get_all_colorschemes(self.fm)),

                "column_ratios":
                lambda: self.firstpart + ",".join(map(str, settings[name])),
            }

            def default_value_completer():
                return self.firstpart + str(settings[name])

            return value_completers.get(name, default_value_completer)()
        if bool in settings.types_of(name):
            if 'true'.startswith(value.lower()):
                return self.firstpart + 'True'
            if 'false'.startswith(value.lower()):
                return self.firstpart + 'False'
        # Tab complete colorscheme values if incomplete value is present
        if name == "colorscheme":
            return sorted(self.firstpart + colorscheme for colorscheme
                          in get_all_colorschemes(self.fm) if colorscheme.startswith(value))
        return None


class setlocal(set_):
    """:setlocal path=<regular expression> <option name>=<python expression>

    Gives an option a new value.
    """
    PATH_RE_DQUOTED = re.compile(r'^setlocal\s+path="(.*?)"')
    PATH_RE_SQUOTED = re.compile(r"^setlocal\s+path='(.*?)'")
    PATH_RE_UNQUOTED = re.compile(r'^path=(.*?)$')

    def _re_shift(self, match):
        if not match:
            return None
        path = os.path.expanduser(match.group(1))
        for _ in range(len(path.split())):
            self.shift()
        return path

    def execute(self):
        path = self._re_shift(self.PATH_RE_DQUOTED.match(self.line))
        if path is None:
            path = self._re_shift(self.PATH_RE_SQUOTED.match(self.line))
        if path is None:
            path = self._re_shift(self.PATH_RE_UNQUOTED.match(self.arg(1)))
        if path is None and self.fm.thisdir:
            path = self.fm.thisdir.path
        if not path:
            return

        name, value, _ = self.parse_setting_line()
        self.fm.set_option_from_string(name, value, localpath=path)


class setintag(set_):
    """:setintag <tag or tags> <option name>=<option value>

    Sets an option for directories that are tagged with a specific tag.
    """

    def execute(self):
        tags = self.arg(1)
        self.shift()
        name, value, _ = self.parse_setting_line()
        self.fm.set_option_from_string(name, value, tags=tags)


class default_linemode(Command):

    def execute(self):
        from ranger.container.fsobject import FileSystemObject

        if len(self.args) < 2:
            self.fm.notify(
                "Usage: default_linemode [path=<regexp> | tag=<tag(s)>] <linemode>", bad=True)

        # Extract options like "path=..." or "tag=..." from the command line
        arg1 = self.arg(1)
        method = "always"
        argument = None
        if arg1.startswith("path="):
            method = "path"
            argument = re.compile(arg1[5:])
            self.shift()
        elif arg1.startswith("tag="):
            method = "tag"
            argument = arg1[4:]
            self.shift()

        # Extract and validate the line mode from the command line
        lmode = self.rest(1)
        if lmode not in FileSystemObject.linemode_dict:
            self.fm.notify(
                "Invalid linemode: %s; should be %s" % (
                    lmode, "/".join(FileSystemObject.linemode_dict)),
                bad=True,
            )

        # Add the prepared entry to the fm.default_linemodes
        entry = [method, argument, lmode]
        self.fm.default_linemodes.appendleft(entry)

        # Redraw the columns
        if self.fm.ui.browser:
            for col in self.fm.ui.browser.columns:
                col.need_redraw = True

    def tab(self, tabnum):
        return (self.arg(0) + " " + lmode
                for lmode in self.fm.thisfile.linemode_dict.keys()
                if lmode.startswith(self.arg(1)))


class quit(Command):  # pylint: disable=redefined-builtin
    """:quit

    Closes the current tab, if there's more than one tab.
    Otherwise quits if there are no tasks in progress.
    """
    def _exit_no_work(self):
        if self.fm.loader.has_work():
            self.fm.notify('Not quitting: Tasks in progress: Use `quit!` to force quit')
        else:
            self.fm.exit()

    def execute(self):
        if len(self.fm.tabs) >= 2:
            self.fm.tab_close()
        else:
            self._exit_no_work()


class quit_bang(Command):
    """:quit!

    Closes the current tab, if there's more than one tab.
    Otherwise force quits immediately.
    """
    name = 'quit!'
    allow_abbrev = False

    def execute(self):
        if len(self.fm.tabs) >= 2:
            self.fm.tab_close()
        else:
            self.fm.exit()


class quitall(Command):
    """:quitall

    Quits if there are no tasks in progress.
    """
    def _exit_no_work(self):
        if self.fm.loader.has_work():
            self.fm.notify('Not quitting: Tasks in progress: Use `quitall!` to force quit')
        else:
            self.fm.exit()

    def execute(self):
        self._exit_no_work()


class quitall_bang(Command):
    """:quitall!

    Force quits immediately.
    """
    name = 'quitall!'
    allow_abbrev = False

    def execute(self):
        self.fm.exit()


class terminal(Command):
    """:terminal

    Spawns an "x-terminal-emulator" starting in the current directory.
    """

    def execute(self):
        from ranger.ext.get_executables import get_term
        self.fm.run(get_term(), flags='f')


class delete(Command):
    """:delete

    Tries to delete the selection or the files passed in arguments (if any).
    The arguments use a shell-like escaping.

    "Selection" is defined as all the "marked files" (by default, you
    can mark files with space or v). If there are no marked files,
    use the "current file" (where the cursor is)

    When attempting to delete non-empty directories or multiple
    marked files, it will require a confirmation.
    """

    allow_abbrev = False
    escape_macros_for_shell = True

    def execute(self):
        import shlex
        from functools import partial

        def is_directory_with_files(path):
            return os.path.isdir(path) and not os.path.islink(path) and len(os.listdir(path)) > 0

        if self.rest(1):
            files = shlex.split(self.rest(1))
            many_files = (len(files) > 1 or is_directory_with_files(files[0]))
        else:
            cwd = self.fm.thisdir
            tfile = self.fm.thisfile
            if not cwd or not tfile:
                self.fm.notify("Error: no file selected for deletion!", bad=True)
                return

            # relative_path used for a user-friendly output in the confirmation.
            files = [f.relative_path for f in self.fm.thistab.get_selection()]
            many_files = (cwd.marked_items or is_directory_with_files(tfile.path))

        confirm = self.fm.settings.confirm_on_delete
        if confirm != 'never' and (confirm != 'multiple' or many_files):
            self.fm.ui.console.ask(
                "Confirm deletion of: %s (y/N)" % ', '.join(files),
                partial(self._question_callback, files),
                ('n', 'N', 'y', 'Y'),
            )
        else:
            # no need for a confirmation, just delete
            self.fm.delete(files)

    def tab(self, tabnum):
        return self._tab_directory_content()

    def _question_callback(self, files, answer):
        if answer == 'y' or answer == 'Y':
            self.fm.delete(files)


class trash(Command):
    """:trash

    Tries to move the selection or the files passed in arguments (if any) to
    the trash, using rifle rules with label "trash".
    The arguments use a shell-like escaping.

    "Selection" is defined as all the "marked files" (by default, you
    can mark files with space or v). If there are no marked files,
    use the "current file" (where the cursor is)

    When attempting to trash non-empty directories or multiple
    marked files, it will require a confirmation.
    """

    allow_abbrev = False
    escape_macros_for_shell = True

    def execute(self):
        import shlex
        from functools import partial

        def is_directory_with_files(path):
            return os.path.isdir(path) and not os.path.islink(path) and len(os.listdir(path)) > 0

        if self.rest(1):
            files = shlex.split(self.rest(1))
            many_files = (len(files) > 1 or is_directory_with_files(files[0]))
        else:
            cwd = self.fm.thisdir
            tfile = self.fm.thisfile
            if not cwd or not tfile:
                self.fm.notify("Error: no file selected for deletion!", bad=True)
                return

            # relative_path used for a user-friendly output in the confirmation.
            files = [f.relative_path for f in self.fm.thistab.get_selection()]
            many_files = (cwd.marked_items or is_directory_with_files(tfile.path))

        confirm = self.fm.settings.confirm_on_delete
        if confirm != 'never' and (confirm != 'multiple' or many_files):
            self.fm.ui.console.ask(
                "Confirm deletion of: %s (y/N)" % ', '.join(files),
                partial(self._question_callback, files),
                ('n', 'N', 'y', 'Y'),
            )
        else:
            # no need for a confirmation, just delete
            self.fm.execute_file(files, label='trash')

    def tab(self, tabnum):
        return self._tab_directory_content()

    def _question_callback(self, files, answer):
        if answer == 'y' or answer == 'Y':
            self.fm.execute_file(files, label='trash')


class jump_non(Command):
    """:jump_non [-FLAGS...]

    Jumps to first non-directory if highlighted file is a directory and vice versa.

    Flags:
     -r    Jump in reverse order
     -w    Wrap around if reaching end of filelist
    """
    def __init__(self, *args, **kwargs):
        super(jump_non, self).__init__(*args, **kwargs)

        flags, _ = self.parse_flags()
        self._flag_reverse = 'r' in flags
        self._flag_wrap = 'w' in flags

    @staticmethod
    def _non(fobj, is_directory):
        return fobj.is_directory if not is_directory else not fobj.is_directory

    def execute(self):
        tfile = self.fm.thisfile
        passed = False
        found_before = None
        found_after = None
        for fobj in self.fm.thisdir.files[::-1] if self._flag_reverse else self.fm.thisdir.files:
            if fobj.path == tfile.path:
                passed = True
                continue

            if passed:
                if self._non(fobj, tfile.is_directory):
                    found_after = fobj.path
                    break
            elif not found_before and self._non(fobj, tfile.is_directory):
                found_before = fobj.path

        if found_after:
            self.fm.select_file(found_after)
        elif self._flag_wrap and found_before:
            self.fm.select_file(found_before)


class mark_tag(Command):
    """:mark_tag [<tags>]

    Mark all tags that are tagged with either of the given tags.
    When leaving out the tag argument, all tagged files are marked.
    """
    do_mark = True

    def execute(self):
        cwd = self.fm.thisdir
        tags = self.rest(1).replace(" ", "")
        if not self.fm.tags or not cwd.files:
            return
        for fileobj in cwd.files:
            try:
                tag = self.fm.tags.tags[fileobj.realpath]
            except KeyError:
                continue
            if not tags or tag in tags:
                cwd.mark_item(fileobj, val=self.do_mark)
        self.fm.ui.status.need_redraw = True
        self.fm.ui.need_redraw = True


class console(Command):
    """:console <command>

    Open the console with the given command.
    """

    def execute(self):
        position = None
        if self.arg(1)[0:2] == '-p':
            try:
                position = int(self.arg(1)[2:])
            except ValueError:
                pass
            else:
                self.shift()
        self.fm.open_console(self.rest(1), position=position)


class load_copy_buffer(Command):
    """:load_copy_buffer

    Load the copy buffer from datadir/copy_buffer
    """
    copy_buffer_filename = 'copy_buffer'

    def execute(self):
        import sys
        from ranger.container.file import File
        from os.path import exists
        fname = self.fm.datapath(self.copy_buffer_filename)
        unreadable = IOError if sys.version_info[0] < 3 else OSError
        try:
            fobj = open(fname, 'r')
        except unreadable:
            return self.fm.notify(
                "Cannot open %s" % (fname or self.copy_buffer_filename), bad=True)

        self.fm.copy_buffer = set(File(g)
                                  for g in fobj.read().split("\n") if exists(g))
        fobj.close()
        self.fm.ui.redraw_main_column()
        return None


class save_copy_buffer(Command):
    """:save_copy_buffer

    Save the copy buffer to datadir/copy_buffer
    """
    copy_buffer_filename = 'copy_buffer'

    def execute(self):
        import sys
        fname = None
        fname = self.fm.datapath(self.copy_buffer_filename)
        unwritable = IOError if sys.version_info[0] < 3 else OSError
        try:
            fobj = open(fname, 'w')
        except unwritable:
            return self.fm.notify("Cannot open %s" %
                                  (fname or self.copy_buffer_filename), bad=True)
        fobj.write("\n".join(fobj.path for fobj in self.fm.copy_buffer))
        fobj.close()
        return None


class unmark_tag(mark_tag):
    """:unmark_tag [<tags>]

    Unmark all tags that are tagged with either of the given tags.
    When leaving out the tag argument, all tagged files are unmarked.
    """
    do_mark = False


class mkdir(Command):
    """:mkdir <dirname>

    Creates a directory with the name <dirname>.
    """

    def execute(self):
        from os.path import join, expanduser, lexists
        from os import makedirs

        dirname = join(self.fm.thisdir.path, expanduser(self.rest(1)))
        if not lexists(dirname):
            makedirs(dirname)
        else:
            self.fm.notify("file/directory exists!", bad=True)

    def tab(self, tabnum):
        return self._tab_directory_content()


class touch(Command):
    """:touch <fname>

    Creates a file with the name <fname>.
    """

    def execute(self):
        from os.path import join, expanduser, lexists

        fname = join(self.fm.thisdir.path, expanduser(self.rest(1)))
        if not lexists(fname):
            open(fname, 'a').close()
        else:
            self.fm.notify("file/directory exists!", bad=True)

    def tab(self, tabnum):
        return self._tab_directory_content()


class edit(Command):
    """:edit <filename>

    Opens the specified file in vim
    """

    def execute(self):
        if not self.arg(1):
            self.fm.edit_file(self.fm.thisfile.path)
        else:
            self.fm.edit_file(self.rest(1))

    def tab(self, tabnum):
        return self._tab_directory_content()


class eval_(Command):
    """:eval [-q] <python code>

    Evaluates the python code.
    `fm' is a reference to the FM instance.
    To display text, use the function `p'.

    Examples:
    :eval fm
    :eval len(fm.directories)
    :eval p("Hello World!")
    """
    name = 'eval'
    resolve_macros = False

    def execute(self):
        # The import is needed so eval() can access the ranger module
        import ranger  # NOQA pylint: disable=unused-import,unused-variable
        if self.arg(1) == '-q':
            code = self.rest(2)
            quiet = True
        else:
            code = self.rest(1)
            quiet = False
        global cmd, fm, p, quantifier  # pylint: disable=invalid-name,global-variable-undefined
        fm = self.fm
        cmd = self.fm.execute_console
        p = fm.notify
        quantifier = self.quantifier
        try:
            try:
                result = eval(code)  # pylint: disable=eval-used
            except SyntaxError:
                exec(code)  # pylint: disable=exec-used
            else:
                if result and not quiet:
                    p(result)
        except Exception as err:  # pylint: disable=broad-except
            fm.notify("The error `%s` was caused by evaluating the "
                      "following code: `%s`" % (err, code), bad=True)


class rename(Command):
    """:rename <newname>

    Changes the name of the currently highlighted file to <newname>
    """

    def execute(self):
        from ranger.container.file import File
        from os import access

        new_name = self.rest(1)

        if not new_name:
            return self.fm.notify('Syntax: rename <newname>', bad=True)

        if new_name == self.fm.thisfile.relative_path:
            return None

        if access(new_name, os.F_OK):
            return self.fm.notify("Can't rename: file already exists!", bad=True)

        if self.fm.rename(self.fm.thisfile, new_name):
            file_new = File(new_name)
            self.fm.bookmarks.update_path(self.fm.thisfile.path, file_new)
            self.fm.tags.update_path(self.fm.thisfile.path, file_new.path)
            self.fm.thisdir.pointed_obj = file_new
            self.fm.thisfile = file_new

        return None

    def tab(self, tabnum):
        return self._tab_directory_content()


class rename_append(Command):
    """:rename_append [-FLAGS...]

    Opens the console with ":rename <current file>" with the cursor positioned
    before the file extension.

    Flags:
     -a    Position before all extensions
     -r    Remove everything before extensions
    """
    def __init__(self, *args, **kwargs):
        super(rename_append, self).__init__(*args, **kwargs)

        flags, _ = self.parse_flags()
        self._flag_ext_all = 'a' in flags
        self._flag_remove = 'r' in flags

    def execute(self):
        from ranger import MACRO_DELIMITER, MACRO_DELIMITER_ESC

        tfile = self.fm.thisfile
        relpath = tfile.relative_path.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
        basename = tfile.basename.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)

        if basename.find('.') <= 0 or os.path.isdir(relpath):
            self.fm.open_console('rename ' + relpath)
            return

        if self._flag_ext_all:
            pos_ext = re.search(r'[^.]+', basename).end(0)
        else:
            pos_ext = basename.rindex('.')
        pos = len(relpath) - len(basename) + pos_ext

        if self._flag_remove:
            relpath = relpath[:-len(basename)] + basename[pos_ext:]
            pos -= pos_ext

        self.fm.open_console('rename ' + relpath, position=(7 + pos))


class chmod(Command):
    """:chmod <octal number>

    Sets the permissions of the selection to the octal number.

    The octal number is between 0 and 777. The digits specify the
    permissions for the user, the group and others.

    A 1 permits execution, a 2 permits writing, a 4 permits reading.
    Add those numbers to combine them. So a 7 permits everything.
    """

    def execute(self):
        mode_str = self.rest(1)
        if not mode_str:
            if self.quantifier is None:
                self.fm.notify("Syntax: chmod <octal number> "
                               "or specify a quantifier", bad=True)
                return
            mode_str = str(self.quantifier)

        try:
            mode = int(mode_str, 8)
            if mode < 0 or mode > 0o777:
                raise ValueError
        except ValueError:
            self.fm.notify("Need an octal number between 0 and 777!", bad=True)
            return

        for fobj in self.fm.thistab.get_selection():
            try:
                os.chmod(fobj.path, mode)
            except OSError as ex:
                self.fm.notify(ex)

        # reloading directory.  maybe its better to reload the selected
        # files only.
        self.fm.thisdir.content_outdated = True


class bulkrename(Command):
    """:bulkrename

    This command opens a list of selected files in an external editor.
    After you edit and save the file, it will generate a shell script
    which does bulk renaming according to the changes you did in the file.

    This shell script is opened in an editor for you to review.
    After you close it, it will be executed.
    """

    def execute(self):
        # pylint: disable=too-many-locals,too-many-statements,too-many-branches
        import sys
        import tempfile
        from ranger.container.file import File
        from ranger.ext.shell_escape import shell_escape as esc
        py3 = sys.version_info[0] >= 3

        # Create and edit the file list
        filenames = [f.relative_path for f in self.fm.thistab.get_selection()]
        with tempfile.NamedTemporaryFile(delete=False) as listfile:
            listpath = listfile.name
            if py3:
                listfile.write("\n".join(filenames).encode(
                    encoding="utf-8", errors="surrogateescape"))
            else:
                listfile.write("\n".join(filenames))
        self.fm.execute_file([File(listpath)], app='editor')
        with (open(listpath, 'r', encoding="utf-8", errors="surrogateescape") if
              py3 else open(listpath, 'r')) as listfile:
            new_filenames = listfile.read().split("\n")
        os.unlink(listpath)
        if all(a == b for a, b in zip(filenames, new_filenames)):
            self.fm.notify("No renaming to be done!")
            return

        # Generate script
        with tempfile.NamedTemporaryFile() as cmdfile:
            script_lines = []
            script_lines.append("# This file will be executed when you close"
                                " the editor.")
            script_lines.append("# Please double-check everything, clear the"
                                " file to abort.")
            new_dirs = []
            for old, new in zip(filenames, new_filenames):
                if old != new:
                    basepath, _ = os.path.split(new)
                    if (basepath and basepath not in new_dirs
                            and not os.path.isdir(basepath)):
                        script_lines.append("mkdir -vp -- {dir}".format(
                            dir=esc(basepath)))
                        new_dirs.append(basepath)
                    script_lines.append("mv -vi -- {old} {new}".format(
                        old=esc(old), new=esc(new)))
            # Make sure not to forget the ending newline
            script_content = "\n".join(script_lines) + "\n"
            if py3:
                cmdfile.write(script_content.encode(encoding="utf-8",
                                                    errors="surrogateescape"))
            else:
                cmdfile.write(script_content)
            cmdfile.flush()

            # Open the script and let the user review it, then check if the
            # script was modified by the user
            self.fm.execute_file([File(cmdfile.name)], app='editor')
            cmdfile.seek(0)
            script_was_edited = (script_content != cmdfile.read())

            # Do the renaming
            self.fm.run(['/bin/sh', cmdfile.name], flags='w')

        # Retag the files, but only if the script wasn't changed during review,
        # because only then we know which are the source and destination files.
        if not script_was_edited:
            tags_changed = False
            for old, new in zip(filenames, new_filenames):
                if old != new:
                    oldpath = self.fm.thisdir.path + '/' + old
                    newpath = self.fm.thisdir.path + '/' + new
                    if oldpath in self.fm.tags:
                        old_tag = self.fm.tags.tags[oldpath]
                        self.fm.tags.remove(oldpath)
                        self.fm.tags.tags[newpath] = old_tag
                        tags_changed = True
            if tags_changed:
                self.fm.tags.dump()
        else:
            fm.notify("files have not been retagged")


class relink(Command):
    """:relink <newpath>

    Changes the linked path of the currently highlighted symlink to <newpath>
    """

    def execute(self):
        new_path = self.rest(1)
        tfile = self.fm.thisfile

        if not new_path:
            return self.fm.notify('Syntax: relink <newpath>', bad=True)

        if not tfile.is_link:
            return self.fm.notify('%s is not a symlink!' % tfile.relative_path, bad=True)

        if new_path == os.readlink(tfile.path):
            return None

        try:
            os.remove(tfile.path)
            os.symlink(new_path, tfile.path)
        except OSError as err:
            self.fm.notify(err)

        self.fm.reset()
        self.fm.thisdir.pointed_obj = tfile
        self.fm.thisfile = tfile

        return None

    def tab(self, tabnum):
        if not self.rest(1):
            return self.line + os.readlink(self.fm.thisfile.path)
        return self._tab_directory_content()


class help_(Command):
    """:help

    Display ranger's manual page.
    """
    name = 'help'

    def execute(self):
        def callback(answer):
            if answer == "q":
                return
            elif answer == "m":
                self.fm.display_help()
            elif answer == "c":
                self.fm.dump_commands()
            elif answer == "k":
                self.fm.dump_keybindings()
            elif answer == "s":
                self.fm.dump_settings()

        self.fm.ui.console.ask(
            "View [m]an page, [k]ey bindings, [c]ommands or [s]ettings? (press q to abort)",
            callback,
            list("mqkcs")
        )


class copymap(Command):
    """:copymap <keys> <newkeys1> [<newkeys2>...]

    Copies a "browser" keybinding from <keys> to <newkeys>
    """
    context = 'browser'

    def execute(self):
        if not self.arg(1) or not self.arg(2):
            return self.fm.notify("Not enough arguments", bad=True)

        for arg in self.args[2:]:
            self.fm.ui.keymaps.copy(self.context, self.arg(1), arg)

        return None


class copypmap(copymap):
    """:copypmap <keys> <newkeys1> [<newkeys2>...]

    Copies a "pager" keybinding from <keys> to <newkeys>
    """
    context = 'pager'


class copycmap(copymap):
    """:copycmap <keys> <newkeys1> [<newkeys2>...]

    Copies a "console" keybinding from <keys> to <newkeys>
    """
    context = 'console'


class copytmap(copymap):
    """:copytmap <keys> <newkeys1> [<newkeys2>...]

    Copies a "taskview" keybinding from <keys> to <newkeys>
    """
    context = 'taskview'


class unmap(Command):
    """:unmap <keys> [<keys2>, ...]

    Remove the given "browser" mappings
    """
    context = 'browser'

    def execute(self):
        for arg in self.args[1:]:
            self.fm.ui.keymaps.unbind(self.context, arg)


class uncmap(unmap):
    """:uncmap <keys> [<keys2>, ...]

    Remove the given "console" mappings
    """
    context = 'console'


class cunmap(uncmap):
    """:cunmap <keys> [<keys2>, ...]

    Remove the given "console" mappings

    DEPRECATED in favor of uncmap.
    """

    def execute(self):
        self.fm.notify("cunmap is deprecated in favor of uncmap!")
        super(cunmap, self).execute()


class unpmap(unmap):
    """:unpmap <keys> [<keys2>, ...]

    Remove the given "pager" mappings
    """
    context = 'pager'


class punmap(unpmap):
    """:punmap <keys> [<keys2>, ...]

    Remove the given "pager" mappings

    DEPRECATED in favor of unpmap.
    """

    def execute(self):
        self.fm.notify("punmap is deprecated in favor of unpmap!")
        super(punmap, self).execute()


class untmap(unmap):
    """:untmap <keys> [<keys2>, ...]

    Remove the given "taskview" mappings
    """
    context = 'taskview'


class tunmap(untmap):
    """:tunmap <keys> [<keys2>, ...]

    Remove the given "taskview" mappings

    DEPRECATED in favor of untmap.
    """

    def execute(self):
        self.fm.notify("tunmap is deprecated in favor of untmap!")
        super(tunmap, self).execute()


class map_(Command):
    """:map <keysequence> <command>

    Maps a command to a keysequence in the "browser" context.

    Example:
    map j move down
    map J move down 10
    """
    name = 'map'
    context = 'browser'
    resolve_macros = False

    def execute(self):
        if not self.arg(1) or not self.arg(2):
            self.fm.notify("Syntax: {0} <keysequence> <command>".format(self.get_name()), bad=True)
            return

        self.fm.ui.keymaps.bind(self.context, self.arg(1), self.rest(2))


class cmap(map_):
    """:cmap <keysequence> <command>

    Maps a command to a keysequence in the "console" context.

    Example:
    cmap <ESC> console_close
    cmap <C-x> console_type test
    """
    context = 'console'


class tmap(map_):
    """:tmap <keysequence> <command>

    Maps a command to a keysequence in the "taskview" context.
    """
    context = 'taskview'


class pmap(map_):
    """:pmap <keysequence> <command>

    Maps a command to a keysequence in the "pager" context.
    """
    context = 'pager'


class scout(Command):
    """:scout [-FLAGS...] <pattern>

    Swiss army knife command for searching, traveling and filtering files.

    Flags:
     -a    Automatically open a file on unambiguous match
     -e    Open the selected file when pressing enter
     -f    Filter files that match the current search pattern
     -g    Interpret pattern as a glob pattern
     -i    Ignore the letter case of the files
     -k    Keep the console open when changing a directory with the command
     -l    Letter skipping; e.g. allow "rdme" to match the file "readme"
     -m    Mark the matching files after pressing enter
     -M    Unmark the matching files after pressing enter
     -p    Permanent filter: hide non-matching files after pressing enter
     -r    Interpret pattern as a regular expression pattern
     -s    Smart case; like -i unless pattern contains upper case letters
     -t    Apply filter and search pattern as you type
     -v    Inverts the match

    Multiple flags can be combined.  For example, ":scout -gpt" would create
    a :filter-like command using globbing.
    """
    # pylint: disable=bad-whitespace
    AUTO_OPEN     = 'a'
    OPEN_ON_ENTER = 'e'
    FILTER        = 'f'
    SM_GLOB       = 'g'
    IGNORE_CASE   = 'i'
    KEEP_OPEN     = 'k'
    SM_LETTERSKIP = 'l'
    MARK          = 'm'
    UNMARK        = 'M'
    PERM_FILTER   = 'p'
    SM_REGEX      = 'r'
    SMART_CASE    = 's'
    AS_YOU_TYPE   = 't'
    INVERT        = 'v'
    # pylint: enable=bad-whitespace

    def __init__(self, *args, **kwargs):
        super(scout, self).__init__(*args, **kwargs)
        self._regex = None
        self.flags, self.pattern = self.parse_flags()

    def execute(self):  # pylint: disable=too-many-branches
        thisdir = self.fm.thisdir
        flags = self.flags
        pattern = self.pattern
        regex = self._build_regex()
        count = self._count(move=True)

        self.fm.thistab.last_search = regex
        self.fm.set_search_method(order="search")

        if (self.MARK in flags or self.UNMARK in flags) and thisdir.files:
            value = flags.find(self.MARK) > flags.find(self.UNMARK)
            if self.FILTER in flags:
                for fobj in thisdir.files:
                    thisdir.mark_item(fobj, value)
            else:
                for fobj in thisdir.files:
                    if regex.search(fobj.relative_path):
                        thisdir.mark_item(fobj, value)

        if self.PERM_FILTER in flags:
            thisdir.filter = regex if pattern else None

        # clean up:
        self.cancel()

        if self.OPEN_ON_ENTER in flags or \
                (self.AUTO_OPEN in flags and count == 1):
            if pattern == '..':
                self.fm.cd(pattern)
            else:
                self.fm.move(right=1)
                if self.quickly_executed:
                    self.fm.block_input(0.5)

        if self.KEEP_OPEN in flags and thisdir != self.fm.thisdir:
            # reopen the console:
            if not pattern:
                self.fm.open_console(self.line)
            else:
                self.fm.open_console(self.line[0:-len(pattern)])

        if self.quickly_executed and thisdir != self.fm.thisdir and pattern != "..":
            self.fm.block_input(0.5)

    def cancel(self):
        self.fm.thisdir.temporary_filter = None
        self.fm.thisdir.refilter()

    def quick(self):
        asyoutype = self.AS_YOU_TYPE in self.flags
        if self.FILTER in self.flags:
            self.fm.thisdir.temporary_filter = self._build_regex()
        if self.PERM_FILTER in self.flags and asyoutype:
            self.fm.thisdir.filter = self._build_regex()
        if self.FILTER in self.flags or self.PERM_FILTER in self.flags:
            self.fm.thisdir.refilter()
        if self._count(move=asyoutype) == 1 and self.AUTO_OPEN in self.flags:
            return True
        return False

    def tab(self, tabnum):
        self._count(move=True, offset=tabnum)

    def _build_regex(self):
        if self._regex is not None:
            return self._regex

        frmat = "%s"
        flags = self.flags
        pattern = self.pattern

        if pattern == ".":
            return re.compile("")

        # Handle carets at start and dollar signs at end separately
        if pattern.startswith('^'):
            pattern = pattern[1:]
            frmat = "^" + frmat
        if pattern.endswith('$'):
            pattern = pattern[:-1]
            frmat += "$"

        # Apply one of the search methods
        if self.SM_REGEX in flags:
            regex = pattern
        elif self.SM_GLOB in flags:
            regex = re.escape(pattern).replace("\\*", ".*").replace("\\?", ".")
        elif self.SM_LETTERSKIP in flags:
            regex = ".*".join(re.escape(c) for c in pattern)
        else:
            regex = re.escape(pattern)

        regex = frmat % regex

        # Invert regular expression if necessary
        if self.INVERT in flags:
            regex = "^(?:(?!%s).)*$" % regex

        # Compile Regular Expression
        # pylint: disable=no-member
        options = re.UNICODE
        if self.IGNORE_CASE in flags or self.SMART_CASE in flags and \
                pattern.islower():
            options |= re.IGNORECASE
        # pylint: enable=no-member
        try:
            self._regex = re.compile(regex, options)
        except re.error:
            self._regex = re.compile("")
        return self._regex

    def _count(self, move=False, offset=0):
        count = 0
        cwd = self.fm.thisdir
        pattern = self.pattern

        if not pattern or not cwd.files:
            return 0
        if pattern == '.':
            return 0
        if pattern == '..':
            return 1

        deq = deque(cwd.files)
        deq.rotate(-cwd.pointer - offset)
        i = offset
        regex = self._build_regex()
        for fsobj in deq:
            if regex.search(fsobj.relative_path):
                count += 1
                if move and count == 1:
                    cwd.move(to=(cwd.pointer + i) % len(cwd.files))
                    self.fm.thisfile = cwd.pointed_obj
            if count > 1:
                return count
            i += 1

        return count == 1


class narrow(Command):
    """
    :narrow

    Show only the files selected right now. If no files are selected,
    disable narrowing.
    """
    def execute(self):
        if self.fm.thisdir.marked_items:
            selection = [f.basename for f in self.fm.thistab.get_selection()]
            self.fm.thisdir.narrow_filter = selection
        else:
            self.fm.thisdir.narrow_filter = None
        self.fm.thisdir.refilter()


class filter_inode_type(Command):
    """
    :filter_inode_type [dfl]

    Displays only the files of specified inode type. Parameters
    can be combined.

        d display directories
        f display files
        l display links
    """

    def execute(self):
        if not self.arg(1):
            self.fm.thisdir.inode_type_filter = ""
        else:
            self.fm.thisdir.inode_type_filter = self.arg(1)
        self.fm.thisdir.refilter()


class filter_stack(Command):
    """
    :filter_stack ...

    Manages the filter stack.

        filter_stack add FILTER_TYPE ARGS...
        filter_stack pop
        filter_stack decompose
        filter_stack rotate [N=1]
        filter_stack clear
        filter_stack show
    """
    def execute(self):
        from ranger.core.filter_stack import SIMPLE_FILTERS, FILTER_COMBINATORS

        subcommand = self.arg(1)

        if subcommand == "add":
            try:
                self.fm.thisdir.filter_stack.append(
                    SIMPLE_FILTERS[self.arg(2)](self.rest(3))
                )
            except KeyError:
                FILTER_COMBINATORS[self.arg(2)](self.fm.thisdir.filter_stack)
        elif subcommand == "pop":
            self.fm.thisdir.filter_stack.pop()
        elif subcommand == "decompose":
            inner_filters = self.fm.thisdir.filter_stack.pop().decompose()
            if inner_filters:
                self.fm.thisdir.filter_stack.extend(inner_filters)
        elif subcommand == "clear":
            self.fm.thisdir.filter_stack = []
        elif subcommand == "rotate":
            rotate_by = int(self.arg(2) or self.quantifier or 1)
            self.fm.thisdir.filter_stack = (
                self.fm.thisdir.filter_stack[-rotate_by:]
                + self.fm.thisdir.filter_stack[:-rotate_by]
            )
        elif subcommand == "show":
            stack = list(map(str, self.fm.thisdir.filter_stack))
            pager = self.fm.ui.open_pager()
            pager.set_source(["Filter stack: "] + stack)
            pager.move(to=100, percentage=True)
            return
        else:
            self.fm.notify(
                "Unknown subcommand: {}".format(subcommand),
                bad=True
            )
            return

        self.fm.thisdir.refilter()


class grep(Command):
    """:grep <string>

    Looks for a string in all marked files or directories
    """

    def execute(self):
        if self.rest(1):
            action = ['grep', '--line-number']
            action.extend(['-e', self.rest(1), '-r'])
            action.extend(f.path for f in self.fm.thistab.get_selection())
            self.fm.execute_command(action, flags='p')


class flat(Command):
    """
    :flat <level>

    Flattens the directory view up to the specified level.

        -1 fully flattened
         0 remove flattened view
    """

    def execute(self):
        try:
            level_str = self.rest(1)
            level = int(level_str)
        except ValueError:
            level = self.quantifier
        if level is None:
            self.fm.notify("Syntax: flat <level>", bad=True)
            return
        if level < -1:
            self.fm.notify("Need an integer number (-1, 0, 1, ...)", bad=True)
        self.fm.thisdir.unload()
        self.fm.thisdir.flat = level
        self.fm.thisdir.load_content()


class reset_previews(Command):
    """:reset_previews

    Reset the file previews.
    """
    def execute(self):
        self.fm.previews = {}
        self.fm.ui.need_redraw = True


# Version control commands
# --------------------------------


class stage(Command):
    """
    :stage

    Stage selected files for the corresponding version control system
    """

    def execute(self):
        from ranger.ext.vcs import VcsError

        if self.fm.thisdir.vcs and self.fm.thisdir.vcs.track:
            filelist = [f.path for f in self.fm.thistab.get_selection()]
            try:
                self.fm.thisdir.vcs.action_add(filelist)
            except VcsError as ex:
                self.fm.notify('Unable to stage files: {0}'.format(ex))
            self.fm.ui.vcsthread.process(self.fm.thisdir)
        else:
            self.fm.notify('Unable to stage files: Not in repository')


class unstage(Command):
    """
    :unstage

    Unstage selected files for the corresponding version control system
    """

    def execute(self):
        from ranger.ext.vcs import VcsError

        if self.fm.thisdir.vcs and self.fm.thisdir.vcs.track:
            filelist = [f.path for f in self.fm.thistab.get_selection()]
            try:
                self.fm.thisdir.vcs.action_reset(filelist)
            except VcsError as ex:
                self.fm.notify('Unable to unstage files: {0}'.format(ex))
            self.fm.ui.vcsthread.process(self.fm.thisdir)
        else:
            self.fm.notify('Unable to unstage files: Not in repository')

# Metadata commands
# --------------------------------


class prompt_metadata(Command):
    """
    :prompt_metadata <key1> [<key2> [<key3> ...]]

    Prompt the user to input metadata for multiple keys in a row.
    """

    _command_name = "meta"
    _console_chain = None

    def execute(self):
        prompt_metadata._console_chain = self.args[1:]
        self._process_command_stack()

    def _process_command_stack(self):
        if prompt_metadata.
Download .txt
gitextract_tylkocls/

├── README.md
├── copy-configs.sh
├── dunst/
│   ├── dunstrc
│   └── mocha.conf
├── eww/
│   ├── README.md
│   ├── css/
│   │   ├── _colors.scss
│   │   ├── _colorscheme.scss
│   │   └── _overview.scss
│   ├── eww.scss
│   ├── eww.yuck
│   ├── modules/
│   │   └── variables.yuck
│   ├── scripts/
│   │   ├── activewin
│   │   ├── activews
│   │   ├── focuswindow
│   │   ├── get-icon.py
│   │   ├── overview1
│   │   ├── overview2
│   │   ├── selectwindow
│   │   ├── winlist
│   │   ├── winnumbers
│   │   └── workspaces
│   ├── tmp/
│   │   ├── _colorscheme.colorpallete
│   │   ├── _iconcolor.txt
│   │   └── colors_generated.conf
│   └── windows/
│       └── overview.yuck
├── hypr/
│   ├── desktop-portals.sh
│   ├── hyprland.conf
│   ├── hyprpaper-desktop.conf
│   ├── hyprpaper-laptop.conf
│   ├── mocha.conf
│   ├── per-monitor-launcher.sh
│   ├── portals-log
│   ├── scripts/
│   │   ├── focused-window
│   │   ├── get-last-focused-window.sh
│   │   └── last-focused-window
│   └── toggle-gaps.sh
├── kitty/
│   └── kitty.conf
├── nvim/
│   ├── init.vim
│   └── keymappings.lua
├── ranger/
│   ├── commands.py
│   ├── commands_full.py
│   ├── rc.conf
│   ├── rifle.conf
│   └── scope.sh
├── rofi/
│   ├── colors.rasi
│   ├── config.rasi
│   └── style.rasi
├── wallpapers/
│   └── catppuccin-custom.xcf
├── waybar/
│   ├── colors/
│   │   └── mocha.css
│   ├── desktop-bar/
│   │   ├── config
│   │   └── style.css
│   ├── laptop-bar/
│   │   ├── config
│   │   └── style.css
│   └── scripts/
│       ├── dunst.sh
│       ├── mediaplayer.py
│       ├── power-menu/
│       │   ├── powermenu.sh
│       │   ├── shared/
│       │   │   ├── colors/
│       │   │   │   ├── adapta.rasi
│       │   │   │   ├── arc.rasi
│       │   │   │   ├── black.rasi
│       │   │   │   ├── catppuccin.rasi
│       │   │   │   ├── cyberpunk.rasi
│       │   │   │   ├── dracula.rasi
│       │   │   │   ├── everforest.rasi
│       │   │   │   ├── gruvbox.rasi
│       │   │   │   ├── lovelace.rasi
│       │   │   │   ├── navy.rasi
│       │   │   │   ├── nord.rasi
│       │   │   │   ├── onedark.rasi
│       │   │   │   ├── paper.rasi
│       │   │   │   ├── solarized.rasi
│       │   │   │   ├── tokyonight.rasi
│       │   │   │   └── yousai.rasi
│       │   │   ├── colors.rasi
│       │   │   └── fonts.rasi
│       │   ├── style-1.rasi
│       │   ├── style-2.rasi
│       │   ├── style-3.rasi
│       │   ├── style-4.rasi
│       │   └── style-5.rasi
│       ├── rofi-wifi-menu.sh
│       ├── spotify.sh
│       └── weather.py
├── wofi/
│   ├── colors/
│   │   └── mocha.css
│   ├── config
│   ├── powermenu.sh
│   ├── style.css
│   └── wifimenu.sh
├── wrappedhl
└── zsh/
    ├── .p10k.zsh
    └── .zshrc
Download .txt
SYMBOL INDEX (168 symbols across 3 files)

FILE: ranger/commands.py
  class my_edit (line 21) | class my_edit(Command):
    method execute (line 30) | def execute(self):
    method tab (line 59) | def tab(self, tabnum):

FILE: ranger/commands_full.py
  class alias (line 101) | class alias(Command):
    method execute (line 110) | def execute(self):
  class echo (line 118) | class echo(Command):
    method execute (line 124) | def execute(self):
  class cd (line 128) | class cd(Command):
    method execute (line 137) | def execute(self):
    method _tab_args (line 155) | def _tab_args(self):
    method _tab_paths (line 176) | def _tab_paths(dest, dest_abs, ends_with_sep):
    method _tab_match (line 191) | def _tab_match(self, path_user, path_file):
    method _tab_normal (line 199) | def _tab_normal(self, dest, dest_abs):
    method _tab_fuzzy_match (line 210) | def _tab_fuzzy_match(self, basepath, tokens):
    method _tab_fuzzy (line 231) | def _tab_fuzzy(self, dest, dest_abs):
    method tab (line 253) | def tab(self, tabnum):
  class chain (line 281) | class chain(Command):
    method execute (line 288) | def execute(self):
  class shell (line 296) | class shell(Command):
    method execute (line 299) | def execute(self):
    method tab (line 310) | def tab(self, tabnum):
  class open_with (line 335) | class open_with(Command):
    method execute (line 337) | def execute(self):
    method tab (line 345) | def tab(self, tabnum):
    method _get_app_flags_mode (line 348) | def _get_app_flags_mode(self, string):  # pylint: disable=too-many-bra...
    method _is_app (line 417) | def _is_app(self, arg):
    method _is_flags (line 421) | def _is_flags(arg):
    method _is_mode (line 426) | def _is_mode(arg):
  class set_ (line 430) | class set_(Command):
    method execute (line 439) | def execute(self):
    method tab (line 447) | def tab(self, tabnum):  # pylint: disable=too-many-return-statements
  class setlocal (line 483) | class setlocal(set_):
    method _re_shift (line 492) | def _re_shift(self, match):
    method execute (line 500) | def execute(self):
  class setintag (line 515) | class setintag(set_):
    method execute (line 521) | def execute(self):
  class default_linemode (line 528) | class default_linemode(Command):
    method execute (line 530) | def execute(self):
    method tab (line 568) | def tab(self, tabnum):
  class quit (line 574) | class quit(Command):  # pylint: disable=redefined-builtin
    method _exit_no_work (line 580) | def _exit_no_work(self):
    method execute (line 586) | def execute(self):
  class quit_bang (line 593) | class quit_bang(Command):
    method execute (line 602) | def execute(self):
  class quitall (line 609) | class quitall(Command):
    method _exit_no_work (line 614) | def _exit_no_work(self):
    method execute (line 620) | def execute(self):
  class quitall_bang (line 624) | class quitall_bang(Command):
    method execute (line 632) | def execute(self):
  class terminal (line 636) | class terminal(Command):
    method execute (line 642) | def execute(self):
  class delete (line 647) | class delete(Command):
    method execute (line 664) | def execute(self):
    method tab (line 696) | def tab(self, tabnum):
    method _question_callback (line 699) | def _question_callback(self, files, answer):
  class trash (line 704) | class trash(Command):
    method execute (line 722) | def execute(self):
    method tab (line 754) | def tab(self, tabnum):
    method _question_callback (line 757) | def _question_callback(self, files, answer):
  class jump_non (line 762) | class jump_non(Command):
    method __init__ (line 771) | def __init__(self, *args, **kwargs):
    method _non (line 779) | def _non(fobj, is_directory):
    method execute (line 782) | def execute(self):
  class mark_tag (line 805) | class mark_tag(Command):
    method execute (line 813) | def execute(self):
  class console (line 829) | class console(Command):
    method execute (line 835) | def execute(self):
  class load_copy_buffer (line 847) | class load_copy_buffer(Command):
    method execute (line 854) | def execute(self):
  class save_copy_buffer (line 873) | class save_copy_buffer(Command):
    method execute (line 880) | def execute(self):
  class unmark_tag (line 895) | class unmark_tag(mark_tag):
  class mkdir (line 904) | class mkdir(Command):
    method execute (line 910) | def execute(self):
    method tab (line 920) | def tab(self, tabnum):
  class touch (line 924) | class touch(Command):
    method execute (line 930) | def execute(self):
    method tab (line 939) | def tab(self, tabnum):
  class edit (line 943) | class edit(Command):
    method execute (line 949) | def execute(self):
    method tab (line 955) | def tab(self, tabnum):
  class eval_ (line 959) | class eval_(Command):
    method execute (line 974) | def execute(self):
  class rename (line 1001) | class rename(Command):
    method execute (line 1007) | def execute(self):
    method tab (line 1031) | def tab(self, tabnum):
  class rename_append (line 1035) | class rename_append(Command):
    method __init__ (line 1045) | def __init__(self, *args, **kwargs):
    method execute (line 1052) | def execute(self):
  class chmod (line 1076) | class chmod(Command):
    method execute (line 1088) | def execute(self):
  class bulkrename (line 1116) | class bulkrename(Command):
    method execute (line 1127) | def execute(self):
  class relink (line 1208) | class relink(Command):
    method execute (line 1214) | def execute(self):
    method tab (line 1239) | def tab(self, tabnum):
  class help_ (line 1245) | class help_(Command):
    method execute (line 1252) | def execute(self):
  class copymap (line 1272) | class copymap(Command):
    method execute (line 1279) | def execute(self):
  class copypmap (line 1289) | class copypmap(copymap):
  class copycmap (line 1297) | class copycmap(copymap):
  class copytmap (line 1305) | class copytmap(copymap):
  class unmap (line 1313) | class unmap(Command):
    method execute (line 1320) | def execute(self):
  class uncmap (line 1325) | class uncmap(unmap):
  class cunmap (line 1333) | class cunmap(uncmap):
    method execute (line 1341) | def execute(self):
  class unpmap (line 1346) | class unpmap(unmap):
  class punmap (line 1354) | class punmap(unpmap):
    method execute (line 1362) | def execute(self):
  class untmap (line 1367) | class untmap(unmap):
  class tunmap (line 1375) | class tunmap(untmap):
    method execute (line 1383) | def execute(self):
  class map_ (line 1388) | class map_(Command):
    method execute (line 1401) | def execute(self):
  class cmap (line 1409) | class cmap(map_):
  class tmap (line 1421) | class tmap(map_):
  class pmap (line 1429) | class pmap(map_):
  class scout (line 1437) | class scout(Command):
    method __init__ (line 1478) | def __init__(self, *args, **kwargs):
    method execute (line 1483) | def execute(self):  # pylint: disable=too-many-branches
    method cancel (line 1528) | def cancel(self):
    method quick (line 1532) | def quick(self):
    method tab (line 1544) | def tab(self, tabnum):
    method _build_regex (line 1547) | def _build_regex(self):
    method _count (line 1595) | def _count(self, move=False, offset=0):
  class narrow (line 1624) | class narrow(Command):
    method execute (line 1631) | def execute(self):
  class filter_inode_type (line 1640) | class filter_inode_type(Command):
    method execute (line 1652) | def execute(self):
  class filter_stack (line 1660) | class filter_stack(Command):
    method execute (line 1673) | def execute(self):
  class grep (line 1715) | class grep(Command):
    method execute (line 1721) | def execute(self):
  class flat (line 1729) | class flat(Command):
    method execute (line 1739) | def execute(self):
  class reset_previews (line 1755) | class reset_previews(Command):
    method execute (line 1760) | def execute(self):
  class stage (line 1769) | class stage(Command):
    method execute (line 1776) | def execute(self):
  class unstage (line 1790) | class unstage(Command):
    method execute (line 1797) | def execute(self):
  class prompt_metadata (line 1814) | class prompt_metadata(Command):
    method execute (line 1824) | def execute(self):
    method _process_command_stack (line 1828) | def _process_command_stack(self):
    method _fill_console (line 1836) | def _fill_console(self, key):
  class meta (line 1846) | class meta(prompt_metadata):
    method execute (line 1853) | def execute(self):
    method tab (line 1862) | def tab(self, tabnum):
  class linemode (line 1871) | class linemode(default_linemode):
    method execute (line 1881) | def execute(self):
  class yank (line 1899) | class yank(Command):
    method execute (line 1914) | def execute(self):
    method get_selection_attr (line 1953) | def get_selection_attr(self, attr):
    method tab (line 1957) | def tab(self, tabnum):
  class paste_ext (line 1965) | class paste_ext(Command):
    method make_safe_path (line 1974) | def make_safe_path(dst):
    method execute (line 1992) | def execute(self):

FILE: waybar/scripts/mediaplayer.py
  function write_output (line 14) | def write_output(text, player):
  function on_play (line 25) | def on_play(player, status, manager):
  function on_metadata (line 30) | def on_metadata(player, metadata, manager):
  function on_player_appeared (line 49) | def on_player_appeared(manager, player, selected_player=None):
  function on_player_vanished (line 56) | def on_player_vanished(manager, player):
  function init_player (line 62) | def init_player(manager, name):
  function signal_handler (line 71) | def signal_handler(sig, frame):
  function parse_arguments (line 79) | def parse_arguments():
  function main (line 91) | def main():
Condensed preview — 90 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (444K chars).
[
  {
    "path": "README.md",
    "chars": 548,
    "preview": "# hyppuccin\nCatppuccin theme for Hyprland\n\n* Compositor: Hyprland\n* Terminal: Kitty\n* Shell: zsh\n* Color scheme (and all"
  },
  {
    "path": "copy-configs.sh",
    "chars": 329,
    "preview": "#!/bin/sh\n\ncp -r -l $HOME/.config/hypr/ ./\ncp -r -l $HOME/.config/waybar/ ./\ncp -r -l $HOME/.config/wofi/ ./\ncp -r -l $H"
  },
  {
    "path": "dunst/dunstrc",
    "chars": 13821,
    "preview": "# See dunst(5) for all configuration options\n\n[global]\n    ### Display ###\n\n    # Which monitor should the notifications"
  },
  {
    "path": "dunst/mocha.conf",
    "chars": 271,
    "preview": "[global]\nframe_color = \"#89B4FA\"\nseparator_color= frame\n\n[urgency_low]\nbackground = \"#1E1E2E\"\nforeground = \"#CDD6F4\"\n\n[u"
  },
  {
    "path": "eww/README.md",
    "chars": 509,
    "preview": "# Eww configuration\n\nThis configuration aims to provide a fully working shell replacement for\ncompositors/window manager"
  },
  {
    "path": "eww/css/_colors.scss",
    "chars": 1322,
    "preview": "\n\n$blue: #89b4fa;\n$lavender: #b4befe;\n$sapphire: #74c7ec;\n$sky: #89dceb;\n$teal: #94e2d5;\n$green: #a6e3a1;\n$yellow: #f9e2"
  },
  {
    "path": "eww/css/_colorscheme.scss",
    "chars": 542,
    "preview": "//Auto generated color theme for image at: https://i.ytimg.com/vi/xKbIQaKEE8s/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qp"
  },
  {
    "path": "eww/css/_overview.scss",
    "chars": 1214,
    "preview": ".overview-window {\n  @include window;\n  font-family: 'SFPro', 'Material Symbols Rounded';\n  border-radius: 20px;\n  backg"
  },
  {
    "path": "eww/eww.scss",
    "chars": 922,
    "preview": "@import 'css/colors';\n@import 'css/colorscheme';\n\n$colorbar: #c8e7e8;\n$battcolor: $colorbar;\n$memcolor: $color1;\n$cpucol"
  },
  {
    "path": "eww/eww.yuck",
    "chars": 72,
    "preview": "(include \"./modules/variables.yuck\")\n(include \"./windows/overview.yuck\")"
  },
  {
    "path": "eww/modules/variables.yuck",
    "chars": 100,
    "preview": "(defvar selected '')\n(deflisten wsjsona `scripts/overview1`)\n(deflisten wsjsonb `scripts/overview2`)"
  },
  {
    "path": "eww/scripts/activewin",
    "chars": 367,
    "preview": "#!/usr/bin/bash\n\ngetactivewin(){\n  winname=$(hyprctl activewindow | grep -e 'title: ' | sed 's/title: //' | sed 's/\\t//'"
  },
  {
    "path": "eww/scripts/activews",
    "chars": 393,
    "preview": "#!/usr/bin/bash\n\nfocusedws=$(hyprctl activewindow -j | gojq '.workspace.id')\n\nif [ \"$1\" == \"--once\" ]; then\n  exit 0\nels"
  },
  {
    "path": "eww/scripts/focuswindow",
    "chars": 127,
    "preview": "#!/usr/bin/bash\nif [[ $1 == '_none' ]]; then\n  hyprctl dispatch workspace $2\nelse \n  hyprctl dispatch focuswindow addres"
  },
  {
    "path": "eww/scripts/get-icon.py",
    "chars": 829,
    "preview": "#!/usr/bin/env python3\nimport gi\nimport sys\ngi.require_version('Gtk', '3.0')\nfrom gi.repository import Gtk\n\n# Predefine "
  },
  {
    "path": "eww/scripts/overview1",
    "chars": 3172,
    "preview": "#!/usr/bin/bash\ndummy='{\"address\":\"_none\",\"at\":[0,0],\"class\":\"workspace\",\"size\":[0,0],\"title\":\"<___overview_workspace>\","
  },
  {
    "path": "eww/scripts/overview2",
    "chars": 3172,
    "preview": "#!/usr/bin/bash\ndummy='{\"address\":\"_none\",\"at\":[0,0],\"class\":\"workspace\",\"size\":[0,0],\"title\":\"<___overview_workspace>\","
  },
  {
    "path": "eww/scripts/selectwindow",
    "chars": 318,
    "preview": "#!/usr/bin/bash\n\nselected=$(eval $2 get selected)\n\n\nif [[ $selected == \"_none\" ]] || [[ $selected == \"\" ]]; then\n  eval "
  },
  {
    "path": "eww/scripts/winlist",
    "chars": 733,
    "preview": "#!/usr/bin/bash\ngetwinlist(){\n  toprint=$(hyprctl clients -j \\\n    | grep -v '\"xwayland\": ' \\\n    | grep -v '\"grouped\": "
  },
  {
    "path": "eww/scripts/winnumbers",
    "chars": 648,
    "preview": "#!/usr/bin/bash\n\ngeticonlist() {\n    classes=$(hyprctl clients | grep -e 'class: ' | sed 's/class: Code/class: code/' | "
  },
  {
    "path": "eww/scripts/workspaces",
    "chars": 2543,
    "preview": "#!/usr/bin/env bash\n\n# define colors\ncolors=(\"#FFFFFF\" \"#fab387\" \"#a6e3a1\" \"#89b4fa\") # Active Workspaces\ndimmed=(\"#8383"
  },
  {
    "path": "eww/tmp/_colorscheme.colorpallete",
    "chars": 574,
    "preview": "//Auto generated color theme for image at: https://i.ytimg.com/vi/1y2wUv8R-0M/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qp"
  },
  {
    "path": "eww/tmp/_iconcolor.txt",
    "chars": 8,
    "preview": "#e1e8ea\n"
  },
  {
    "path": "eww/tmp/colors_generated.conf",
    "chars": 343,
    "preview": "# Auto generated color theme for image at: https://i.ytimg.com/vi/1y2wUv8R-0M/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qp"
  },
  {
    "path": "eww/windows/overview.yuck",
    "chars": 3848,
    "preview": "(defwidget overview []\n  (overlay\n    (box\n      :orientation \"v\"\n      :class \"overview-window\"\n      ; :space-evenly f"
  },
  {
    "path": "hypr/desktop-portals.sh",
    "chars": 233,
    "preview": "#!/bin/sh\necho \"amogus\" > ~/.config/hypr/portals-log\nsleep 1\nkillall xdg-desktop-portal-hyprland\nkillall xdg-desktop-por"
  },
  {
    "path": "hypr/hyprland.conf",
    "chars": 7606,
    "preview": "# Catppuccin Hyprland config\n\n# Catppuccin colors\nsource = ~/.config/hypr/mocha.conf\n\n#monitor=,preferred,auto,1\nmonitor"
  },
  {
    "path": "hypr/hyprpaper-desktop.conf",
    "chars": 325,
    "preview": "preload = Pictures/wallpapers/catppuccin-custom-darker-corners-desktop.png\npreload = Pictures/wallpapers/catppuccin-cust"
  },
  {
    "path": "hypr/hyprpaper-laptop.conf",
    "chars": 138,
    "preview": "preload = Pictures/wallpapers/catppuccin-custom-darker-corners.png\n\nwallpaper = ,Pictures/wallpapers/catppuccin-custom-d"
  },
  {
    "path": "hypr/mocha.conf",
    "chars": 628,
    "preview": "$rosewater = 0xfff5e0dc\n$flamingo  = 0xfff2cdcd\n$pink      = 0xfff5c2e7\n$mauve     = 0xffcba6f7\n$red       = 0xfff38ba8\n"
  },
  {
    "path": "hypr/per-monitor-launcher.sh",
    "chars": 415,
    "preview": "#!/bin/sh\npkill waybar\npkill hyprpaper\n\nm=$(printenv LAPTOP)\n\nif [ $m = 1 ]; then\n    hyprpaper -c .config/hypr/hyprpape"
  },
  {
    "path": "hypr/portals-log",
    "chars": 7,
    "preview": "amogus\n"
  },
  {
    "path": "hypr/scripts/focused-window",
    "chars": 236,
    "preview": "Window a9ea0840 -> git add -A: at: 973,73 size: 924,984 workspace: 1 (1) floating: 0 monitor: 0 class: kitty title: git "
  },
  {
    "path": "hypr/scripts/get-last-focused-window.sh",
    "chars": 465,
    "preview": "#!/bin/sh\n\nfunction handle {\n  if [[ ${1:0:12} == \"activewindow\" ]]; then\n    if [[ $1 != \"activewindow>>,\" ]]; then\n   "
  },
  {
    "path": "hypr/scripts/last-focused-window",
    "chars": 298,
    "preview": "Window a9ea0840 -> mathis_hyprland@LEGION-Mathis:~/hyppuccin: at: 973,73 size: 924,984 workspace: 1 (1) floating: 0 moni"
  },
  {
    "path": "hypr/toggle-gaps.sh",
    "chars": 317,
    "preview": "#!/bin/sh\n\nTOGGLE=$HOME/.toggle\n\nif [ ! -e $TOGGLE ]; then\n\ttouch $TOGGLE\n\thyprctl keyword general:gaps_in 0\n\thyprctl ke"
  },
  {
    "path": "kitty/kitty.conf",
    "chars": 78076,
    "preview": "# vim:fileencoding=utf-8:foldmethod=marker\n\n#: Fonts {{{\n\n#: kitty has very powerful font management. You can configure\n"
  },
  {
    "path": "nvim/init.vim",
    "chars": 7709,
    "preview": "set notermguicolors t_Co=16\nset number\nset autoindent\nset selection=inclusive\n\nif (has(\"termguicolors\"))\n  set termguico"
  },
  {
    "path": "nvim/keymappings.lua",
    "chars": 1576,
    "preview": "map({ \"n\", \"<F4>\", \":lua require('dapui').toggle()<CR>\" })\nmap({ \"n\", \"<F5>\", \":lua require('dap').toggle_breakpoint()<C"
  },
  {
    "path": "ranger/commands.py",
    "chars": 2763,
    "preview": "# This is a sample commands.py.  You can add your own commands here.\n#\n# Please refer to commands_full.py for all the de"
  },
  {
    "path": "ranger/commands_full.py",
    "chars": 62106,
    "preview": "# -*- coding: utf-8 -*-\n# This file is part of ranger, the console file manager.\n# This configuration file is licensed u"
  },
  {
    "path": "ranger/rc.conf",
    "chars": 24191,
    "preview": "# ===================================================================\n# This file contains the default startup commands "
  },
  {
    "path": "ranger/rifle.conf",
    "chars": 14071,
    "preview": "# vim: ft=cfg\n#\n# This is the configuration file of \"rifle\", ranger's file executor/opener.\n# Each line consists of cond"
  },
  {
    "path": "ranger/scope.sh",
    "chars": 13751,
    "preview": "#!/usr/bin/env bash\n\nset -o noclobber -o noglob -o nounset -o pipefail\nIFS=$'\\n'\n\n## If the option `use_preview_script` "
  },
  {
    "path": "rofi/colors.rasi",
    "chars": 578,
    "preview": "/* colors */\n\n* {\n  base:   #1e1e2e;\n  mantle: #181825;\n  crust:  #11111b;\n\n  text:     #cdd6f4;\n  subtext0: #a6adc8;\n  "
  },
  {
    "path": "rofi/config.rasi",
    "chars": 4817,
    "preview": "configuration {\n/*\tmodes: \"drun,run,ssh\";*/\n\tfont: \"SFPro 12\";\n/*\tlocation: 0;*/\n/*\tyoffset: 0;*/\n/*\txoffset: 0;*/\n/*\tfi"
  },
  {
    "path": "rofi/style.rasi",
    "chars": 3339,
    "preview": "configuration {\n\tfont:\t\t\t\t\t\t\t\"SFPro 15\";\n    show-icons:                     true;\n\ticon-theme: \t\t\t\t\t\"Papirus\";\n    disp"
  },
  {
    "path": "waybar/colors/mocha.css",
    "chars": 904,
    "preview": "/*\n*\n* Catppuccin Mocha palette\n* Maintainer: rubyowo\n*\n*/\n\n@define-color base   #1e1e2e;\n@define-color mantle #181825;\n"
  },
  {
    "path": "waybar/desktop-bar/config",
    "chars": 3713,
    "preview": "{\n  \"height\": 60, \n  \"layer\": \"top\",\n  \"position\": \"top\",\n  \"output\": \"DP-2\",\n  \"spacing\": 7,\n  \"modules-left\": [\"custom"
  },
  {
    "path": "waybar/desktop-bar/style.css",
    "chars": 2054,
    "preview": "@import \"../colors/mocha.css\";\n\n/* margin: top right bottom left */\n/* Spacing outside the element */\n\n/* padding: top r"
  },
  {
    "path": "waybar/laptop-bar/config",
    "chars": 3384,
    "preview": "{\n    \"height\": 50, \n    \"layer\": \"top\",\n    \"position\": \"top\",\n    \"output\": \"eDP-1\",\n    \"spacing\": 7,\n    \"modules-le"
  },
  {
    "path": "waybar/laptop-bar/style.css",
    "chars": 2053,
    "preview": "@import \"../colors/mocha.css\";\n\n/* margin: top right bottom left */\n/* Spacing outside the element */\n\n/* padding: top r"
  },
  {
    "path": "waybar/scripts/dunst.sh",
    "chars": 202,
    "preview": "#!/bin/bash\n\nCOUNT=$(dunstctl count waiting)\nENABLED=\nDISABLED=\nif [ $COUNT != 0 ]; then DISABLED=\"$COUNT  \"; fi\nif d"
  },
  {
    "path": "waybar/scripts/mediaplayer.py",
    "chars": 3852,
    "preview": "#!/usr/bin/env python3\nimport argparse\nimport logging\nimport sys\nimport signal\nimport gi\nimport json\ngi.require_version("
  },
  {
    "path": "waybar/scripts/power-menu/powermenu.sh",
    "chars": 1980,
    "preview": "#!/usr/bin/env bash\n\n## Author : Aditya Shakya (adi1090x)\n## Github : @adi1090x\n#\n## Rofi   : Power Menu\n#\n## Available "
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/adapta.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #222D32FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/arc.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #2F343FFF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/black.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #000000FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/catppuccin.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #1E1D2FFF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/cyberpunk.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #000B1EFF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/dracula.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #1E1F29FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/everforest.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #323D43FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/gruvbox.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #282828FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/lovelace.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #1D1F28FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/navy.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #021B21FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/nord.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #2E3440FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/onedark.rasi",
    "chars": 274,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #0F171C;\n "
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/paper.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #F1F1F1FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/solarized.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #002B36FF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/tokyonight.rasi",
    "chars": 289,
    "preview": "/**\n *\n * Author : Levi Lacoss (fishyfishfish55)\n * Github : @fishyfishfish55\n *\n * Colors\n **/\n\n* {\n    background:    "
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors/yousai.rasi",
    "chars": 278,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n **/\n\n* {\n    background:     #F5E7DEFF;"
  },
  {
    "path": "waybar/scripts/power-menu/shared/colors.rasi",
    "chars": 385,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Colors\n *\n * Available Colors Schemes\n *\n * ada"
  },
  {
    "path": "waybar/scripts/power-menu/shared/fonts.rasi",
    "chars": 135,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Fonts\n *\n **/\n\n* {\n    font: \"JetBrains Mono Ne"
  },
  {
    "path": "waybar/scripts/power-menu/style-1.rasi",
    "chars": 5140,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Rofi Theme File\n * Rofi Version: 1.7.3\n **/\n\n/*"
  },
  {
    "path": "waybar/scripts/power-menu/style-2.rasi",
    "chars": 5140,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Rofi Theme File\n * Rofi Version: 1.7.3\n **/\n\n/*"
  },
  {
    "path": "waybar/scripts/power-menu/style-3.rasi",
    "chars": 5127,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Rofi Theme File\n * Rofi Version: 1.7.3\n **/\n\n/*"
  },
  {
    "path": "waybar/scripts/power-menu/style-4.rasi",
    "chars": 5215,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Rofi Theme File\n * Rofi Version: 1.7.3\n **/\n\n/*"
  },
  {
    "path": "waybar/scripts/power-menu/style-5.rasi",
    "chars": 5292,
    "preview": "/**\n *\n * Author : Aditya Shakya (adi1090x)\n * Github : @adi1090x\n * \n * Rofi Theme File\n * Rofi Version: 1.7.3\n **/\n\n/*"
  },
  {
    "path": "waybar/scripts/rofi-wifi-menu.sh",
    "chars": 1590,
    "preview": " #!/usr/bin/env bash\n\nnotify-send \"Getting list of available Wi-Fi networks...\"\n# Get a list of available wifi connectio"
  },
  {
    "path": "waybar/scripts/spotify.sh",
    "chars": 3169,
    "preview": "#!/bin/sh\n# install playerctl\n\n# player_status=$(playerctl status 2> /dev/null)\n# if [ \"$player_status\" = \"Playing\" ]; t"
  },
  {
    "path": "waybar/scripts/weather.py",
    "chars": 3659,
    "preview": "#!/usr/bin/env python\n\nimport subprocess\nfrom pyquery import PyQuery  # install using `pip install pyquery`\nimport json\n"
  },
  {
    "path": "wofi/colors/mocha.css",
    "chars": 904,
    "preview": "/*\n*\n* Catppuccin Mocha palette\n* Maintainer: rubyowo\n*\n*/\n\n@define-color base   #1e1e2e;\n@define-color mantle #181825;\n"
  },
  {
    "path": "wofi/config",
    "chars": 115,
    "preview": "mode=drun\nallow_images=true\nimage_size=40\nterm=kitty\ninsensitive=true\nlocation=center\nno_actions=true\nprompt=Search"
  },
  {
    "path": "wofi/powermenu.sh",
    "chars": 410,
    "preview": "#!/bin/bash\n\nentries=\"⭮ Reboot\\n⏻ Shutdown\\n⇠ Logout\\n⏾ Suspend\"\n\nselected=$(echo -e $entries|wofi --width 250 --height "
  },
  {
    "path": "wofi/style.css",
    "chars": 1595,
    "preview": "@define-color base   #1e1e2e;\n@define-color mantle #181825;\n@define-color crust  #11111b;\n\n@define-color text     #cdd6f"
  },
  {
    "path": "wofi/wifimenu.sh",
    "chars": 3253,
    "preview": "#!/usr/bin/env bash\n\n# Starts a scan of available broadcasting SSIDs\n# nmcli dev wifi rescan\n\nDIR=\"$( cd \"$( dirname \"${"
  },
  {
    "path": "wrappedhl",
    "chars": 802,
    "preview": "#!/bin/sh\n\ncd ~\n\nexport _JAVA_AWT_WM_NONREPARENTING=1\n# export GBM_BACKEND=nvidia-drm\nexport WLR_NO_HARDWARE_CURSORS=1\ne"
  },
  {
    "path": "zsh/.p10k.zsh",
    "chars": 90799,
    "preview": "# Generated by Powerlevel10k configuration wizard on 2023-01-24 at 08:50 EST.\n# Based on romkatv/powerlevel10k/config/p1"
  },
  {
    "path": "zsh/.zshrc",
    "chars": 5514,
    "preview": "# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.\n# Initialization code that may require "
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the MathisP75/hyppuccin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 90 files (411.3 KB), approximately 114.4k tokens, and a symbol index with 168 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!