├── .config
├── MusicBrainz
│ ├── .Picard.ini.synclock
│ └── Picard.ini
├── alacritty
│ ├── alacritty.toml
│ └── dracula.toml
├── btop
│ ├── btop.conf
│ └── btop.log
├── dunst
│ └── dunstrc
├── eww
│ ├── eww.scss
│ ├── eww.yuck
│ ├── eww.yuck_bak
│ ├── images
│ │ ├── headphones.svg
│ │ ├── laptop.svg
│ │ ├── mouse.svg
│ │ └── profile.jpg
│ ├── scripts
│ │ ├── .jpg
│ │ ├── .png
│ │ ├── cover.png
│ │ ├── hyprland
│ │ ├── mails
│ │ ├── music_info
│ │ ├── net
│ │ ├── open_apps
│ │ ├── open_folders
│ │ ├── open_links
│ │ ├── sys_info
│ │ └── weather_info
│ └── wallpaper.png
├── hypr
│ └── hyprland.conf
├── kdeglobals
├── mpd
│ ├── mpd.conf
│ └── state
├── ncmpcpp
│ ├── bindings
│ ├── config
│ └── error.log
├── nvim
│ ├── after
│ │ └── plugin
│ │ │ ├── autoclose.lua
│ │ │ ├── bufferline.lua
│ │ │ ├── colours.lua
│ │ │ ├── comments.lua
│ │ │ ├── filetree.lua
│ │ │ ├── harpoon.lua
│ │ │ ├── indentblankline.lua
│ │ │ ├── lsp.lua
│ │ │ ├── lualine.lua
│ │ │ ├── rbd.lua
│ │ │ ├── telescope.lua
│ │ │ ├── terminal.lua
│ │ │ ├── treesitter.lua
│ │ │ ├── undotree.lua
│ │ │ ├── vim_fugitive.lua
│ │ │ └── vimtex.lua
│ ├── colors
│ │ └── colour.vim
│ ├── init.lua
│ ├── lua
│ │ └── spagett
│ │ │ ├── init.lua
│ │ │ ├── options.lua
│ │ │ ├── packer.lua
│ │ │ └── remaps.lua
│ └── plugin
│ │ └── packer_compiled.lua
├── rofi
│ ├── appmnu.rasi
│ ├── colors.rasi
│ └── config.rasi
├── starship.toml
├── swaync
│ ├── config.json
│ ├── configSchema.json
│ └── style.css
├── wallpaper.png
├── waybar
│ ├── catppuccin
│ │ ├── frappe.css
│ │ ├── latte.css
│ │ ├── macchiato.css
│ │ └── mocha.css
│ ├── config
│ ├── launch.sh
│ ├── scripts
│ │ ├── updates.sh
│ │ └── wttr.py
│ └── style.css
├── zathura
│ └── zathurarc
└── zsh
│ ├── .zcompdump
│ ├── .zprofile
│ ├── .zshenv
│ ├── .zshrc
│ └── plugins
│ ├── coloured-man
│ ├── coloured-man.plugin.zsh
│ └── coloured-man.plugin.zsh.zwc
│ ├── fast-syntax-highlighting
│ ├── .fast-make-targets
│ ├── .fast-read-ini-file
│ ├── .fast-run-command
│ ├── .fast-run-git-command
│ ├── .fast-zts-read-all
│ ├── .github
│ │ └── workflows
│ │ │ ├── linting.yml
│ │ │ └── zunit.yaml
│ ├── .gitignore
│ ├── .zunit.yml
│ ├── README.md
│ ├── THEME_GUIDE.md
│ ├── _fast-theme
│ ├── fast-highlight
│ ├── fast-string-highlight
│ ├── fast-syntax-highlighting.plugin.zsh
│ ├── fast-theme
│ ├── images
│ │ ├── 203654.gif
│ │ ├── array-assign.png
│ │ ├── assign.png
│ │ ├── brackets.gif
│ │ ├── cmdsubst.png
│ │ ├── cplx_cond.png
│ │ ├── eval_cmp.png
│ │ ├── execfd.png
│ │ ├── execfd_cmp.png
│ │ ├── for-loop-cmp.png
│ │ ├── for-loop.png
│ │ ├── function.png
│ │ ├── git_chroma.png
│ │ ├── global-alias.png
│ │ ├── heredoc.png
│ │ ├── herestring.png
│ │ ├── highlight-less.png
│ │ ├── highlight-much.png
│ │ ├── ideal-string.png
│ │ ├── in_string.png
│ │ ├── math.gif
│ │ ├── parameter.png
│ │ ├── theme.png
│ │ ├── typeset.png
│ │ └── zcalc.png
│ ├── share
│ │ └── free_theme.zsh
│ ├── test
│ │ ├── parse.zsh
│ │ └── to-parse.zsh
│ ├── tests
│ │ ├── _output
│ │ │ └── .gitkeep
│ │ ├── _support
│ │ │ ├── .gitkeep
│ │ │ └── bootstrap
│ │ ├── example.zunit
│ │ └── main.zunit
│ ├── themes
│ │ ├── base16.ini
│ │ ├── clean.ini
│ │ ├── default.ini
│ │ ├── forest.ini
│ │ ├── free.ini
│ │ ├── q-jmnemonic.ini
│ │ ├── safari.ini
│ │ ├── spa.ini
│ │ ├── sv-orple.ini
│ │ ├── sv-plant.ini
│ │ └── zdharma.ini
│ └── →chroma
│ │ ├── -alias.ch
│ │ ├── -autoload.ch
│ │ ├── -autorandr.ch
│ │ ├── -awk.ch
│ │ ├── -docker.ch
│ │ ├── -example.ch
│ │ ├── -fast-theme.ch
│ │ ├── -fpath_peq.ch
│ │ ├── -git.ch
│ │ ├── -grep.ch
│ │ ├── -hub.ch
│ │ ├── -ionice.ch
│ │ ├── -lab.ch
│ │ ├── -make.ch
│ │ ├── -nice.ch
│ │ ├── -nmcli.ch
│ │ ├── -node.ch
│ │ ├── -ogit.ch
│ │ ├── -perl.ch
│ │ ├── -precommand.ch
│ │ ├── -printf.ch
│ │ ├── -ruby.ch
│ │ ├── -scp.ch
│ │ ├── -sh.ch
│ │ ├── -source.ch
│ │ ├── -ssh.ch
│ │ ├── -subcommand.ch
│ │ ├── -subversion.ch
│ │ ├── -vim.ch
│ │ ├── -whatis.ch
│ │ ├── -which.ch
│ │ ├── -zinit.ch
│ │ └── main-chroma.ch
│ └── fzf-tab
│ ├── .gitattributes
│ ├── .github
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── question.md
│ └── workflows
│ │ └── ci.yaml
│ ├── .gitignore
│ ├── LICENSE
│ ├── fzf-tab.plugin.zsh
│ ├── fzf-tab.zsh
│ ├── lib
│ ├── -ftb-colorize
│ ├── -ftb-fzf
│ ├── -ftb-generate-complist
│ ├── -ftb-generate-header
│ ├── -ftb-generate-query
│ ├── ftb-switch-group
│ ├── ftb-tmux-popup
│ └── zsh-ls-colors
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── demo
│ │ └── ls-colors.zsh
│ ├── modules
│ ├── .cvsignore
│ ├── .distfiles
│ ├── .editorconfig
│ ├── .gitignore
│ ├── .preconfig
│ ├── Config
│ │ ├── .cvsignore
│ │ ├── .distfiles
│ │ ├── aczshoot.m4
│ │ ├── clean.mk
│ │ ├── config.mk
│ │ ├── defs.mk.in
│ │ ├── installfns.sh
│ │ ├── uninstallfns.sh
│ │ └── version.mk
│ ├── LICENCE
│ ├── Makefile.in
│ ├── RECOMPILE_REQUEST
│ ├── Src
│ │ ├── .cvsignore
│ │ ├── .distfiles
│ │ ├── .exrc
│ │ ├── .indent.pro
│ │ ├── Makefile.in
│ │ ├── Makemod.in.in
│ │ ├── aloxaf
│ │ │ ├── .cvsignore
│ │ │ ├── .distfiles
│ │ │ ├── .exrc
│ │ │ ├── .gitignore
│ │ │ ├── fzftab.c
│ │ │ └── fzftab.mdd
│ │ ├── builtin.c
│ │ ├── compat.c
│ │ ├── exec.c
│ │ ├── glob.c
│ │ ├── hashtable.c
│ │ ├── hashtable.h
│ │ ├── init.c
│ │ ├── input.c
│ │ ├── jobs.c
│ │ ├── lex.c
│ │ ├── loop.c
│ │ ├── makepro.awk
│ │ ├── mem.c
│ │ ├── mkbltnmlst.sh
│ │ ├── mkmakemod.sh
│ │ ├── module.c
│ │ ├── options.c
│ │ ├── params.c
│ │ ├── parse.c
│ │ ├── pattern.c
│ │ ├── prompt.c
│ │ ├── prototypes.h
│ │ ├── signals.c
│ │ ├── signals.h
│ │ ├── signames1.awk
│ │ ├── signames2.awk
│ │ ├── string.c
│ │ ├── utils.c
│ │ ├── wcwidth9.h
│ │ ├── zsh.h
│ │ ├── zsh.mdd
│ │ ├── zsh.rc
│ │ ├── zsh_system.h
│ │ └── ztype.h
│ ├── Test
│ │ ├── .cvsignore
│ │ ├── .distfiles
│ │ ├── A01grammar.ztst
│ │ ├── A02alias.ztst
│ │ ├── A03quoting.ztst
│ │ ├── A04redirect.ztst
│ │ ├── A05execution.ztst
│ │ ├── A06assign.ztst
│ │ ├── A07control.ztst
│ │ ├── B01cd.ztst
│ │ ├── B02typeset.ztst
│ │ ├── B03print.ztst
│ │ ├── B04read.ztst
│ │ ├── B05eval.ztst
│ │ ├── B06fc.ztst
│ │ ├── B07emulate.ztst
│ │ ├── B08shift.ztst
│ │ ├── B09hash.ztst
│ │ ├── C01arith.ztst
│ │ ├── C02cond.ztst
│ │ ├── C03traps.ztst
│ │ ├── C04funcdef.ztst
│ │ ├── C05debug.ztst
│ │ ├── D01prompt.ztst
│ │ ├── D02glob.ztst
│ │ ├── D03procsubst.ztst
│ │ ├── D04parameter.ztst
│ │ ├── D05array.ztst
│ │ ├── D06subscript.ztst
│ │ ├── D07multibyte.ztst
│ │ ├── D08cmdsubst.ztst
│ │ ├── D09brace.ztst
│ │ ├── E01options.ztst
│ │ ├── E02xtrace.ztst
│ │ ├── Makefile.in
│ │ ├── README
│ │ ├── V02zregexparse.ztst
│ │ ├── V03mathfunc.ztst
│ │ ├── V04features.ztst
│ │ ├── V05styles.ztst
│ │ ├── V07pcre.ztst
│ │ ├── V08zpty.ztst
│ │ ├── V09datetime.ztst
│ │ ├── V10private.ztst
│ │ ├── W01history.ztst
│ │ ├── comptest
│ │ ├── runtests.zsh
│ │ └── ztst.zsh
│ ├── aclocal.m4
│ ├── aczsh.m4
│ ├── config.guess
│ ├── config.h.in
│ ├── config.sub
│ ├── configure
│ ├── configure.ac
│ ├── copy_from_zsh_src.zsh
│ ├── install-sh
│ ├── mkinstalldirs
│ ├── patch_cfgac.diff
│ └── stamp-h.in
│ └── test
│ ├── .gitignore
│ ├── comptest
│ ├── fzftab.ztst
│ ├── runtests.zsh
│ ├── select
│ └── ztst.zsh
├── .local
└── bin
│ ├── appimagetool
│ ├── genfstab
│ ├── kjv
│ ├── lid_shut
│ ├── minecraft-launcher
│ ├── mpd-start
│ ├── music-tool
│ ├── neofetch
│ ├── powersave
│ ├── ransong
│ ├── remap
│ ├── res.sh
│ ├── toggle_dashboard.sh
│ ├── trackpad_toggle.sh
│ ├── ufetch
│ └── unimatrix
└── README.md
/.config/MusicBrainz/.Picard.ini.synclock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/MusicBrainz/.Picard.ini.synclock
--------------------------------------------------------------------------------
/.config/alacritty/alacritty.toml:
--------------------------------------------------------------------------------
1 | import = ["/home/spagett/.config/alacritty/dracula.toml"]
2 |
3 | [font]
4 | size = 20
5 |
6 | [font.normal]
7 | family = "CaskaydiaCove Nerd Font Mono"
8 |
9 | [shell]
10 | program = "/bin/zsh"
11 |
--------------------------------------------------------------------------------
/.config/alacritty/dracula.toml:
--------------------------------------------------------------------------------
1 | [colors.bright]
2 | black = "#6272a4"
3 | blue = "#d6acff"
4 | cyan = "#a4ffff"
5 | green = "#69ff94"
6 | magenta = "#ff92df"
7 | red = "#ff6e6e"
8 | white = "#ffffff"
9 | yellow = "#ffffa5"
10 |
11 | [colors.cursor]
12 | cursor = "CellForeground"
13 | text = "CellBackground"
14 |
15 | [colors.footer_bar]
16 | background = "#282a36"
17 | foreground = "#f8f8f2"
18 |
19 | [colors.hints.end]
20 | background = "#282a36"
21 | foreground = "#f1fa8c"
22 |
23 | [colors.hints.start]
24 | background = "#f1fa8c"
25 | foreground = "#282a36"
26 |
27 | [colors.line_indicator]
28 | background = "None"
29 | foreground = "None"
30 |
31 | [colors.normal]
32 | black = "#21222c"
33 | blue = "#bd93f9"
34 | cyan = "#8be9fd"
35 | green = "#50fa7b"
36 | magenta = "#ff79c6"
37 | red = "#ff5555"
38 | white = "#f8f8f2"
39 | yellow = "#f1fa8c"
40 |
41 | [colors.primary]
42 | background = "0x191724"
43 | bright_foreground = "#ffffff"
44 | foreground = "0xe0def4"
45 |
46 | [colors.search.focused_match]
47 | background = "#ffb86c"
48 | foreground = "#44475a"
49 |
50 | [colors.search.matches]
51 | background = "#50fa7b"
52 | foreground = "#44475a"
53 |
54 | [colors.selection]
55 | background = "#44475a"
56 | text = "CellForeground"
57 |
58 | [colors.vi_mode_cursor]
59 | cursor = "CellForeground"
60 | text = "CellBackground"
61 |
--------------------------------------------------------------------------------
/.config/btop/btop.log:
--------------------------------------------------------------------------------
1 |
2 | 2024/04/09 (22:26:56) | ===> btop++ v.1.3.2
3 | 2024/04/09 (22:26:56) | ERROR: Stall in Runner thread, restarting!
4 | 2024/04/09 (22:27:06) | WARNING: Failed to join _runner thread on exit!
5 |
--------------------------------------------------------------------------------
/.config/eww/images/laptop.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
64 |
--------------------------------------------------------------------------------
/.config/eww/images/mouse.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
42 |
--------------------------------------------------------------------------------
/.config/eww/images/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/eww/images/profile.jpg
--------------------------------------------------------------------------------
/.config/eww/scripts/.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/eww/scripts/.jpg
--------------------------------------------------------------------------------
/.config/eww/scripts/.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/eww/scripts/.png
--------------------------------------------------------------------------------
/.config/eww/scripts/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/eww/scripts/cover.png
--------------------------------------------------------------------------------
/.config/eww/scripts/hyprland:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | workspaces=$(hyprctl workspaces)
3 |
4 | workspace_status() {
5 | if hyprctl activeworkspace | grep -q "ID $num ($num)"; then
6 | echo " $num"
7 | elif echo $workspaces | grep -q "$num ($num)"; then
8 | echo " $num"
9 | else
10 | echo " $num"
11 | fi
12 | }
13 |
14 | active_status() {
15 | if hyprctl activeworkspace | grep -q "ID $num ($num)"; then
16 | echo "btn_active_workspace"
17 | else
18 | echo "btn_workspace"
19 | fi
20 | }
21 |
22 | if [[ "$1" == "--w1" ]]; then
23 | num=1
24 | workspace_status
25 | elif [[ "$1" == "--w2" ]]; then
26 | num=2
27 | workspace_status
28 | elif [[ "$1" == "--w3" ]]; then
29 | num=3
30 | workspace_status
31 | elif [[ "$1" == "--w4" ]]; then
32 | num=4
33 | workspace_status
34 | elif [[ "$1" == "--w5" ]]; then
35 | num=5
36 | workspace_status
37 | elif [[ "$1" == "--w6" ]]; then
38 | num=6
39 | workspace_status
40 | elif [[ "$1" == "--w7" ]]; then
41 | num=7
42 | workspace_status
43 | elif [[ "$1" == "--w8" ]]; then
44 | num=8
45 | workspace_status
46 | elif [[ "$1" == "--w9" ]]; then
47 | num=9
48 | workspace_status
49 | elif [[ "$1" == "--w10" ]]; then
50 | num=10
51 | workspace_status
52 | elif [[ "$1" == "--cw1" ]]; then
53 | num=1
54 | active_status
55 | elif [[ "$1" == "--cw2" ]]; then
56 | num=2
57 | active_status
58 | elif [[ "$1" == "--cw3" ]]; then
59 | num=3
60 | active_status
61 | elif [[ "$1" == "--cw4" ]]; then
62 | num=4
63 | active_status
64 | elif [[ "$1" == "--cw5" ]]; then
65 | num=5
66 | active_status
67 | elif [[ "$1" == "--cw6" ]]; then
68 | num=6
69 | active_status
70 | elif [[ "$1" == "--cw7" ]]; then
71 | num=7
72 | active_status
73 | elif [[ "$1" == "--cw8" ]]; then
74 | num=8
75 | active_status
76 | elif [[ "$1" == "--cw9" ]]; then
77 | num=9
78 | active_status
79 | elif [[ "$1" == "--cw10" ]]; then
80 | num=10
81 | active_status
82 | fi
83 |
--------------------------------------------------------------------------------
/.config/eww/scripts/mails:
--------------------------------------------------------------------------------
1 | #!/bin/python
2 |
3 | import imaplib
4 | obj = imaplib.IMAP4_SSL('imap.gmail.com',993)
5 | obj.login('username@gmail.com','PASSWORD') # write your email and password
6 | obj.select()
7 | print(len(obj.search(None, 'UnSeen')[1][0].split()))
8 |
--------------------------------------------------------------------------------
/.config/eww/scripts/music_info:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Get data
4 | STATUS="$(mpc status)"
5 | COVER="/tmp/.music_cover.jpg"
6 | MUSIC_DIR="$HOME/music"
7 |
8 | ## Get status
9 | get_status() {
10 | if [[ $STATUS == *"[playing]"* ]]; then
11 | echo " "
12 | else
13 | echo " "
14 | fi
15 | }
16 |
17 | ## Get song
18 | get_song() {
19 | song=`mpc -f %title% current`
20 | if [[ -z "$song" ]]; then
21 | echo "Offline"
22 | else
23 | echo "$song"
24 | fi
25 | }
26 |
27 | ## Get artist
28 | get_artist() {
29 | artist=`mpc -f %artist% current`
30 | if [[ -z "$artist" ]]; then
31 | echo "Offline"
32 | else
33 | echo "$artist"
34 | fi
35 | }
36 |
37 | ## Get time
38 | get_time() {
39 | time=`mpc status | grep "%)" | awk '{print $4}' | tr -d '(%)'`
40 | if [[ -z "$time" ]]; then
41 | echo "0"
42 | else
43 | echo "$time"
44 | fi
45 | }
46 | get_ctime() {
47 | ctime=`mpc status | grep "#" | awk '{print $3}' | sed 's|/.*||g'`
48 | if [[ -z "$ctime" ]]; then
49 | echo "0:00"
50 | else
51 | echo "$ctime"
52 | fi
53 | }
54 | get_ttime() {
55 | ttime=`mpc -f %time% current`
56 | if [[ -z "$ttime" ]]; then
57 | echo "0:00"
58 | else
59 | echo "$ttime"
60 | fi
61 | }
62 |
63 | ## Get cover
64 | get_cover() {
65 | ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
66 | STATUS=$?
67 |
68 | # Check if the file has a embbeded album art
69 | if [ "$STATUS" -eq 0 ];then
70 | echo "$COVER"
71 | else
72 | echo "images/music.png"
73 | fi
74 | }
75 |
76 | ## Execute accordingly
77 | if [[ "$1" == "--song" ]]; then
78 | get_song
79 | elif [[ "$1" == "--artist" ]]; then
80 | get_artist
81 | elif [[ "$1" == "--status" ]]; then
82 | get_status
83 | elif [[ "$1" == "--time" ]]; then
84 | get_time
85 | elif [[ "$1" == "--ctime" ]]; then
86 | get_ctime
87 | elif [[ "$1" == "--ttime" ]]; then
88 | get_ttime
89 | elif [[ "$1" == "--cover" ]]; then
90 | get_cover
91 | elif [[ "$1" == "--toggle" ]]; then
92 | mpc -q toggle
93 | elif [[ "$1" == "--next" ]]; then
94 | { mpc -q next; get_cover; }
95 | elif [[ "$1" == "--prev" ]]; then
96 | { mpc -q prev; get_cover; }
97 | fi
98 |
--------------------------------------------------------------------------------
/.config/eww/scripts/net:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | DEVICE="wlan0"
3 |
4 | get_ssid() {
5 | ssid=$(nmcli -t -f GENERAL.CONNECTION d show wlan0 | cut -d":" -f2)
6 | echo $ssid
7 | }
8 | get_ip() {
9 | ip=$(ip a | grep -A 6 "$DEVICE" | grep "inet " | cut -d" " -f6)
10 | echo $ip
11 | }
12 | get_wifi_strength() {
13 | strength=$(nmcli dev wifi list | awk '/\*/{if (NR!=1) {print $8}}')
14 | if [ $strength -le 10 ]; then
15 | echo ""
16 | elif [ $strength -le 30 ]; then
17 | echo ""
18 | elif [ $strength -le 60 ]; then
19 | echo ""
20 | elif [ $strength -le 80 ]; then
21 | echo ""
22 | else
23 | echo ""
24 | fi
25 | }
26 |
27 | if [ "$1" = "--ssid" ]; then
28 | get_ssid
29 | elif [ "$1" = "--ip" ]; then
30 | get_ip
31 | elif [ "$1" = "--strength" ]; then
32 | get_wifi_strength
33 | fi
34 |
--------------------------------------------------------------------------------
/.config/eww/scripts/open_apps:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Open Applications
4 | FILE="$HOME/.cache/eww_launch.dashboard"
5 | CFG="$HOME/.config/eww/dashboard"
6 | EWW=`which eww`
7 |
8 | close_dash() {
9 | ${EWW} --config "$CFG" close \
10 | background profile system clock uptime music github \
11 | reddit twitter youtube weather apps mail logout sleep reboot poweroff folders
12 | rm -rf "$FILE"
13 | }
14 |
15 | if [[ "$1" == "--ff" ]]; then
16 | close_dash && firefox &
17 |
18 | elif [[ "$1" == "--tg" ]]; then
19 | close_dash && telegram-desktop &
20 |
21 | elif [[ "$1" == "--dc" ]]; then
22 | close_dash && discord &
23 |
24 | elif [[ "$1" == "--tr" ]]; then
25 | close_dash && alacritty --working-directory ~ &
26 |
27 | elif [[ "$1" == "--fm" ]]; then
28 | close_dash && thunar ~ &
29 |
30 | elif [[ "$1" == "--ge" ]]; then
31 | close_dash && geany &
32 |
33 | elif [[ "$1" == "--cd" ]]; then
34 | close_dash && code &
35 |
36 | elif [[ "$1" == "--gp" ]]; then
37 | close_dash && gimp &
38 |
39 | elif [[ "$1" == "--vb" ]]; then
40 | close_dash && virtualbox &
41 |
42 | fi
43 |
--------------------------------------------------------------------------------
/.config/eww/scripts/open_folders:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Open folders in thunar
4 | FILE="$HOME/.cache/eww_launch.dashboard"
5 | CFG="$HOME/.config/eww/dashboard"
6 | EWW=`which eww`
7 |
8 | close_dash() {
9 | ${EWW} --config "$CFG" close \
10 | background profile system clock uptime music github \
11 | reddit twitter youtube weather apps mail logout sleep reboot poweroff folders
12 | rm -rf "$FILE"
13 | }
14 |
15 | if [[ "$1" == "--dl" ]]; then
16 | close_dash && thunar ~/Downloads &
17 |
18 | elif [[ "$1" == "--docs" ]]; then
19 | close_dash && thunar ~/Documents &
20 |
21 | elif [[ "$1" == "--music" ]]; then
22 | close_dash && thunar ~/Music &
23 |
24 | elif [[ "$1" == "--pics" ]]; then
25 | close_dash && thunar ~/Pictures &
26 |
27 | elif [[ "$1" == "--cfg" ]]; then
28 | close_dash && thunar ~/.config &
29 |
30 | elif [[ "$1" == "--local" ]]; then
31 | close_dash && thunar ~/.local/share &
32 |
33 | fi
34 |
--------------------------------------------------------------------------------
/.config/eww/scripts/open_links:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Open links in firefox
4 | FILE="$HOME/.cache/eww_launch.dashboard"
5 | CFG="$HOME/.config/eww/dashboard"
6 | EWW=`which eww`
7 | cmd="firefox --new-tab"
8 |
9 | close_dash() {
10 | ${EWW} --config "$CFG" close \
11 | background profile system clock uptime music github \
12 | reddit twitter youtube weather apps mail logout sleep reboot poweroff folders
13 | rm -rf "$FILE"
14 | }
15 |
16 | if [[ "$1" == "--mail" ]]; then
17 | close_dash && ${cmd} "https://mail.google.com"
18 |
19 | elif [[ "$1" == "--gh" ]]; then
20 | close_dash && ${cmd} "https://github.com"
21 |
22 | elif [[ "$1" == "--rd" ]]; then
23 | close_dash && ${cmd} "https://reddit.com"
24 |
25 | elif [[ "$1" == "--tw" ]]; then
26 | close_dash && ${cmd} "https://twitter.com"
27 |
28 | elif [[ "$1" == "--yt" ]]; then
29 | close_dash && ${cmd} "https://youtube.com"
30 |
31 | fi
32 |
--------------------------------------------------------------------------------
/.config/eww/wallpaper.png:
--------------------------------------------------------------------------------
1 | ../projects/dotfiles/.config/wallpaper.png
--------------------------------------------------------------------------------
/.config/kdeglobals:
--------------------------------------------------------------------------------
1 | [General]
2 | TerminalApplication=alacritty
3 |
4 | [KShortcutsDialog Settings]
5 | Dialog Size=636,480
6 |
7 | [PreviewSettings]
8 | MaximumRemoteSize=0
9 |
--------------------------------------------------------------------------------
/.config/mpd/mpd.conf:
--------------------------------------------------------------------------------
1 | music_directory "~/music"
2 | playlist_directory "~/.config/mpd/playlists"
3 | state_file "~/.config/mpd/state"
4 |
5 | auto_update "yes"
6 | bind_to_address "127.0.0.1"
7 | restore_paused "yes"
8 | max_output_buffer_size "16384"
9 |
10 | audio_output {
11 | type "pipewire"
12 | name "PipeWire Sound Server"
13 | #type "alsa"
14 | #name "ALSA"
15 | }
16 |
17 | audio_output {
18 | type "fifo"
19 | name "Visualizer feed"
20 | path "/tmp/mpd.fifo"
21 | format "44100:16:2"
22 | }
23 |
--------------------------------------------------------------------------------
/.config/ncmpcpp/config:
--------------------------------------------------------------------------------
1 | # vim: filetype=conf
2 |
3 | ncmpcpp_directory = "~/.config/ncmpcpp"
4 | lyrics_directory = "~/.local/share/lyrics"
5 | mpd_music_dir = "~/music"
6 | message_delay_time = "1"
7 | visualizer_type = "spectrum"
8 | song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
9 | song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f}
10 | song_library_format = {%n - }{%t}|{%f}
11 | alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
12 | alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
13 | current_item_prefix = $(cyan)$r$b
14 | current_item_suffix = $/r$(end)$/b
15 | current_item_inactive_column_prefix = $(magenta)$r
16 | current_item_inactive_column_suffix = $/r$(end)
17 | playlist_display_mode = columns
18 | browser_display_mode = columns
19 | progressbar_look = ->
20 | media_library_primary_tag = album_artist
21 | media_library_albums_split_by_date = no
22 | startup_screen = "media_library"
23 | display_volume_level = no
24 | ignore_leading_the = yes
25 | external_editor = nvim
26 | use_console_editor = yes
27 | empty_tag_color = magenta
28 | main_window_color = white
29 | progressbar_color = black:b
30 | progressbar_elapsed_color = blue:b
31 | statusbar_color = red
32 | statusbar_time_color = cyan:b
33 |
--------------------------------------------------------------------------------
/.config/ncmpcpp/error.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/ncmpcpp/error.log
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/autoclose.lua:
--------------------------------------------------------------------------------
1 | require("autoclose").setup({
2 | keys = {
3 | ["$"] = { escape = true, close = true, pair = "$$", disabled_filetypes = {"sh"} },
4 | },
5 | })
6 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/bufferline.lua:
--------------------------------------------------------------------------------
1 | local bufferline = require("bufferline")
2 | bufferline.setup {
3 | options = {
4 | indicator = {
5 | icon = '▎', -- this should be omitted if indicator style is not 'icon'
6 | style = 'icon'
7 | },
8 | hover = {
9 | enabled = true,
10 | delay = 200,
11 | reveal = {'close'}
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/colours.lua:
--------------------------------------------------------------------------------
1 | local dracula = require("dracula")
2 | dracula.setup({
3 | -- customize dracula color palette
4 | colors = {
5 | bg = "#282A36",
6 | fg = "#F8F8F2",
7 | selection = "#44475A",
8 | comment = "#6272A4",
9 | red = "#FF5555",
10 | orange = "#FFB86C",
11 | yellow = "#F1FA8C",
12 | green = "#50fa7b",
13 | purple = "#BD93F9",
14 | cyan = "#8BE9FD",
15 | pink = "#FF79C6",
16 | bright_red = "#FF6E6E",
17 | bright_green = "#69FF94",
18 | bright_yellow = "#FFFFA5",
19 | bright_blue = "#D6ACFF",
20 | bright_magenta = "#FF92DF",
21 | bright_cyan = "#A4FFFF",
22 | bright_white = "#FFFFFF",
23 | menu = "#21222C",
24 | visual = "#3E4452",
25 | gutter_fg = "#4B5263",
26 | nontext = "#3B4048",
27 | white = "#ABB2BF",
28 | black = "#191A21",
29 | },
30 | -- show the '~' characters after the end of buffers
31 | show_end_of_buffer = true, -- default false
32 | -- use transparent background
33 | transparent_bg = true, -- default false
34 | -- set custom lualine background color
35 | lualine_bg_color = "#44475a", -- default nil
36 | -- set italic comment
37 | italic_comment = true, -- default false
38 | -- overrides the default highlights with table see `:h synIDattr`
39 | overrides = {},
40 | -- You can use overrides as table like this
41 | -- overrides = {
42 | -- NonText = { fg = "white" }, -- set NonText fg to white
43 | -- NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
44 | -- Nothing = {} -- clear highlight of Nothing
45 | -- },
46 | -- Or you can also use it like a function to get color from theme
47 | -- overrides = function (colors)
48 | -- return {
49 | -- NonText = { fg = colors.white }, -- set NonText fg to white of theme
50 | -- }
51 | -- end,
52 | })
53 | vim.cmd[[colorscheme dracula]]
54 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/comments.lua:
--------------------------------------------------------------------------------
1 | require('nvim_comment').setup{
2 | -- Linters prefer comment and line to have a space in between markers
3 | marker_padding = true,
4 | -- should comment out empty or whitespace only lines
5 | comment_empty = true,
6 | -- trim empty comment whitespace
7 | comment_empty_trim_whitespace = true,
8 | -- Should key mappings be created
9 | create_mappings = false,
10 | -- Normal mode mapping left hand side
11 | line_mapping = "gcc",
12 | -- Visual/Operator mapping left hand side
13 | operator_mapping = "gc",
14 | -- text object mapping, comment chunk,,
15 | comment_chunk_text_object = "ic",
16 | -- Hook function to call before commenting takes place
17 | hook = nil
18 | }
19 | vim.g.mapleader = " "
20 | vim.keymap.set("n", "/", ":CommentToggle")
21 | vim.keymap.set("v", "/", ":'<,'>CommentToggle")
22 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/filetree.lua:
--------------------------------------------------------------------------------
1 | require("nvim-tree").setup({
2 | sort = {
3 | sorter = "case_sensitive",
4 | },
5 | view = {
6 | width = 20,
7 | },
8 | renderer = {
9 | group_empty = true,
10 | },
11 | filters = {
12 | dotfiles = true,
13 | },
14 | })
15 |
16 | -- require("nvim-tree.api").tree.open({
17 | -- path = nil,
18 | -- current_window = false,
19 | -- find_file = false,
20 | -- update_root = false,
21 | -- })
22 |
23 | require("nvim-tree.api").tree.toggle({ focus = false })
24 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/harpoon.lua:
--------------------------------------------------------------------------------
1 | local mark = require("harpoon.mark")
2 | local ui = require("harpoon.ui")
3 |
4 | vim.keymap.set("n", "a", mark.add_file)
5 | vim.keymap.set("n", "e", ui.toggle_quick_menu)
6 |
7 | vim.keymap.set("n", "1", function() ui.nav_file(1) end)
8 | vim.keymap.set("n", "2", function() ui.nav_file(2) end)
9 | vim.keymap.set("n", "3", function() ui.nav_file(3) end)
10 | vim.keymap.set("n", "4", function() ui.nav_file(4) end)
11 | vim.keymap.set("n", "5", function() ui.nav_file(5) end)
12 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/indentblankline.lua:
--------------------------------------------------------------------------------
1 | require("ibl").setup({
2 | enabled = true,
3 | indent = { },
4 | scope = {
5 | enabled = true,
6 | show_start = true,
7 | show_end = false,
8 | injected_languages = false,
9 | highlight = { "Function", "Label" },
10 | priority = 500,
11 | }
12 | })
13 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/lsp.lua:
--------------------------------------------------------------------------------
1 | local lsp_zero = require('lsp-zero')
2 |
3 | lsp_zero.on_attach(function(client, bufnr)
4 | -- see :help lsp-zero-keybindings
5 | -- to learn the available actions
6 | lsp_zero.default_keymaps({ buffer = bufnr })
7 | end)
8 |
9 |
10 | -- here you can setup the language servers
11 | require('mason').setup({})
12 | require('mason-lspconfig').setup({
13 | handlers = {
14 | lsp_zero.default_setup,
15 | },
16 | })
17 |
18 | local cmp = require('cmp')
19 | local cmp_action = require('lsp-zero').cmp_action()
20 |
21 | cmp.setup({
22 | mapping = cmp.mapping.preset.insert({
23 | -- `Enter` key to confirm completion
24 | [''] = cmp.mapping.select_next_item(cmp_select),
25 | [''] = cmp.mapping.select_prev_item(cmp_select),
26 | [''] = cmp.mapping.confirm({ select = true }),
27 |
28 |
29 | -- Ctrl+Space to trigger completion menu
30 | [''] = cmp.mapping.complete(),
31 |
32 | -- Navigate between snippet placeholder
33 | [''] = cmp_action.luasnip_jump_forward(),
34 | [''] = cmp_action.luasnip_jump_backward(),
35 |
36 | -- Scroll up and down in the completion documentation
37 | [''] = cmp.mapping.scroll_docs(-4),
38 | [''] = cmp.mapping.scroll_docs(4),
39 | })
40 | })
41 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/lualine.lua:
--------------------------------------------------------------------------------
1 | -- Bubbles config for lualine
2 | -- Author: lokesh-krishna
3 | -- MIT license, see LICENSE for more details.
4 |
5 | -- stylua: ignore
6 | local colors = {
7 | blue = '#80a0ff',
8 | cyan = '#79dac8',
9 | black = '#080808',
10 | white = '#c6c6c6',
11 | red = '#ff5189',
12 | violet = '#248721',
13 | grey = '#303030',
14 | }
15 |
16 | local bubbles_theme = {
17 | normal = {
18 | a = { fg = colors.black, bg = colors.violet },
19 | b = { fg = colors.white, bg = colors.grey },
20 | c = { fg = colors.black, bg = colors.black },
21 | },
22 |
23 | insert = { a = { fg = colors.black, bg = colors.blue } },
24 | visual = { a = { fg = colors.black, bg = colors.cyan } },
25 | replace = { a = { fg = colors.black, bg = colors.red } },
26 |
27 | inactive = {
28 | a = { fg = colors.white, bg = colors.black },
29 | b = { fg = colors.white, bg = colors.black },
30 | c = { fg = colors.black, bg = colors.black },
31 | },
32 | }
33 |
34 | require('lualine').setup {
35 | options = {
36 | theme = bubbles_theme,
37 | component_separators = '|',
38 | section_separators = { left = '', right = '' },
39 | },
40 | sections = {
41 | lualine_a = {
42 | { 'mode', separator = { left = '' }, right_padding = 2 },
43 | },
44 | lualine_b = { 'filename', 'branch', {'ex.lsp.single',
45 | icons = {
46 | ['lua_ls'] = { '' },
47 | ['rust_analyzer'] = { '' }
48 | },
49 | icons_only = false,
50 | },},
51 | lualine_c = { 'fileformat' },
52 | lualine_x = {},
53 | lualine_y = { 'encoding', 'filetype', 'progress' },
54 | lualine_z = {
55 | { 'location', separator = { right = '' }, left_padding = 2 },
56 | },
57 | },
58 | inactive_sections = {
59 | lualine_a = { 'filename' },
60 | lualine_b = {},
61 | lualine_c = {},
62 | lualine_x = {},
63 | lualine_y = {},
64 | lualine_z = { 'location' },
65 | },
66 | tabline = {},
67 | extensions = {},
68 | }
69 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/rbd.lua:
--------------------------------------------------------------------------------
1 | -- This module contains a number of default definitions
2 | local rainbow_delimiters = require 'rainbow-delimiters'
3 |
4 | ---@type rainbow_delimiters.config
5 | vim.g.rainbow_delimiters = {
6 | strategy = {
7 | [''] = rainbow_delimiters.strategy['global'],
8 | vim = rainbow_delimiters.strategy['local'],
9 | },
10 | query = {
11 | [''] = 'rainbow-delimiters',
12 | lua = 'rainbow-blocks',
13 | },
14 | priority = {
15 | [''] = 110,
16 | lua = 210,
17 | },
18 | highlight = {
19 | 'RainbowDelimiterRed',
20 | 'RainbowDelimiterYellow',
21 | 'RainbowDelimiterBlue',
22 | 'RainbowDelimiterOrange',
23 | 'RainbowDelimiterGreen',
24 | 'RainbowDelimiterViolet',
25 | 'RainbowDelimiterCyan',
26 | },
27 | }
28 | require('rainbow-delimiters.setup').setup(rainbow_delimiters)
29 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/telescope.lua:
--------------------------------------------------------------------------------
1 | local builtin = require('telescope.builtin')
2 | vim.keymap.set('n', 'f', builtin.find_files, {})
3 | vim.keymap.set('n', 'g', builtin.git_files, {})
4 | vim.keymap.set('n', 's', function()
5 | builtin.grep_string({ search = vim.fn.input("Grep > ") });
6 | end)
7 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/terminal.lua:
--------------------------------------------------------------------------------
1 | require("toggleterm").setup{
2 | open_mapping = [[]],
3 | }
4 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/treesitter.lua:
--------------------------------------------------------------------------------
1 | require'nvim-treesitter.configs'.setup {
2 | -- A list of parser names, or "all" (the five listed parsers should always be installed)
3 | ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "bash", "python" },
4 |
5 | -- Install parsers synchronously (only applied to `ensure_installed`)
6 | sync_install = false,
7 |
8 | -- Automatically install missing parsers when entering buffer
9 | -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
10 | auto_install = true,
11 |
12 |
13 | ---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
14 | -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
15 |
16 | highlight = {
17 | enable = true,
18 |
19 | -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
20 | -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
21 | -- Using this option may slow down your editor, and you may see some duplicate highlights.
22 | -- Instead of true it can also be a list of languages
23 | additional_vim_regex_highlighting = false,
24 | },
25 | }
26 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/undotree.lua:
--------------------------------------------------------------------------------
1 | vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle)
2 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/vim_fugitive.lua:
--------------------------------------------------------------------------------
1 | vim.keymap.set("n", "gs", vim.cmd.Git);
2 |
--------------------------------------------------------------------------------
/.config/nvim/after/plugin/vimtex.lua:
--------------------------------------------------------------------------------
1 | vim.cmd('filetype plugin indent on')
2 | vim.cmd('syntax enable')
3 | vim.cmd('let g:vimtex_view_method = "zathura"')
4 | vim.cmd('let maplocalleader = ","')
5 |
--------------------------------------------------------------------------------
/.config/nvim/colors/colour.vim:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/nvim/colors/colour.vim
--------------------------------------------------------------------------------
/.config/nvim/init.lua:
--------------------------------------------------------------------------------
1 | -- disable netrw at the very start of your init.lua
2 | -- vim.g.loaded_netrw = 1
3 | -- vim.g.loaded_netrwPlugin = 1
4 |
5 | require("spagett")
6 |
--------------------------------------------------------------------------------
/.config/nvim/lua/spagett/init.lua:
--------------------------------------------------------------------------------
1 | require("spagett.remaps")
2 | require("spagett.packer")
3 | require("spagett.options")
4 |
--------------------------------------------------------------------------------
/.config/nvim/lua/spagett/options.lua:
--------------------------------------------------------------------------------
1 | vim.opt.nu = true
2 | vim.opt.relativenumber = true
3 |
4 | vim.opt.tabstop = 4
5 | vim.opt.softtabstop = 4
6 | vim.opt.shiftwidth = 4
7 | vim.opt.expandtab = true
8 | vim.opt.smartindent = true
9 |
10 | vim.opt.wrap = false
11 |
12 | vim.opt.swapfile = false
13 | vim.opt.backup = false
14 | vim.opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir"
15 | vim.opt.undofile = true
16 |
17 | vim.opt.hlsearch = true
18 | vim.opt.incsearch = true
19 |
20 | vim.opt.termguicolors = true
21 |
22 | vim.opt.scrolloff = 8
23 | vim.opt.signcolumn = "yes"
24 |
25 | vim.opt.updatetime = 50
26 |
27 | vim.opt.clipboard = "unnamedplus"
28 |
--------------------------------------------------------------------------------
/.config/nvim/lua/spagett/packer.lua:
--------------------------------------------------------------------------------
1 | -- This file can be loaded by calling `lua require('plugins')` from your init.vim
2 |
3 | -- Only required if you have packer configured as `opt`
4 | vim.cmd [[packadd packer.nvim]]
5 |
6 | return require('packer').startup(function(use)
7 | -- Packer can manage itself
8 | use 'wbthomason/packer.nvim'
9 | use {
10 | 'nvim-telescope/telescope.nvim', tag = '0.1.5',
11 | requires = { {'nvim-lua/plenary.nvim'} }
12 | }
13 | use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
14 | use { "ThePrimeagen/harpoon" }
15 | use { "mbbill/undotree" }
16 | use { "tpope/vim-fugitive" }
17 | use {
18 | 'VonHeikemen/lsp-zero.nvim',
19 | branch = 'v3.x',
20 | requires = {
21 | {'williamboman/mason.nvim'},
22 | {'williamboman/mason-lspconfig.nvim'},
23 | {'neovim/nvim-lspconfig'},
24 | {'hrsh7th/nvim-cmp'},
25 | {'hrsh7th/cmp-nvim-lsp'},
26 | {'L3MON4D3/LuaSnip'},
27 | {'rafamadriz/friendly-snippets'},
28 | }
29 | }
30 | use {
31 | 'nvim-lualine/lualine.nvim',
32 | requires = { 'nvim-tree/nvim-web-devicons', opt = true }
33 | }
34 | use {
35 | 'akinsho/bufferline.nvim',
36 | tag = "v4.5.0",
37 | requires = {
38 | 'nvim-tree/nvim-web-devicons',
39 | 'dokwork/lualine-ex' },
40 | }
41 | use { "lukas-reineke/indent-blankline.nvim" }
42 | use { "m4xshen/autoclose.nvim" }
43 | use { "HiPhish/rainbow-delimiters.nvim" }
44 | use { "terrortylor/nvim-comment" }
45 | use { "Mofiqul/dracula.nvim" }
46 | use {
47 | 'nvim-tree/nvim-tree.lua',
48 | requires = {
49 | 'nvim-tree/nvim-web-devicons', -- optional
50 | },
51 | }
52 | use {"akinsho/toggleterm.nvim", tag = '*'}
53 | use {"elentok/format-on-save.nvim"}
54 | use {"lervag/vimtex"}
55 |
56 | end)
57 |
--------------------------------------------------------------------------------
/.config/nvim/lua/spagett/remaps.lua:
--------------------------------------------------------------------------------
1 | vim.g.mapleader = " "
2 | vim.keymap.set("n", "pv", vim.cmd.Ex)
3 |
4 | vim.keymap.set("v", "J", ":m '>+1gv=gv")
5 | vim.keymap.set("v", "K", ":m '<-2gv=gv")
6 |
7 | vim.keymap.set("n", "n", "nzzzv")
8 | vim.keymap.set("n", "N", "Nzzzv")
9 |
10 | vim.keymap.set("x", "p", "\"_dP")
11 |
12 | vim.keymap.set("n", "r", [[:%s/\<\>//gI]])
13 | vim.keymap.set("n", "x", "!chmod +x %", { silent = true })
14 |
15 | vim.keymap.set("n", "h", ":NvimTreeToggle", { silent = true })
16 |
17 | vim.keymap.set("n", "", ":wincmd h", { silent = true })
18 | vim.keymap.set("n", "", ":wincmd j", { silent = true })
19 | vim.keymap.set("n", "", ":wincmd k", { silent = true })
20 | vim.keymap.set("n", "", ":wincmd l", { silent = true })
21 |
22 | vim.keymap.set('t', '', "h", { silent = true })
23 |
24 | vim.keymap.set('n', 'o', ":w | !rustfmt %", { silent = true })
25 |
--------------------------------------------------------------------------------
/.config/rofi/colors.rasi:
--------------------------------------------------------------------------------
1 | * {
2 | background: #2E3440;
3 | background-alt: #20242c;
4 | border: #11131c;
5 | foreground: #a5b6cf;
6 | accent: #90ceaa;
7 |
8 | text-color: @fg;
9 | javacafe-blue: #86aaec;
10 | }
11 |
--------------------------------------------------------------------------------
/.config/rofi/config.rasi:
--------------------------------------------------------------------------------
1 | @theme "appmnu"
2 |
--------------------------------------------------------------------------------
/.config/starship.toml:
--------------------------------------------------------------------------------
1 |
2 | add_newline = false
3 |
4 | [line_break]
5 | disabled = true
6 |
7 | [python]
8 | disabled = true
9 |
10 | [package]
11 | disabled = true
12 |
13 | [ruby]
14 | disabled = true
15 |
16 | [rust]
17 | disabled = true
18 |
19 | [nodejs]
20 | disabled = true
21 |
22 | [java]
23 | disabled = true
24 |
25 | [golang]
26 | disabled = true
27 |
28 | [aws]
29 | disabled = true
30 |
31 | [ lua ]
32 | disabled = true
33 |
--------------------------------------------------------------------------------
/.config/swaync/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "/etc/xdg/swaync/configSchema.json",
3 | "positionX": "right",
4 | "positionY": "top",
5 | "layer": "overlay",
6 | "control-center-layer": "top",
7 | "layer-shell": true,
8 | "cssPriority": "application",
9 | "control-center-margin-top": 0,
10 | "control-center-margin-bottom": 0,
11 | "control-center-margin-right": 0,
12 | "control-center-margin-left": 0,
13 | "notification-2fa-action": true,
14 | "notification-inline-replies": false,
15 | "notification-icon-size": 64,
16 | "notification-body-image-height": 100,
17 | "notification-body-image-width": 200,
18 | "timeout": 10,
19 | "timeout-low": 5,
20 | "timeout-critical": 0,
21 | "fit-to-screen": true,
22 | "relative-timestamps": true,
23 | "control-center-width": 500,
24 | "control-center-height": 600,
25 | "notification-window-width": 500,
26 | "keyboard-shortcuts": true,
27 | "image-visibility": "when-available",
28 | "transition-time": 200,
29 | "hide-on-clear": false,
30 | "hide-on-action": true,
31 | "script-fail-notify": true,
32 | "scripts": {
33 | "example-script": {
34 | "exec": "echo 'Do something...'",
35 | "urgency": "Normal"
36 | },
37 | "example-action-script": {
38 | "exec": "echo 'Do something actionable!'",
39 | "urgency": "Normal",
40 | "run-on": "action"
41 | }
42 | },
43 | "notification-visibility": {
44 | "example-name": {
45 | "state": "muted",
46 | "urgency": "Low",
47 | "app-name": "Spotify"
48 | }
49 | },
50 | "widgets": [
51 | "inhibitors",
52 | "title",
53 | "dnd",
54 | "notifications"
55 | ],
56 | "widget-config": {
57 | "inhibitors": {
58 | "text": "Inhibitors",
59 | "button-text": "Clear All",
60 | "clear-all-button": true
61 | },
62 | "title": {
63 | "text": "Notifications",
64 | "clear-all-button": true,
65 | "button-text": "Clear All"
66 | },
67 | "dnd": {
68 | "text": "Do Not Disturb"
69 | },
70 | "label": {
71 | "max-lines": 5,
72 | "text": "Label Text"
73 | },
74 | "mpris": {
75 | "image-size": 96,
76 | "image-radius": 12
77 | },
78 | "buttons-grid": {
79 | "actions": [
80 | {
81 | "label": "直",
82 | "type": "toggle",
83 | "active": true,
84 | "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'",
85 | "update_command": "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'"
86 | }
87 | ]
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/.config/wallpaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/wallpaper.png
--------------------------------------------------------------------------------
/.config/waybar/catppuccin/frappe.css:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Catppuccin Frappe palette
4 | * Maintainer: rubyowo
5 | *
6 | */
7 |
8 | @define-color base #303446;
9 | @define-color mantle #292c3c;
10 | @define-color crust #232634;
11 |
12 | @define-color text #c6d0f5;
13 | @define-color subtext0 #a5adce;
14 | @define-color subtext1 #b5bfe2;
15 |
16 | @define-color surface0 #414559;
17 | @define-color surface1 #51576d;
18 | @define-color surface2 #626880;
19 |
20 | @define-color overlay0 #737994;
21 | @define-color overlay1 #838ba7;
22 | @define-color overlay2 #949cbb;
23 |
24 | @define-color blue #8caaee;
25 | @define-color lavender #babbf1;
26 | @define-color sapphire #85c1dc;
27 | @define-color sky #99d1db;
28 | @define-color teal #81c8be;
29 | @define-color green #a6d189;
30 | @define-color yellow #e5c890;
31 | @define-color peach #ef9f76;
32 | @define-color maroon #ea999c;
33 | @define-color red #e78284;
34 | @define-color mauve #ca9ee6;
35 | @define-color pink #f4b8e4;
36 | @define-color flamingo #eebebe;
37 | @define-color rosewater #f2d5cf;
38 |
--------------------------------------------------------------------------------
/.config/waybar/catppuccin/latte.css:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Catppuccin Latte palette
4 | * Maintainer: rubyowo
5 | *
6 | */
7 |
8 | @define-color base #eff1f5;
9 | @define-color mantle #e6e9ef;
10 | @define-color crust #dce0e8;
11 |
12 | @define-color text #4c4f69;
13 | @define-color subtext0 #6c6f85;
14 | @define-color subtext1 #5c5f77;
15 |
16 | @define-color surface0 #ccd0da;
17 | @define-color surface1 #bcc0cc;
18 | @define-color surface2 #acb0be;
19 |
20 | @define-color overlay0 #9ca0b0;
21 | @define-color overlay1 #8c8fa1;
22 | @define-color overlay2 #7c7f93;
23 |
24 | @define-color blue #1e66f5;
25 | @define-color lavender #7287fd;
26 | @define-color sapphire #209fb5;
27 | @define-color sky #04a5e5;
28 | @define-color teal #179299;
29 | @define-color green #40a02b;
30 | @define-color yellow #df8e1d;
31 | @define-color peach #fe640b;
32 | @define-color maroon #e64553;
33 | @define-color red #d20f39;
34 | @define-color mauve #8839ef;
35 | @define-color pink #ea76cb;
36 | @define-color flamingo #dd7878;
37 | @define-color rosewater #dc8a78;
38 |
--------------------------------------------------------------------------------
/.config/waybar/catppuccin/macchiato.css:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Catppuccin Mocha palette
4 | * Maintainer: rubyowo
5 | *
6 | */
7 |
8 | @define-color base #24273a;
9 | @define-color mantle #1e2030;
10 | @define-color crust #181926;
11 |
12 | @define-color text #cad3f5;
13 | @define-color subtext0 #a5adcb;
14 | @define-color subtext1 #b8c0e0;
15 |
16 | @define-color surface0 #363a4f;
17 | @define-color surface1 #494d64;
18 | @define-color surface2 #5b6078;
19 |
20 | @define-color overlay0 #6e738d;
21 | @define-color overlay1 #8087a2;
22 | @define-color overlay2 #939ab7;
23 |
24 | @define-color blue #8aadf4;
25 | @define-color lavender #b7bdf8;
26 | @define-color sapphire #7dc4e4;
27 | @define-color sky #91d7e3;
28 | @define-color teal #8bd5ca;
29 | @define-color green #a6da95;
30 | @define-color yellow #eed49f;
31 | @define-color peach #f5a97f;
32 | @define-color maroon #ee99a0;
33 | @define-color red #ed8796;
34 | @define-color mauve #c6a0f6;
35 | @define-color pink #f5bde6;
36 | @define-color flamingo #f0c6c6;
37 | @define-color rosewater #f4dbd6;
38 |
--------------------------------------------------------------------------------
/.config/waybar/catppuccin/mocha.css:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Catppuccin Mocha palette
4 | * Maintainer: rubyowo
5 | @define-color surface0 #26233a;
6 | *
7 | */
8 |
9 | @define-color base #1e1e2e;
10 | @define-color mantle #181825;
11 | @define-color crust #11111b;
12 |
13 | @define-color text #cdd6f4;
14 | @define-color subtext0 #a6adc8;
15 | @define-color subtext1 #bac2de;
16 |
17 | @define-color surface0 #000000;
18 | @define-color surface1 #45475a;
19 | @define-color surface2 #585b70;
20 |
21 | @define-color overlay0 #6c7086;
22 | @define-color overlay1 #7f849c;
23 | @define-color overlay2 #9399b2;
24 |
25 | @define-color blue #89b4fa;
26 | @define-color lavender #b4befe;
27 | @define-color sapphire #74c7ec;
28 | @define-color sky #89dceb;
29 | @define-color teal #94e2d5;
30 | @define-color green #a6e3a1;
31 | @define-color yellow #f9e2af;
32 | @define-color peach #fab387;
33 | @define-color maroon #eba0ac;
34 | @define-color red #f38ba8;
35 | @define-color mauve #cba6f7;
36 | @define-color pink #f5c2e7;
37 | @define-color flamingo #f2cdcd;
38 | @define-color rosewater #f5e0dc;
39 |
--------------------------------------------------------------------------------
/.config/waybar/launch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Terminate all instances of waybar
4 | killall -q waybar
5 |
6 | # Make sure GDK_BACKEND is set to wayland
7 | export GDK_BACKEND=wayland
8 |
9 | # Make sure XDG_CURRENT_DESKTOP is set to Unity (idk waybar said it was needed for a functional tray)
10 | # export XDG_CURRENT_DESKTOP=Unity
11 |
12 | # Make sure XDG_CURRENT_DESKTOP is set to sway (I'm gonna need this more because of flameshot)
13 | # export XDG_CURRENT_DESKTOP=sway
14 |
15 | # I guess I'm ignoring that last XDG_CURRENT_DESKTOP thing because it's not working
16 | export XDG_CURRENT_DESKTOP=Hyprland
17 |
18 | # Launch waybar with logs being piped to /tmp/waybar.log
19 | waybar -l info -c ~/.config/waybar/config > /tmp/waybar.log 2>&1 & disown
20 |
--------------------------------------------------------------------------------
/.config/waybar/scripts/updates.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Original script by @speltriao on GitHub
4 | # https://github.com/speltriao/Pacman-Update-for-GNOME-Shell
5 |
6 | # If the operating system is not Arch Linux, exit the script successfully
7 | if [ ! -f /etc/arch-release ]; then
8 | echo ""
9 | exit 0
10 | fi
11 |
12 | # Calculate updates for each service
13 | AUR=$(paru -Qua | wc -l)
14 | OFFICIAL=$(checkupdates | wc -l)
15 | FLATPAK=$(flatpak update | wc -l)
16 | if [[ "$FLATPAK" = "2" ]]
17 | then
18 | ((FLATPAK = 0))
19 | else
20 | ((FLATPAK = FLATPAK - 5))
21 | fi
22 |
23 | # Case/switch for each service updates
24 | case $1 in
25 | aur) echo "$AUR";;
26 | official) echo "$OFFICIAL";;
27 | flatpak) echo "$FLATPAK";;
28 | esac
29 |
30 | # If the parameter is "update", update all services
31 | if [ "$1" = "update" ]; then
32 | kitty -- 'paru -Syu --noconfirm && flatpak update -y'
33 | fi
34 |
35 | # If there aren't any parameters, return the total number of updates
36 | if [ "$1" = "" ]; then
37 | # Calculate total number of updates
38 | COUNT=$((OFFICIAL+FLATPAK+AUR))
39 |
40 | # If there are updates, the script will output the following: # Updates
41 | # If there are no updates, the script will output nothing.
42 |
43 | if [[ "$COUNT" = "0" ]]
44 | then
45 | echo ""
46 | else
47 | echo " $COUNT"
48 | fi
49 | exit 0
50 | fi
51 |
--------------------------------------------------------------------------------
/.config/zathura/zathurarc:
--------------------------------------------------------------------------------
1 | set sandbox none
2 | set statusbar-h-padding 0
3 | set statusbar-v-padding 0
4 | set page-padding 1
5 | set selection-clipboard clipboard
6 | map u scroll half-up
7 | map d scroll half-down
8 | map D toggle_page_mode
9 | map r reload
10 | map R rotate
11 | map K zoom in
12 | map J zoom out
13 | map i recolor
14 | map p print
15 | map g goto top
16 |
--------------------------------------------------------------------------------
/.config/zsh/.zprofile:
--------------------------------------------------------------------------------
1 | MPD_HOST="127.0.0.1"
2 | XZ_OPT='-T0 -9'
3 | if [ -z "$XDG_RUNTIME_DIR" ]; then
4 | XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir"
5 | mkdir -pm 0700 "$XDG_RUNTIME_DIR"
6 | export XDG_RUNTIME_DIR
7 | fi
8 |
9 | export CARGO_HTTP_MULTIPLEXING=false
10 | if [ $TTY = "/dev/tty1" ]; then
11 | exec dbus-launch --exit-with-session Hyprland
12 | fi
13 |
14 |
--------------------------------------------------------------------------------
/.config/zsh/.zshenv:
--------------------------------------------------------------------------------
1 |
2 | . "$HOME/.cargo/env"
3 |
--------------------------------------------------------------------------------
/.config/zsh/.zshrc:
--------------------------------------------------------------------------------
1 | PATH="$HOME/.local/bin:$PATH"
2 |
3 | # Zsh Options
4 | setopt autocd
5 | stty stop undef
6 |
7 |
8 | # History in cache directory:
9 | HISTSIZE=10000000
10 | SAVEHIST=10000000
11 | HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
12 |
13 |
14 | # Basic auto/tab complete:
15 | autoload -U compinit
16 |
17 | # disable sort when completing `git checkout`
18 | zstyle ':completion:*:git-checkout:*' sort false
19 | # set descriptions format to enable group support
20 | zstyle ':completion:*:descriptions' format '[%d]'
21 | # set list-colors to enable filename colorizing
22 | zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
23 | # preview directory's content with exa when completing cd
24 | zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath'
25 | # switch group using `,` and `.`
26 | zstyle ':fzf-tab:*' switch-group ',' '.'
27 |
28 | zmodload zsh/complist
29 | compinit
30 | _comp_options+=(globdots) # Include hidden files.
31 |
32 |
33 | export KEYTIMEOUT=1
34 | export FZF_DEFAULT_OPTS='--bind=k:up,j:down'
35 |
36 | # Use vim keys in tab complete menu:
37 | if [ -z $NVIM ]; then
38 | bindkey -M menuselect 'h' vi-backward-char
39 | bindkey -M menuselect 'k' vi-up-line-or-history
40 | bindkey -M menuselect 'l' vi-forward-char
41 | bindkey -M menuselect 'j' vi-down-line-or-history
42 | bindkey -v '^?' backward-delete-char
43 | bindkey -v
44 |
45 | # Change cursor shape for different vi modes.
46 | function zle-keymap-select () {
47 | case $KEYMAP in
48 | vicmd) echo -ne '\e[1 q';; # block
49 | viins|main) echo -ne '\e[5 q';; # beam
50 | esac
51 | }
52 |
53 |
54 | zle -N zle-keymap-select
55 | zle-line-init() {
56 | zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
57 | echo -ne "\e[5 q"
58 | }
59 | zle -N zle-line-init
60 | echo -ne '\e[5 q' # Use beam shape cursor on startup.
61 | preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
62 |
63 | export tuifi_vim_mode=True
64 |
65 | fi
66 |
67 | export PICO_SDK_PATH='/home/spagett/projects/pico-sdk'
68 |
69 | # Some alias's
70 | alias rm="rm -rf"
71 | alias cp="cp -r"
72 | # Add colours to ls
73 | alias ls="eza -1 --icons -lh --no-user --no-permissions"
74 |
75 | # Enable syntax highlighting and other plugins
76 | source "$ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh"
77 | source "$ZDOTDIR/plugins/zsh-bash-completions-fallback/zsh-bash-completions-fallback.plugin.zsh"
78 | source "$ZDOTDIR/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"
79 | source "$ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh"
80 |
81 | # Start starship (the prompt)
82 | eval "$(starship init zsh)"
83 |
84 | ufetch
85 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/coloured-man/coloured-man.plugin.zsh:
--------------------------------------------------------------------------------
1 | export LESS_TERMCAP_mb=$'\e[1;32m'
2 | export LESS_TERMCAP_md=$'\e[1;32m'
3 | export LESS_TERMCAP_me=$'\e[0m'
4 | export LESS_TERMCAP_se=$'\e[0m'
5 | export LESS_TERMCAP_so=$'\e[01;33m'
6 | export LESS_TERMCAP_ue=$'\e[0m'
7 | export LESS_TERMCAP_us=$'\e[1;4;31m'
8 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/coloured-man/coloured-man.plugin.zsh.zwc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/coloured-man/coloured-man.plugin.zsh.zwc
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.fast-make-targets:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Almost all code borrowed from Zshell's _make function
3 | #
4 | # Copyright (c) 2018 Sebastian Gniazdowski
5 |
6 | local -a TARGETS
7 |
8 | .make-expandVars() {
9 | local open close var val front='' rest=$1
10 |
11 | while [[ $rest == (#b)[^$]#($)* ]]; do
12 | front=$front${rest[1,$mbegin[1]-1]}
13 | rest=${rest[$mbegin[1],-1]}
14 |
15 | case $rest[2] in
16 | ($) # '$$'. may not appear in target and variable's value
17 | front=$front\$\$
18 | rest=${rest[3,-1]}
19 | continue
20 | ;;
21 | (\() # Variable of the form $(foobar)
22 | open='('
23 | close=')'
24 | ;;
25 | ({) # ${foobar}
26 | open='{'
27 | close='}'
28 | ;;
29 | ([[:alpha:]]) # $foobar. This is exactly $(f)oobar.
30 | open=''
31 | close=''
32 | var=$rest[2]
33 | ;;
34 | (*) # bad parameter name
35 | print -- $front$rest
36 | return 1
37 | ;;
38 | esac
39 |
40 | if [[ -n $open ]]; then
41 | if [[ $rest == \$$open(#b)([[:alnum:]_]##)(#B)$close* ]]; then
42 | var=$match
43 | else # unmatched () or {}, or bad parameter name
44 | print -- $front$rest
45 | return 1
46 | fi
47 | fi
48 |
49 | val=''
50 | if [[ -n ${VAR_ARGS[(i)$var]} ]]; then
51 | val=${VAR_ARGS[$var]}
52 | else
53 | if [[ -n $opt_args[(I)(-e|--environment-overrides)] ]]; then
54 | if [[ $parameters[$var] == scalar-export* ]]; then
55 | val=${(P)var}
56 | elif [[ -n ${VARIABLES[(i)$var]} ]]; then
57 | val=${VARIABLES[$var]}
58 | fi
59 | else
60 | if [[ -n ${VARIABLES[(i)$var]} ]]; then
61 | val=${VARIABLES[$var]}
62 | elif [[ $parameters[$var] == scalar-export* ]]; then
63 | val=${(P)var}
64 | fi
65 | fi
66 | fi
67 | rest=${rest//\$$open$var$close/$val}
68 | done
69 |
70 | print -- ${front}${rest}
71 | }
72 |
73 |
74 | .make-parseMakefile () {
75 | local input var val target dep TAB=$'\t' tmp IFS=
76 |
77 | while read input
78 | do
79 | case "$input " in
80 | # TARGET: dependencies
81 | # TARGET1 TARGET2 TARGET3: dependencies
82 | ([[*?[:alnum:]$][^$TAB:=%]#:[^=]*)
83 | target=$(.make-expandVars ${input%%:*})
84 | TARGETS+=( ${(z)target} )
85 | ;;
86 | esac
87 | done
88 | }
89 |
90 | if [[ -z "${FAST_HIGHLIGHT[chroma-make-cache]}" || $(( EPOCHSECONDS - FAST_HIGHLIGHT[chroma-make-cache-born-at] )) -gt 7 ]]; then
91 | .make-parseMakefile
92 | FAST_HIGHLIGHT[chroma-make-cache-born-at]="$EPOCHSECONDS"
93 | FAST_HIGHLIGHT[chroma-make-cache]="${(j:;:)TARGETS}"
94 | fi
95 |
96 | reply2=( "${(s:;:)FAST_HIGHLIGHT[chroma-make-cache]}" )
97 |
98 | # vim:ft=zsh:et
99 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.fast-read-ini-file:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2018 Sebastian Gniazdowski
2 | #
3 | # $1 - path to the ini file to parse
4 | # $2 - name of output hash (INI by default)
5 | # $3 - prefix for keys in the hash (can be empty)
6 | #
7 | # Writes to given hash under keys built in following way: ${3}_field.
8 | # Values are values from ini file.
9 |
10 | local __ini_file="$1" __out_hash="${2:-INI}" __key_prefix="$3"
11 | local IFS='' __line __cur_section="void" __access_string
12 | local -a match mbegin mend
13 |
14 | [[ ! -r "$__ini_file" ]] && { builtin print -r "fast-syntax-highlighting: an ini file is unreadable ($__ini_file)"; return 1; }
15 |
16 | while read -r -t 1 __line; do
17 | if [[ "$__line" = [[:blank:]]#\;* ]]; then
18 | continue
19 | elif [[ "$__line" = (#b)[[:blank:]]#\[([^\]]##)\][[:blank:]]# ]]; then
20 | __cur_section="${match[1]}"
21 | elif [[ "$__line" = (#b)[[:blank:]]#([^[:blank:]=]##)[[:blank:]]#[=][[:blank:]]#(*) ]]; then
22 | match[2]="${match[2]%"${match[2]##*[! $'\t']}"}" # remove trailing whitespace
23 | __access_string="${__out_hash}[${__key_prefix}<$__cur_section>_${match[1]}]"
24 | : "${(P)__access_string::=${match[2]}}"
25 | fi
26 | done < "$__ini_file"
27 |
28 | return 0
29 |
30 | # vim:ft=zsh:sw=4:sts=4:et
31 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.fast-run-command:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Copyright (c) 2018 Sebastian Gniazdowski
3 | #
4 | # FAST_HIGHLIGHT hash serves as container for variables that
5 | # prevents creating them in global scope. (P) flag is not used,
6 | # output array is fixed (__lines_list).
7 | #
8 | # $1 - the command, e.g. "git remote"; 2>/dev/null redirection is
9 | # added automatically
10 | # $2 - FAST_HIGHLIGHT field name, e.g. "chroma-git-branches"; two
11 | # additional fields will be used, $2-cache, $2-cache-born-at
12 | # $3 - what to remove from beginning of the lines returned by the
13 | # command
14 | # $4 - cache validity time, default 5 (seconds)
15 | #
16 | # Output: array __lines_list, with output of the command ran
17 |
18 | # User should not forget to define this array, the below code
19 | # will only ensure that it's array (can also define a global)
20 | typeset -ga __lines_list
21 | local -a __response
22 |
23 | if [[ -z "${FAST_HIGHLIGHT[$2-cache]}" || $(( EPOCHSECONDS - FAST_HIGHLIGHT[$2-cache-born-at] )) -gt ${4:-5} ]]; then
24 | FAST_HIGHLIGHT[$2-cache-born-at]="$EPOCHSECONDS"
25 | __response=( ${${(f)"$(command ${(Qz)1#+} 2>/dev/null)"}#${~3}} )
26 | [[ "$1" = "+"* ]] && __lines_list+=( "${__response[@]}" ) || __lines_list=( "${__response[@]}" )
27 | FAST_HIGHLIGHT[$2-cache]="${(j:;:)__response}"
28 | else
29 | # Quoted (s:;:) flag without @ will skip empty elements. It
30 | # still produces array output, interesingly. All this is for
31 | # the trailing ";" above, to skip last, empty element.
32 | [[ "$1" = "+"* ]] && \
33 | __lines_list+=( "${(@s:;:)FAST_HIGHLIGHT[$2-cache]}" ) || \
34 | __lines_list=( "${(@s:;:)FAST_HIGHLIGHT[$2-cache]}" )
35 | fi
36 |
37 | # vim:ft=zsh:et:sw=4
38 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.fast-run-git-command:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Copyright (c) 2018 Sebastian Gniazdowski
3 | #
4 | # It runs given command, which in general will be a git command,
5 | # automatically looking at cache first (a field named *-cache,
6 | # in FAST_HIGHLIGHT), which is valid for 5 seconds, and in case
7 | # of outdated or not existing cache, runs the command, splitting
8 | # on new-lines, first checking if PWD is inside git repository.
9 | #
10 | # FAST_HIGHLIGHT hash serves as container for variables that
11 | # prevents creating them in global scope. (P) flag is not used,
12 | # output array is fixed (__lines_list).
13 | #
14 | # $1 - the command, e.g. "git remote"; 2>/dev/null redirection is
15 | # added automatically
16 | # $2 - FAST_HIGHLIGHT field name, e.g. "chroma-git-branches"; two
17 | # additional fields will be used, $2-cache, $2-cache-born-at
18 | # $3 - what to remove from beginning of the lines returned by the
19 | # command
20 | # $4 - cache validity time, default 5 (seconds)
21 | #
22 | # Output: array __lines_list, with output of the (git) command ran
23 |
24 | # User should not forget to define this array, the below code
25 | # will only ensure that it's array (can also define a global)
26 | typeset -ga __lines_list
27 | local -a __response
28 |
29 | if [[ $1 == --status ]] {
30 | integer __status=1
31 | shift
32 | }
33 |
34 | if [[ -z ${FAST_HIGHLIGHT[$2-cache]} || $(( EPOCHSECONDS - FAST_HIGHLIGHT[$2-cache-born-at] )) -gt ${4:-5} ]]; then
35 | FAST_HIGHLIGHT[$2-cache-born-at]=$EPOCHSECONDS
36 | if [[ "$(command git rev-parse --is-inside-work-tree 2>/dev/null)" = true ]]; then
37 | __response=( ${${(f)"$(command ${(Qz)${1#+}} 2>/dev/null)"}#$3} )
38 | integer retval=$?
39 | if (( __status )) {
40 | __response=( $retval )
41 | __lines_list=( $retval )
42 | } else {
43 | [[ "$1" = "+"* ]] && \
44 | __lines_list+=( "${__response[@]}" ) || \
45 | __lines_list=( "${__response[@]}" )
46 | }
47 | else
48 | __lines_list=()
49 | fi
50 | FAST_HIGHLIGHT[$2-cache]="${(j:;:)__response}"
51 | else
52 | # Quoted (s:;:) flag without @ will skip empty elements. It
53 | # still produces array output, interesingly. All this is for
54 | # the trailing ";" above, to skip last, empty element.
55 | [[ "$1" = "+"* ]] && \
56 | __lines_list+=( "${(@s:;:)FAST_HIGHLIGHT[$2-cache]}" ) || \
57 | __lines_list=( "${(@s:;:)FAST_HIGHLIGHT[$2-cache]}" )
58 | fi
59 |
60 | # vim:ft=zsh:et:sw=4
61 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.fast-zts-read-all:
--------------------------------------------------------------------------------
1 | # $1 - file-descriptor to be read from
2 | # $2 - name of output variable (default: REPLY)
3 |
4 | local __in_fd=${1:-0} __out_var=${2:-REPLY}
5 | local -a __tmp
6 | integer __ret=1 __repeat=10 __tmp_size=0
7 |
8 | while sysread -s 65535 -i "$__in_fd" '__tmp[__tmp_size + 1]'; do
9 | (( ( __ret=$? ) == 0 )) && (( ++ __tmp_size ))
10 | (( __ret == 5 )) && { __ret=0; (( --__repeat == 0 )) && break; }
11 | done
12 |
13 | : ${(P)__out_var::="${(j::)__tmp}"}
14 |
15 | return __ret
16 |
17 | # vim: ft=zsh:et:sw=4:sts=4
18 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.github/workflows/linting.yml:
--------------------------------------------------------------------------------
1 | name: Lint
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - main
7 | push:
8 | branches:
9 | - main
10 | workflow_dispatch:
11 |
12 | jobs:
13 |
14 | lint:
15 | name: Lint
16 | runs-on: ubuntu-latest
17 | steps:
18 | - uses: actions/checkout@v3
19 |
20 | - name: install dependencies
21 | run: |
22 | brew install shellcheck shfmt zsh
23 | pip3 install --user linkify-it-py mdformat mdformat-config mdformat-gfm mdformat-shfmt mdformat-tables mdformat-toc
24 |
25 | - name: run mdformat
26 | run: find . -name '*.md' -type f -print0 | xargs -0 -n1 -P4 python3 -m mdformat --check --wrap 120
27 |
28 | - name: run shfmt
29 | run: find . -name '*.sh' -type f -print0 | xargs -0 -n1 -P4 shfmt -bn -ci -d -i 2 -ln bash -s -sr
30 |
31 | - name: run shellcheck
32 | run: find . -name '*.sh' -type f -print0 | xargs -0 -n1 -P4 shellcheck
33 |
34 | - name: "run zsh"
35 | run: find . -name '*.zsh' -type f -print0 | xargs -0 -n1 -P4 zsh -n
36 |
37 | - name: "run zcompile"
38 | run: find . -name '*.zsh' -type f -exec zsh -fc "zcompile {}" \;
39 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.github/workflows/zunit.yaml:
--------------------------------------------------------------------------------
1 | name: zunit
2 | on: [push, pull_request]
3 | jobs:
4 | zunit:
5 | runs-on: ubuntu-latest
6 |
7 | steps:
8 | - name: Check out repository code
9 | uses: actions/checkout@v2
10 |
11 | - name: Install dependencies
12 | run: |
13 | sudo apt install -y zsh
14 |
15 | mkdir bin
16 | curl -fsSL https://raw.githubusercontent.com/molovo/revolver/v0.2.4/revolver > bin/revolver
17 | curl -fsSL https://raw.githubusercontent.com/molovo/color/d8f91ab5fcfceb623ae45d3333ad0e543775549c/color.zsh > bin/color
18 |
19 | git clone https://github.com/zunit-zsh/zunit.git zunit.git
20 | cd zunit.git
21 | git checkout b86c006f62db138a119e9be3a4b41e28876889b2
22 | ./build.zsh
23 | cd ..
24 | mv ./zunit.git/zunit bin
25 |
26 | chmod u+x bin/{color,revolver,zunit}
27 |
28 | - name: Unit tests
29 | run: |
30 | export PATH="$PWD/bin:$PATH"
31 | zunit
32 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.gitignore:
--------------------------------------------------------------------------------
1 | current_theme.zsh
2 | secondary_theme.zsh
3 | theme_overlay.zsh
4 | *.txt
5 | test/out.parse
6 | test/res
7 | hold/*
8 | *.zwc
9 |
10 | ### Vim
11 | # Swap
12 | [._]*.s[a-v][a-z]
13 | [._]*.sw[a-p]
14 | [._]s[a-v][a-z]
15 | [._]sw[a-p]
16 |
17 | # Session
18 | Session.vim
19 |
20 | # Temporary
21 | .netrwhist
22 | *~
23 | # Auto-generated tag files
24 | tags
25 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/.zunit.yml:
--------------------------------------------------------------------------------
1 | tap: false
2 | directories:
3 | tests: tests
4 | output: tests/_output
5 | support: tests/_support
6 | time_limit: 0
7 | fail_fast: false
8 | allow_risky: false
9 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/THEME_GUIDE.md:
--------------------------------------------------------------------------------
1 | # Theme Guide for F-Sy-H
2 |
3 | `fast-theme` tool is used to select a theme. There are 6 shipped themes, they can be listed with `fast-theme -l`. Themes
4 | are basic [INI files](https://github.com/zdharma/fast-syntax-highlighting/tree/master/themes) where each key is a
5 | *style*. Besides shipped themes, user can point this tool to any other theme, by simple `fast-theme ~/mytheme.ini`. To
6 | obtain template to work on when creating own theme, issue `fast-theme --copy-shipped-theme {theme-name}`.
7 |
8 | To alter just a few styles and not create a whole new theme, use **overlay**. What is overlay? It is in the same format
9 | as full theme, but can have only a few styles defined, and these styles will overwrite styles in main-theme. Example
10 | overlay file:
11 |
12 | ```ini
13 | ; overlay.ini
14 | [base]
15 | commandseparator = yellow,bold
16 | comment = 17
17 |
18 | [command-point]
19 | function = green
20 | command = 180
21 | ```
22 |
23 | File name `overlay.ini` is treated specially.
24 |
25 | When specifing path, following short-hands can be used:
26 |
27 | ```
28 | XDG: = ~/.config/fsh (respects $XDG_CONFIG_HOME env var)
29 | LOCAL: = /usr/local/share/fsh/
30 | HOME: = ~/.fsh/
31 | OPT: = /opt/local/share/fsh/
32 | ```
33 |
34 | So for example, issue `fast-theme XDG:overlay` to load `~/.config/fsh/overlay.ini` as overlay. The `.ini` extension is
35 | optional.
36 |
37 | ## Secondary Theme
38 |
39 | Each theme has key `secondary`, e.g. for theme `free`:
40 |
41 | ```ini
42 | ; free.ini
43 | [base]
44 | default = none
45 | unknown-token = red,bold
46 | ; ...
47 | ; ...
48 | ; ...
49 | secondary = zdharma
50 | ```
51 |
52 | Secondary theme (`zdharma` in the example) will be used for highlighting of argument for `eval` and of `$( ... )`
53 | interior (i.e. of interior of command substitution). Basically, recursive highlighting uses alternate theme to make the
54 | highlighted code distinct:
55 |
56 | 
57 |
58 | In the above screen-shot the interior of `$( ... )` uses different colors than the rest of the code. Example for `eval`:
59 |
60 | 
61 |
62 | First line doesn't use recursive highlighting, highlights `eval` argument as regular string. Second line switches theme
63 | to `zdharma` and does full recursive highlighting of eval argument.
64 |
65 | ## Custom Working Directory
66 |
67 | Set `$FAST_WORK_DIR` before loading the plugin to have e.g. processed theme files (ready to load, in Zsh format, not
68 | INI) kept under specified location. This is handy if e.g. you install Fast-Syntax-Highlighting system-wide (e.g. from
69 | AUR on ArchLinux) and want to have per-user theme setup.
70 |
71 | You can use "~" in the path, e.g. `FAST_WORK_DIR=~/.fsh` and also the `XDG:`, `LOCAL:`, `OPT:`, etc. short-hands, so
72 | e.g. `FAST_WORK_DIR=XDG` or `FAST_WORK_DIR=XDG:` is allowed (in this case it will be changed to `$HOME/.config/fsh` by
73 | default by F-Sy-H loader).
74 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/_fast-theme:
--------------------------------------------------------------------------------
1 | #compdef fast-theme
2 |
3 | #
4 | # Copyright (c) 2018 Sebastian Gniazdowski
5 | #
6 | # Completion for theme-switching function, fast-theme,
7 | # part of zdharma/fast-syntax-highlighting.
8 | #
9 |
10 | integer ret=1
11 | local -a arguments
12 |
13 | arguments=(
14 | {-h,--help}'[display help text]'
15 | {-l,--list}'[list available themes]'
16 | {-r,--reset}'[unset any theme (revert to default highlighting)]'
17 | {-R,--ov-reset}'[unset overlay, use styles only from main-theme (requires restart)]'
18 | {-q,--quiet}'[no default messages]'
19 | {-s,--show}'[get and display the theme currently being set]'
20 | {-v,--verbose}'[more messages during operation]'
21 | {-t,--test}'[test theme after setting it (show example code)]'
22 | {-p,--palette}'[just print all 256 colors and exit (useful when creating a theme)]'
23 | {-w,--workdir}'[cd into $FAST_WORK_DIR (if not set, then into the plugin directory)]'
24 | )
25 |
26 | typeset -a themes
27 | themes=( "$FAST_WORK_DIR"/themes/*.ini(:t:r) )
28 |
29 | if [[ -d ${XDG_CONFIG_HOME:-$HOME/.config}/fsh ]] {
30 | typeset -a themes2
31 | themes2=( "${XDG_CONFIG_HOME:-$HOME/.config}"/fsh/*.ini(:t:r) )
32 | themes+=( XDG:${^themes2[@]} )
33 | }
34 |
35 | _wanted themes expl "Themes" \
36 | compadd "$@" -a - themes && ret=0
37 | _arguments -s $arguments && ret=0
38 |
39 | return $ret
40 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/fast-string-highlight:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:sw=4:sts=4
2 |
3 | #
4 | # $1 - PREBUFFER
5 | # $2 - BUFFER
6 | #
7 | function -fast-highlight-string-process {
8 | emulate -LR zsh
9 | setopt extendedglob warncreateglobal typesetsilent
10 |
11 | local -A pos_to_level level_to_pos pair_map final_pairs
12 | local input=$1$2 _mybuf=$1$2 __style __quoting
13 | integer __idx=0 __pair_idx __level=0 __start __end
14 | local -a match mbegin mend
15 |
16 | pair_map=( "(" ")" "{" "}" "[" "]" )
17 |
18 | while [[ $_mybuf = (#b)([^"{}()[]\\\"'"]#)((["({[]})\"'"])|[\\](*))(*) ]]; do
19 | if [[ -n ${match[4]} ]] {
20 | __idx+=${mbegin[2]}
21 |
22 | [[ $__quoting = \' ]] && _mybuf=${match[4]} || { _mybuf=${match[4]:1}; (( ++ __idx )); }
23 | } else {
24 | __idx+=${mbegin[2]}
25 | [[ -z $__quoting && -z ${_FAST_COMPLEX_BRACKETS[(r)$((__idx-${#PREBUFFER}-1))]} ]] && {
26 | if [[ ${match[2]} = ["({["] ]]; then
27 | pos_to_level[$__idx]=$(( ++__level ))
28 | level_to_pos[$__level]=$__idx
29 | elif [[ ${match[2]} = ["]})"] ]]; then
30 | if (( __level > 0 )); then
31 | __pair_idx=${level_to_pos[$__level]}
32 | pos_to_level[$__idx]=$(( __level -- ))
33 | [[ ${pair_map[${input[__pair_idx]}]} = ${input[__idx]} ]] && {
34 | final_pairs[$__idx]=$__pair_idx
35 | final_pairs[$__pair_idx]=$__idx
36 | }
37 | else
38 | pos_to_level[$__idx]=-1
39 | fi
40 | fi
41 | }
42 |
43 | if [[ ${match[2]} = \" && $__quoting != \' ]] {
44 | [[ $__quoting = '"' ]] && __quoting="" || __quoting='"';
45 | }
46 | if [[ ${match[2]} = \' && $__quoting != \" ]] {
47 | if [[ $__quoting = ("'"|"$'") ]] {
48 | __quoting=""
49 | } else {
50 | if [[ $match[1] = *\$ ]] {
51 | __quoting="\$'";
52 | } else {
53 | __quoting="'";
54 | }
55 | }
56 | }
57 | _mybuf=${match[5]}
58 | }
59 | done
60 |
61 | for __idx in ${(k)pos_to_level}; do
62 | (( ${+final_pairs[$__idx]} )) && __style=${FAST_THEME_NAME}bracket-level-$(( ( (pos_to_level[$__idx]-1) % 3 ) + 1 )) || __style=${FAST_THEME_NAME}unknown-token
63 | (( __start=__idx-${#PREBUFFER}-1, __end=__idx-${#PREBUFFER}, __start >= 0 )) && \
64 | reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
65 | done
66 |
67 | # If cursor is on a bracket, then highlight corresponding bracket, if any.
68 | if [[ $WIDGET != zle-line-finish ]]; then
69 | __idx=$(( CURSOR + 1 ))
70 | if (( ${+pos_to_level[$__idx]} )) && (( ${+final_pairs[$__idx]} )); then
71 | (( __start=final_pairs[$__idx]-${#PREBUFFER}-1, __end=final_pairs[$__idx]-${#PREBUFFER}, __start >= 0 )) && \
72 | reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}paired-bracket]}") && \
73 | reply+=("$CURSOR $__idx ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}paired-bracket]}")
74 | fi
75 | fi
76 | return 0
77 | }
78 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/203654.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/203654.gif
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/array-assign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/array-assign.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/assign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/assign.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/brackets.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/brackets.gif
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/cmdsubst.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/cmdsubst.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/cplx_cond.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/cplx_cond.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/eval_cmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/eval_cmp.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/execfd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/execfd.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/execfd_cmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/execfd_cmp.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/for-loop-cmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/for-loop-cmp.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/for-loop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/for-loop.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/function.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/function.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/git_chroma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/git_chroma.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/global-alias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/global-alias.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/heredoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/heredoc.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/herestring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/herestring.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/highlight-less.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/highlight-less.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/highlight-much.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/highlight-much.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/ideal-string.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/ideal-string.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/in_string.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/in_string.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/math.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/math.gif
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/parameter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/parameter.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/theme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/theme.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/typeset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/typeset.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/images/zcalc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/images/zcalc.png
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/tests/_output/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/tests/_output/.gitkeep
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/tests/_support/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fast-syntax-highlighting/tests/_support/.gitkeep
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/tests/_support/bootstrap:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | # Write your bootstrap code here
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/tests/example.zunit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zunit
2 | @setup {
3 | load "../fast-highlight"
4 | }
5 |
6 | @test 'ls /usr/bin' {
7 | PREBUFFER=""
8 | BUFFER="ls /usr/bin"
9 | run -fast-highlight-process "$PREBUFFER" "$BUFFER" 0 \; print -rl -- \$reply
10 |
11 | assert "$lines[1]" same_as "0 2 fg=green"
12 | assert "$lines[2]" same_as "3 11 fg=magenta,underline"
13 | }
14 |
15 | # vim:ft=zsh:sw=4:sts=4:et
16 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/base16.ini:
--------------------------------------------------------------------------------
1 | [base]
2 | default = none
3 | unknown-token = 1,bold
4 | commandseparator = none
5 | redirection = none
6 | here-string-tri = 14
7 | here-string-text = bg:11
8 | here-string-var = 1,bg:11
9 | exec-descriptor = 9,bold
10 | comment = 8
11 | correct-subtle = 12
12 | incorrect-subtle = 1
13 | subtle-separator = 12
14 | subtle-bg = bg:10
15 | ; secondary =
16 | ; recursive-base =
17 |
18 | [command-point]
19 | reserved-word = 5
20 | subcommand = 6
21 | alias = 4
22 | suffix-alias = 4
23 | global-alias = 4,bg:11
24 | builtin = 4
25 | function = 4
26 | command = 4
27 | precommand = 6
28 | hashed-command = 4
29 | single-sq-bracket = 4
30 | double-sq-bracket = 4
31 | double-paren = 5
32 |
33 | [paths]
34 | path = 9
35 | pathseparator =
36 | path-to-dir = 9,underline
37 | globbing = 6
38 | globbing-ext = 6,bold
39 |
40 | [brackets]
41 | paired-bracket = bg:8
42 | bracket-level-1 = 3,bold
43 | bracket-level-2 = 6,bold
44 | bracket-level-3 = 2,bold
45 |
46 | [arguments]
47 | single-hyphen-option = 3
48 | double-hyphen-option = 3
49 | back-quoted-argument = none
50 | single-quoted-argument = 2
51 | double-quoted-argument = 2
52 | dollar-quoted-argument = 2
53 |
54 | [in-string]
55 | ; backslash in $'...'
56 | back-dollar-quoted-argument = 6
57 | ; backslash or $... in "..."
58 | back-or-dollar-double-quoted-argument = 1
59 |
60 | [other]
61 | variable = 1
62 | assign = none
63 | assign-array-bracket = 5
64 | history-expansion = 6,bold
65 |
66 | [math]
67 | mathvar = 1
68 | mathnum = 9
69 | matherr = 1,bold
70 |
71 | [for-loop]
72 | forvar = 1
73 | fornum = 9
74 | ; operator
75 | foroper = none
76 | ; separator
77 | forsep = none
78 |
79 | [case]
80 | case-input = 1
81 | case-parentheses = 5
82 | case-condition = bg:10
83 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/clean.ini:
--------------------------------------------------------------------------------
1 | [base]
2 | default = none
3 | unknown-token = 124,bold
4 | commandseparator = none
5 | redirection = none
6 | here-string-tri = yellow
7 | here-string-text = bg:19
8 | here-string-var = 185,bg:19
9 | exec-descriptor = yellow,bold
10 | comment = black,bold
11 | correct-subtle = bg:55
12 | incorrect-subtle = bg:52
13 | subtle-bg = bg:17
14 | secondary = zdharma
15 | recursive-base = 183
16 |
17 | [command-point]
18 | reserved-word = 146
19 | subcommand = 146
20 | alias = 109
21 | suffix-alias = 109
22 | global-alias = bg:19
23 | builtin = 109
24 | function = 109
25 | command = 109
26 | precommand = 109
27 | hashed-command = 109
28 | single-sq-bracket = 109
29 | double-sq-bracket = 109
30 | double-paren = 146
31 |
32 | [paths]
33 | path = 208
34 | pathseparator =
35 | path-to-dir = 208,underline
36 | globbing = 220
37 | globbing-ext = 225
38 |
39 | [brackets]
40 | paired-bracket = bg:blue
41 | bracket-level-1 = 115
42 | bracket-level-2 = 177
43 | bracket-level-3 = 220
44 |
45 | [arguments]
46 | single-hyphen-option = 185
47 | double-hyphen-option = 185
48 | back-quoted-argument = none
49 | single-quoted-argument = 147
50 | double-quoted-argument = 147
51 | dollar-quoted-argument = 147
52 |
53 | [in-string]
54 | ; backslash in $'...'
55 | back-dollar-quoted-argument = 185
56 | ; backslash or $... in "..." (i.e. variable in string)
57 | back-or-dollar-double-quoted-argument = 185
58 |
59 | [other]
60 | variable = none
61 | assign = none
62 | assign-array-bracket = 109
63 | history-expansion = blue,bold
64 |
65 | [math]
66 | mathvar = blue,bold
67 | mathnum = 208
68 | matherr = 124
69 |
70 | [for-loop]
71 | forvar = none
72 | fornum = 208
73 | ; operator
74 | foroper = 147
75 | ; separator
76 | forsep = 109
77 |
78 | [case]
79 | case-input = 109
80 | case-parentheses = 116
81 | case-condition = bg:19
82 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/default.ini:
--------------------------------------------------------------------------------
1 | ; default theme, also embedded in the source of fast-syntax-highlighting
2 |
3 | [base]
4 | default = none
5 | unknown-token = red,bold
6 | commandseparator = none
7 | redirection = none
8 | here-string-tri = yellow
9 | here-string-text = 18
10 | here-string-var = cyan,bg:18
11 | exec-descriptor = yellow,bold
12 | comment = black,bold
13 | correct-subtle = 12
14 | incorrect-subtle = red
15 | subtle-separator = green
16 | subtle-bg = bg:18
17 | secondary = free
18 | ; recursive-base =
19 |
20 | [command-point]
21 | reserved-word = yellow
22 | subcommand = yellow
23 | alias = green
24 | suffix-alias = green
25 | global-alias = bg:blue
26 | builtin = green
27 | function = green
28 | command = green
29 | precommand = green
30 | hashed-command = green
31 | single-sq-bracket = green
32 | double-sq-bracket = green
33 | double-paren = yellow
34 |
35 | [paths]
36 | path = magenta
37 | pathseparator =
38 | path-to-dir = magenta,underline
39 | globbing = blue,bold
40 | globbing-ext = 13
41 |
42 | [brackets]
43 | paired-bracket = bg:blue
44 | bracket-level-1 = green,bold
45 | bracket-level-2 = yellow,bold
46 | bracket-level-3 = cyan,bold
47 |
48 | [arguments]
49 | single-hyphen-option = cyan
50 | double-hyphen-option = cyan
51 | back-quoted-argument = none
52 | single-quoted-argument = yellow
53 | double-quoted-argument = yellow
54 | dollar-quoted-argument = yellow
55 |
56 | [in-string]
57 | ; backslash in $'...'
58 | back-dollar-quoted-argument = cyan
59 | ; backslash or $... in "..."
60 | back-or-dollar-double-quoted-argument = cyan
61 |
62 | [other]
63 | variable = 113
64 | assign = none
65 | assign-array-bracket = green
66 | history-expansion = blue,bold
67 |
68 | [math]
69 | mathvar = blue,bold
70 | mathnum = magenta
71 | matherr = red
72 |
73 | [for-loop]
74 | forvar = none
75 | fornum = magenta
76 | ; operator
77 | foroper = yellow
78 | ; separator
79 | forsep = yellow,bold
80 |
81 | [case]
82 | case-input = green
83 | case-parentheses = yellow
84 | case-condition = bg:blue
85 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/forest.ini:
--------------------------------------------------------------------------------
1 | [base]
2 | default = none
3 | unknown-token = 124,bold
4 | commandseparator = none
5 | redirection = none
6 | here-string-tri = yellow
7 | here-string-text = underline
8 | here-string-var = 65,underline
9 | exec-descriptor = yellow,bold
10 | comment = black,bold
11 | correct-subtle = bg:55
12 | incorrect-subtle = bg:52
13 | subtle-bg = bg:18
14 | secondary = zdharma
15 | recursive-base = 183
16 |
17 | [command-point]
18 | reserved-word = 186
19 | subcommand = 186
20 | alias = 101
21 | suffix-alias = 101
22 | global-alias = bg:55
23 | builtin = 101
24 | function = 101
25 | command = 101
26 | precommand = 101
27 | hashed-command = 101
28 | single-sq-bracket = 101
29 | double-sq-bracket = 101
30 | double-paren = 186
31 |
32 | [paths]
33 | path = 107
34 | pathseparator =
35 | path-to-dir = 107,underline
36 | globbing = 114
37 | globbing-ext = 118
38 |
39 | [brackets]
40 | paired-bracket = bg:blue
41 | bracket-level-1 = green,bold
42 | bracket-level-2 = yellow,bold
43 | bracket-level-3 = cyan,bold
44 |
45 | [arguments]
46 | single-hyphen-option = 65
47 | double-hyphen-option = 65
48 | back-quoted-argument = none
49 | single-quoted-argument = 186
50 | double-quoted-argument = 186
51 | dollar-quoted-argument = 186
52 |
53 | [in-string]
54 | ; backslash in $'...'
55 | back-dollar-quoted-argument = 65
56 | ; backslash or $... in "..."
57 | back-or-dollar-double-quoted-argument = 65
58 |
59 | [other]
60 | variable = none
61 | assign = none
62 | assign-array-bracket = 101
63 | history-expansion = 114
64 |
65 | [math]
66 | mathvar = 114
67 | mathnum = 107
68 | matherr = 124
69 |
70 | [for-loop]
71 | forvar = none
72 | fornum = 107
73 | ; operator
74 | foroper = 186
75 | ; separator
76 | forsep = 109
77 |
78 | [case]
79 | case-input = 101
80 | case-parentheses = 65
81 | case-condition = underline
82 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/free.ini:
--------------------------------------------------------------------------------
1 | [base]
2 | default = none
3 | unknown-token = red,bold
4 | commandseparator = none
5 | redirection = none
6 | here-string-tri = yellow
7 | here-string-text = bg:19
8 | here-string-var = 110,bg:19
9 | exec-descriptor = yellow,bold
10 | comment = black,bold
11 | correct-subtle = bg:55
12 | incorrect-subtle = bg:52
13 | subtle-bg = bg:18
14 | secondary = zdharma
15 | recursive-base = 183
16 |
17 | [command-point]
18 | reserved-word = 150
19 | subcommand = 150
20 | alias = 180
21 | suffix-alias = 180
22 | global-alias = bg:19
23 | builtin = 180
24 | function = 180
25 | command = 180
26 | precommand = 180
27 | hashed-command = 180
28 | single-sq-bracket = 180
29 | double-sq-bracket = 180
30 | double-paren = 150
31 |
32 | [paths]
33 | path = 166
34 | pathseparator =
35 | path-to-dir = 166,underline
36 | globbing = 112
37 | globbing-ext = 118
38 |
39 | [brackets]
40 | paired-bracket = bg:blue
41 | bracket-level-1 = 130
42 | bracket-level-2 = 70
43 | bracket-level-3 = 69
44 |
45 | [arguments]
46 | single-hyphen-option = 110
47 | double-hyphen-option = 110
48 | back-quoted-argument = none
49 | single-quoted-argument = 150
50 | double-quoted-argument = 150
51 | dollar-quoted-argument = 150
52 |
53 | [in-string]
54 | ; backslash in $'...'
55 | back-dollar-quoted-argument = 110
56 | ; backslash or $... in "..." (i.e. variable inside a string)
57 | back-or-dollar-double-quoted-argument = 110
58 |
59 | [other]
60 | variable = none
61 | assign = none
62 | assign-array-bracket = 180
63 | history-expansion = blue,bold
64 |
65 | [math]
66 | mathvar = blue,bold
67 | mathnum = 166
68 | matherr = red
69 |
70 | [for-loop]
71 | forvar = none
72 | fornum = 150
73 | ; operator
74 | foroper = 150
75 | ; separator
76 | forsep = 109
77 |
78 | [case]
79 | case-input = 180
80 | case-parentheses = 116
81 | case-condition = bg:19
82 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/safari.ini:
--------------------------------------------------------------------------------
1 | ; Light theme with colors of a Sahara oasis
2 |
3 | [base]
4 | default = none
5 | unknown-token = red,bold
6 | commandseparator = none
7 | redirection = none
8 | here-string-tri = yellow
9 | here-string-text = bg:19
10 | here-string-var = 153,bg:19
11 | exec-descriptor = yellow,bold
12 | comment = black,bold
13 | correct-subtle = bg:55
14 | incorrect-subtle = bg:52
15 | subtle-bg = bg:18
16 | secondary = zdharma
17 | recursive-base = 183
18 |
19 | [command-point]
20 | reserved-word = 150
21 | subcommand = 150
22 | alias = 185
23 | suffix-alias = 185
24 | global-alias = bg:19
25 | builtin = 185
26 | function = 185
27 | command = 185
28 | precommand = 185
29 | hashed-command = 185
30 | single-sq-bracket = 185
31 | double-sq-bracket = 185
32 | double-paren = 150
33 |
34 | [paths]
35 | path = 187
36 | pathseparator =
37 | path-to-dir = 187,underline
38 | globbing = 180
39 | globbing-ext = 184
40 |
41 | [brackets]
42 | paired-bracket = bg:blue
43 | bracket-level-1 = 178
44 | bracket-level-2 = 148
45 | bracket-level-3 = 141
46 |
47 | [arguments]
48 | single-hyphen-option = 152
49 | double-hyphen-option = 152
50 | back-quoted-argument = none
51 | single-quoted-argument = 151
52 | double-quoted-argument = 151
53 | dollar-quoted-argument = 151
54 |
55 | [in-string]
56 | ; backslash in $'...'
57 | back-dollar-quoted-argument = 153
58 | ; backslash or $... in "..." (i.e. variable inside a string)
59 | back-or-dollar-double-quoted-argument = 153
60 |
61 | [other]
62 | variable = none
63 | assign = none
64 | assign-array-bracket = 185
65 | history-expansion = blue,bold
66 |
67 | [math]
68 | mathvar = blue,bold
69 | mathnum = 187
70 | matherr = red
71 |
72 | [for-loop]
73 | forvar = none
74 | fornum = 187
75 | ; operator
76 | foroper = 151
77 | ; separator
78 | forsep = 109
79 |
80 | [case]
81 | case-input = 185
82 | case-parentheses = 116
83 | case-condition = bg:19
84 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/spa.ini:
--------------------------------------------------------------------------------
1 | ; 144, 187, 110, 203
2 | [base]
3 | default = none
4 | unknown-token = 196
5 | commandseparator = 150
6 | redirection = none
7 | here-string-tri = yellow
8 | here-string-text = bg:19
9 | here-string-var = 186,bg:19
10 | exec-descriptor = yellow,bold
11 | comment = black,bold
12 | correct-subtle = bg:55
13 | incorrect-subtle = bg:52
14 | subtle-bg = bg:17
15 | secondary = zdharma
16 | recursive-base = 183
17 |
18 | [command-point]
19 | reserved-word = 144
20 | subcommand = 144
21 | alias = 187
22 | suffix-alias = 187
23 | global-alias = bg:19
24 | builtin = 150
25 | function = 187
26 | command = 187
27 | precommand = 187
28 | hashed-command = 187
29 | single-sq-bracket = 150
30 | double-sq-bracket = 150
31 | double-paren = 144
32 |
33 | [paths]
34 | path = 110
35 | pathseparator =
36 | path-to-dir = 110,underline
37 | globbing = 220
38 | globbing-ext = 225
39 |
40 | [brackets]
41 | paired-bracket = bg:blue
42 | bracket-level-1 = 115
43 | bracket-level-2 = 177
44 | bracket-level-3 = 220
45 |
46 | [arguments]
47 | single-hyphen-option = 185
48 | double-hyphen-option = 185
49 | back-quoted-argument = none
50 | single-quoted-argument = 110
51 | double-quoted-argument = 110
52 | dollar-quoted-argument = 110
53 |
54 | [in-string]
55 | ; backslash in $'...'
56 | back-dollar-quoted-argument = 186
57 | ; backslash or $... in "..." (i.e. variable in string)
58 | back-or-dollar-double-quoted-argument = 186
59 |
60 | [other]
61 | variable = none
62 | assign = none
63 | assign-array-bracket = 187
64 | history-expansion = blue,bold
65 |
66 | [math]
67 | mathvar = 150
68 | mathnum = 110
69 | matherr = 196
70 |
71 | [for-loop]
72 | forvar = 71
73 | fornum = 110
74 | ; operator
75 | foroper = 203
76 | ; separator
77 | forsep = 147
78 |
79 | [case]
80 | case-input = 187
81 | case-parentheses = 116
82 | case-condition = bg:19
83 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/sv-orple.ini:
--------------------------------------------------------------------------------
1 | ; https://www.syntaxenvy.com/0073437
2 | ;
3 | ; comment:
4 | ; #363355 -> 61
5 | ; keyword:
6 | ; #dda69f -> 181 (138)
7 | ; number, string:
8 | ; #ca887e -> 174 (173)
9 | ; title, section, name, selector-id:
10 | ; #b3afd9 -> 146 (146)
11 | ; attribute, variable, type:
12 | ; #be85c0 -> 139 (140)
13 | ; symbol, link:
14 | ; #d6a2d8 -> 182 (182)
15 | ; builtin, deletion:
16 | ; #969c77 -> 108 (108)
17 | ; formula-bg:
18 | ; #211f37 -> 16 (17)
19 |
20 | [base]
21 | default = none
22 | unknown-token = 124
23 | commandseparator = 146
24 | redirection = none
25 | here-string-tri = 138
26 | here-string-text = bg:25
27 | here-string-var = 140,bg:25
28 | exec-descriptor = 140
29 | comment = 61
30 | correct-subtle = bg:55
31 | incorrect-subtle = bg:52
32 | subtle-bg = bg:17
33 | secondary = clean
34 | recursive-base = 186
35 |
36 | [command-point]
37 | reserved-word = 138
38 | subcommand = 182
39 | alias = 140
40 | suffix-alias = 140
41 | global-alias = bg:17
42 | builtin = 173
43 | function = 140
44 | command = 108
45 | precommand = 138
46 | hashed-command = 140
47 | single-sq-bracket = 173
48 | double-sq-bracket = 173
49 | double-paren = 138
50 |
51 | [paths]
52 | path = 182
53 | pathseparator =
54 | path-to-dir = 182,underline
55 | globbing = 138
56 | globbing-ext = 141
57 |
58 | [brackets]
59 | paired-bracket = bg:blue
60 | bracket-level-1 = 173
61 | bracket-level-2 = 177
62 | bracket-level-3 = 220
63 |
64 | [arguments]
65 | single-hyphen-option = 140
66 | double-hyphen-option = 140
67 | back-quoted-argument = none
68 | single-quoted-argument = 173
69 | double-quoted-argument = 173
70 | dollar-quoted-argument = 173
71 |
72 | [in-string]
73 | ; backslash in $'...'
74 | back-dollar-quoted-argument = 146
75 | ; backslash or $... in "..." (i.e. variable in string)
76 | back-or-dollar-double-quoted-argument = 140
77 |
78 | [other]
79 | variable = none
80 | assign = none
81 | assign-array-bracket = 182
82 | history-expansion = blue,bold
83 |
84 | [math]
85 | mathvar = 140
86 | mathnum = 173
87 | matherr = 124
88 |
89 | [for-loop]
90 | forvar = 140
91 | fornum = 173
92 | ; operator
93 | foroper = 147
94 | ; separator
95 | forsep = 182
96 |
97 | [case]
98 | case-input = 140
99 | case-parentheses = 17
100 | case-condition = bg:25
101 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/sv-plant.ini:
--------------------------------------------------------------------------------
1 | ; https://www.syntaxenvy.com/0854668
2 | ;
3 | ; comment:
4 | ; #5b4e3f -> 58
5 | ; keyword:
6 | ; #a1f2b2 -> 157
7 | ; number, string:
8 | ; #91cf9e -> 115 (114)
9 | ; title, section, name, selector-id:
10 | ; #dadff0 -> 189
11 | ; attribute, variable, type:
12 | ; #debb91 -> 180
13 | ; symbol, link:
14 | ; #f1dcc6 -> 224
15 | ; builtin, deletion:
16 | ; #95cbc1 -> 115
17 | ; formula:
18 | ; #3f352a -> 16
19 |
20 | [base]
21 | default = none
22 | unknown-token = 124
23 | commandseparator = 189
24 | redirection = none
25 | here-string-tri = 157
26 | here-string-text = bg:25
27 | here-string-var = 180,bg:25
28 | exec-descriptor = 180
29 | comment = 58
30 | correct-subtle = bg:55
31 | incorrect-subtle = bg:52
32 | subtle-bg = bg:17
33 | secondary = zdharma
34 | recursive-base = 183
35 |
36 | [command-point]
37 | reserved-word = 157
38 | subcommand = 224
39 | alias = 180
40 | suffix-alias = 180
41 | global-alias = bg:58
42 | builtin = 115
43 | function = 180
44 | command = 180
45 | precommand = 157
46 | hashed-command = 180
47 | single-sq-bracket = 115
48 | double-sq-bracket = 115
49 | double-paren = 157
50 |
51 | [paths]
52 | path = 224
53 | pathseparator =
54 | path-to-dir = 224,underline
55 | globbing = 157
56 | globbing-ext = 159
57 |
58 | [brackets]
59 | paired-bracket = bg:blue
60 | bracket-level-1 = 115
61 | bracket-level-2 = 177
62 | bracket-level-3 = 220
63 |
64 | [arguments]
65 | single-hyphen-option = 180
66 | double-hyphen-option = 180
67 | back-quoted-argument = none
68 | single-quoted-argument = 114
69 | double-quoted-argument = 114
70 | dollar-quoted-argument = 114
71 |
72 | [in-string]
73 | ; backslash in $'...'
74 | back-dollar-quoted-argument = 189
75 | ; backslash or $... in "..." (i.e. variable in string)
76 | back-or-dollar-double-quoted-argument = 180
77 |
78 | [other]
79 | variable = none
80 | assign = none
81 | assign-array-bracket = 224
82 | history-expansion = blue,bold
83 |
84 | [math]
85 | mathvar = 180
86 | mathnum = 114
87 | matherr = 124
88 |
89 | [for-loop]
90 | forvar = 180
91 | fornum = 114
92 | ; operator
93 | foroper = 147
94 | ; separator
95 | forsep = 224
96 |
97 | [case]
98 | case-input = 180
99 | case-parentheses = 58
100 | case-condition = bg:25
101 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/themes/zdharma.ini:
--------------------------------------------------------------------------------
1 | [base]
2 | default = none
3 | unknown-token = red,bold
4 | commandseparator = none
5 | redirection = none
6 | here-string-tri = 141
7 | here-string-text = bg:19
8 | here-string-var = 177,bg:19
9 | exec-descriptor = yellow,bold
10 | comment = black,bold
11 | correct-subtle = bg:55
12 | incorrect-subtle = bg:52
13 | subtle-bg = bg:17
14 | secondary = safari
15 | recursive-base = 186
16 |
17 | [command-point]
18 | reserved-word = 146
19 | reserved-word = 146
20 | alias = 63
21 | suffix-alias = 63
22 | global-alias = bg:19
23 | builtin = 63
24 | function = 63
25 | command = 63
26 | precommand = 63
27 | hashed-command = 63
28 | single-sq-bracket = 63
29 | double-sq-bracket = 63
30 | double-paren = 146
31 |
32 | [paths]
33 | path = 154
34 | pathseparator =
35 | path-to-dir = 154,underline
36 | globbing = 114
37 | globbing-ext = 153
38 |
39 | [brackets]
40 | paired-bracket = bg:blue
41 | bracket-level-1 = 117
42 | bracket-level-2 = 141
43 | bracket-level-3 = 90
44 |
45 | [arguments]
46 | single-hyphen-option = 177
47 | double-hyphen-option = 177
48 | back-quoted-argument = none
49 | single-quoted-argument = 146
50 | double-quoted-argument = 146
51 | dollar-quoted-argument = 146
52 |
53 | [in-string]
54 | ; backslash in $'...'
55 | back-dollar-quoted-argument = 177
56 | ; backslash or $... in "..."
57 | back-or-dollar-double-quoted-argument = 177
58 |
59 | [other]
60 | variable = none
61 | assign = none
62 | assign-array-bracket = 63
63 | history-expansion = blue,bold
64 |
65 | [math]
66 | mathvar = blue,bold
67 | mathnum = 154
68 | matherr = red
69 |
70 | [for-loop]
71 | forvar = none
72 | fornum = 154
73 | ; operator
74 | foroper = 146
75 | ; separator
76 | forsep = 109
77 |
78 | [case]
79 | case-input = 63
80 | case-parentheses = 141
81 | case-condition = bg:19
82 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-alias.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | [[ "$__arg_type" = 3 ]] && return 2
4 |
5 | local __first_call="$1" __wrd="${2%%=*}" __start_pos="$3" __end_pos="$4"
6 |
7 | if (( __first_call )) || [[ "$2" = -* ]]; then
8 | return 1
9 | else
10 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
11 | return 1
12 | elif (( $+aliases[(e)$__wrd] )) || (( ${+galiases[(e)$__wrd]} )); then
13 | (( __start=__start_pos-${#PREBUFFER}, __end=__start_pos+${#__wrd}-${#PREBUFFER}, __start >= 0 )) \
14 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}correct-subtle]}")
15 | elif (( $+functions[(e)$__wrd] )) || (( $+builtins[(e)$__wrd] )) || (( $+commands[(e)$__wrd] )) || (( $reswords[(Ie)$__wrd] )); then
16 | (( __start=__start_pos-${#PREBUFFER}, __end=__start_pos+${#__wrd}-${#PREBUFFER}, __start >= 0 )) \
17 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}incorrect-subtle]}")
18 | else
19 | return 1
20 | fi
21 | if [[ "$__wrd" != "$2" ]]; then
22 | return 1
23 | fi
24 | fi
25 |
26 | (( this_word = next_word ))
27 | _start_pos=$_end_pos
28 |
29 | return 0
30 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-autorandr.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | [[ "$__arg_type" = 3 ]] && return 2
4 |
5 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
6 |
7 | if (( __first_call )) || [[ "$__wrd" = -* ]]; then
8 | return 1
9 | else
10 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
11 | return 1
12 | fi
13 | if [[ -d "${XDG_CONFIG_HOME:-$HOME/.config}/autorandr/$__wrd" ]] then
14 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
15 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}correct-subtle]}")
16 | fi
17 | fi
18 |
19 | (( this_word = next_word ))
20 | _start_pos=$_end_pos
21 |
22 | return 0
23 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-fast-theme.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | [[ "$__arg_type" = 3 ]] && return 2
4 |
5 | local __first_call="$1" __wrd="${(Q)2}" __start_pos="$3" __end_pos="$4"
6 | local __style
7 |
8 | if (( __first_call )); then
9 | FAST_HIGHLIGHT[chroma-fast-theme-first]=0
10 | return 1
11 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
12 | return 1
13 | elif (( ${FAST_HIGHLIGHT[chroma-fast-theme-first]} )) || [[ $__wrd = -* ]]; then
14 | return 1
15 | else
16 | FAST_HIGHLIGHT[chroma-fast-theme-first]=1
17 | fi
18 |
19 | if [[ "$__wrd" = */* || "$__wrd" = (XDG|LOCAL|HOME|OPT):* ]]; then
20 | __wrd="${${__wrd/(#s)XDG:/${${XDG_CONFIG_HOME:-$HOME/.config}%/}/fsh/}%.ini}.ini"
21 | __wrd="${${__wrd/(#s)LOCAL://usr/local/share/fsh/}%.ini}.ini"
22 | __wrd="${${__wrd/(#s)HOME:/$HOME/.fsh/}%.ini}.ini"
23 | __wrd="${${__wrd/(#s)OPT://opt/local/share/fsh/}%.ini}.ini"
24 | __wrd=${~__wrd} # allow user to quote ~
25 | else
26 | __wrd="$FAST_BASE_DIR/themes/$__wrd.ini"
27 | fi
28 |
29 | if [[ -f $__wrd ]]; then
30 | __style=${FAST_THEME_NAME}path
31 | else
32 | __style=${FAST_THEME_NAME}incorrect-subtle
33 | fi
34 |
35 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
36 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
37 | (( this_word = next_word ))
38 | _start_pos=$_end_pos
39 |
40 | return 0
41 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-fpath_peq.ch:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Copyright (c) 2018 Sebastian Gniazdowski
3 | #
4 | # This chroma does a narrow, obscure but prestigious parsing of fpath+=( elem1
5 | # elem2 ... ) construct to provide *the* *future* contents of $fpath to
6 | # -autoload.ch, so that it can detect functions in those provided directories
7 | # `elem1', `elem2', etc. and highlight the functions with `correct-subtle'
8 | # instead of `incorrect-subtle'. Basically all thit is for command-lines like:
9 | #
10 | # % fpath+=( `pwd` ); autoload my-fun-from-PWD
11 |
12 | # Keep chroma-takever state meaning: until ; or similar (see $__arg_type below)
13 | # The 8192 sum takes care that the next token will be routed to this chroma
14 | (( next_word = 2 | 8192 ))
15 |
16 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
17 | local -a deserialized
18 |
19 | (( __first_call )) && {
20 | case $__wrd in
21 | (fpath=\()
22 | FAST_HIGHLIGHT[fpath_peq_mode]=1
23 | ;;
24 | (fpath+=\()
25 | FAST_HIGHLIGHT[fpath_peq_mode]=2
26 | ;;
27 | (FPATH=)
28 | FAST_HIGHLIGHT[fpath_peq_mode]=4
29 | ;;
30 | (FPATH+=)
31 | FAST_HIGHLIGHT[fpath_peq_mode]=8
32 | ;;
33 | esac
34 | if (( FAST_HIGHLIGHT[fpath_peq_mode] & 5 )); then
35 | FAST_HIGHLIGHT[chroma-fpath_peq-elements]="! ${FAST_HIGHLIGHT[chroma-fpath_peq-elements]}"
36 | fi
37 | return 1
38 | } || {
39 | # Following call, i.e. not the first one
40 |
41 | # Check if chroma should end – test if token is of type
42 | # "starts new command", if so pass-through – chroma ends
43 | [[ "$__arg_type" = 3 ]] && return 2
44 |
45 | [[ "$__wrd" != ")" ]] && {
46 | deserialized=( "${(Q@)${(z@)FAST_HIGHLIGHT[chroma-fpath_peq-elements]}}" )
47 | [[ -z "${deserialized[1]}" && ${#deserialized} -eq 1 ]] && deserialized=()
48 | # Support ~ and $VAR, for [a-zA-Z_][a-ZA-Z0-9_]# characters in "VAR"
49 | deserialized+=( "${(Q)${${(j: :)__wrd}//(#b)((\$([0-9]##|[a-zA-Z_][a-zA-Z0-9_]#))|(\$\{([0-9]##|[a-zA-Z_][a-zA-Z0-9_]#)\})|(#s)~)/${(P)${${${${match[1]##\$\{(#c0,1)}%\}}:#\~}:-HOME}}}}" )
50 | FAST_HIGHLIGHT[chroma-fpath_peq-elements]="${(j: :)${(q@)deserialized}}"
51 | }
52 |
53 | return 1
54 | }
55 |
56 | (( this_word = next_word ))
57 | _start_pos=$_end_pos
58 |
59 | return 0
60 |
61 | # vim:ft=zsh:et:sw=4
62 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-hub.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
4 |
5 | if (( __first_call )); then
6 | chroma/-git.ch $*
7 | return 1
8 | fi
9 | [[ "$__arg_type" = 3 ]] && return 2
10 |
11 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
12 | return 1
13 | fi
14 |
15 | if [[ "$__wrd" != -* ]] && (( FAST_HIGHLIGHT[chroma-git-got-subcommand] == 0 )); then
16 | .fast-run-command "git config --get-regexp 'alias.*'" chroma-git-alias-list "" $(( 5 * 60 ))
17 | # Grep for line: alias.{user-entered-subcmd}[[:space:]], and remove alias. prefix
18 | __lines_list=( ${${(M)__lines_list[@]:#alias.${__wrd}[[:space:]]##*}#alias.} )
19 |
20 | if (( ${#__lines_list} > 0 )); then
21 | # (*)
22 | # First remove alias name (#*[[:space:]]) and the space after it, then
23 | # remove any leading spaces from what's left (##[[:space:]]##), then
24 | # remove everything except the first word that's in the left line
25 | # (%%[[:space:]]##*, i.e.: "everything from right side up to any space")
26 | FAST_HIGHLIGHT[chroma-git-subcommand]="${${${__lines_list[1]#*[[:space:]]}##[[:space:]]##}%%[[:space:]]##*}"
27 | else
28 | FAST_HIGHLIGHT[chroma-git-subcommand]="$__wrd"
29 | fi
30 | if [[ "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "browse" \
31 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "ci-status" \
32 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "compare" \
33 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "create" \
34 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "delete" \
35 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "fork" \
36 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "issue" \
37 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "pr" \
38 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "pull-request" \
39 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "release" \
40 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "sync" ]]; then
41 | FAST_HIGHLIGHT[chroma-git-got-subcommand]=1
42 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
43 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}subcommand]}")
44 | (( FAST_HIGHLIGHT[chroma-git-counter] += 1 ))
45 | (( this_word = next_word ))
46 | _start_pos=$4
47 | return 0
48 | fi
49 | fi
50 |
51 | chroma/-git.ch $*
52 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-lab.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | #
3 | # The `lab' tool after which this chroma is modeled after:
4 | # https://github.com/zaquestion/lab
5 | #
6 | (( next_word = 2 | 8192 ))
7 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
8 |
9 | if (( __first_call )); then
10 | chroma/-git.ch $*
11 | return 1
12 | fi
13 | [[ "$__arg_type" = 3 ]] && return 2
14 |
15 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
16 | return 1
17 | fi
18 |
19 | if [[ "$__wrd" != -* ]] && (( FAST_HIGHLIGHT[chroma-git-got-subcommand] == 0 )); then
20 | .fast-run-command "git config --get-regexp 'alias.*'" chroma-git-alias-list "" $(( 5 * 60 ))
21 | # Grep for line: alias.{user-entered-subcmd}[[:space:]], and remove alias. prefix
22 | __lines_list=( ${${(M)__lines_list[@]:#alias.${__wrd}[[:space:]]##*}#alias.} )
23 |
24 | if (( ${#__lines_list} > 0 )); then
25 | # (*)
26 | # First remove alias name (#*[[:space:]]) and the space after it, then
27 | # remove any leading spaces from what's left (##[[:space:]]##), then
28 | # remove everything except the first word that's in the left line
29 | # (%%[[:space:]]##*, i.e.: "everything from right side up to any space")
30 | FAST_HIGHLIGHT[chroma-git-subcommand]="${${${__lines_list[1]#*[[:space:]]}##[[:space:]]##}%%[[:space:]]##*}"
31 | else
32 | FAST_HIGHLIGHT[chroma-git-subcommand]="$__wrd"
33 | fi
34 | if [[ "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "browse" \
35 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "ci" \
36 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "mr" \
37 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "project" \
38 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "snippet" \
39 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "ci-status" \
40 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "compare" \
41 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "create" \
42 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "delete" \
43 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "fork" \
44 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "issue" \
45 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "pr" \
46 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "pull-request" \
47 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "release" \
48 | || "${FAST_HIGHLIGHT[chroma-git-subcommand]}" = "sync" ]]; then
49 | FAST_HIGHLIGHT[chroma-git-got-subcommand]=1
50 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
51 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}subcommand]}")
52 | (( FAST_HIGHLIGHT[chroma-git-counter] += 1 ))
53 | (( this_word = next_word ))
54 | _start_pos=$4
55 | return 0
56 | fi
57 | fi
58 |
59 | chroma/-git.ch $*
60 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-nmcli.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | [[ "$__arg_type" = 3 ]] && return 2
4 |
5 | typeset -A subcommands
6 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4" subcommand
7 | subcommands=(
8 | help "_"
9 | general "help status hostname permissions logging _"
10 | networking "help on off connectivity _"
11 | radio "help all wifi wwan _"
12 | connection "help show up down add modify clone edit delete monitor reload load import export _"
13 | device "help status show set connect reapply modify disconnect delete monitor wifi lldp _"
14 | agent "help secret polkit all _"
15 | monitor "help _"
16 | _ "_"
17 | )
18 |
19 | if (( __first_call )); then
20 | FAST_HIGHLIGHT[chroma-nmcli-subcommand-a]=""
21 | FAST_HIGHLIGHT[chroma-nmcli-subcommand-b]=""
22 | return 1
23 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
24 | return 1
25 | elif [[ "$2" = -* ]]; then
26 | return 1
27 | elif [[ -z ${FAST_HIGHLIGHT[chroma-nmcli-subcommand-a]} ]]; then
28 | for subcommand in ${(@k)subcommands}; do
29 | [[ $subcommand = $__wrd* ]] && break || subcommand="_"
30 | done
31 | if [[ $subcommand = _ ]]; then
32 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
33 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}incorrect-subtle]}")
34 | else
35 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
36 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}subcommand]}")
37 | fi
38 | FAST_HIGHLIGHT[chroma-nmcli-subcommand-a]="$subcommand"
39 | elif [[ -z ${FAST_HIGHLIGHT[chroma-nmcli-subcommand-b]} ]]; then
40 | for subcommand in ${(s. .)subcommands[${FAST_HIGHLIGHT[chroma-nmcli-subcommand-a]}]}; do
41 | [[ "$subcommand" = $__wrd* ]] && break || subcommand="_"
42 | done
43 | if [[ $subcommand = _ ]]; then
44 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
45 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}incorrect-subtle]}")
46 | else
47 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
48 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}subcommand]}")
49 | fi
50 | FAST_HIGHLIGHT[chroma-nmcli-subcommand-b]="$subcommand"
51 | else
52 | return 1
53 | fi
54 |
55 | (( this_word = next_word ))
56 | _start_pos=$_end_pos
57 |
58 | return 0
59 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-node.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | [[ "$__arg_type" = 3 ]] && return 2
4 |
5 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
6 | local __style
7 |
8 | if (( __first_call )); then
9 | FAST_HIGHLIGHT[chroma-node-file]=1
10 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
11 | return 1
12 | elif [[ "$__wrd" = -- ]]; then
13 | FAST_HIGHLIGHT[chroma-node-file]=2
14 | elif (( FAST_HIGHLIGHT[chroma-node-file] != 2 )) && [[ "$__wrd" = -* ]]; then
15 | if [[ "$__wrd" = -*e* || "$__wrd" = --eval ]]; then
16 | FAST_HIGHLIGHT[chroma-node-file]=0
17 | fi
18 | elif (( FAST_HIGHLIGHT[chroma-node-file] )); then
19 | if [[ "$__wrd" = debug || "$__wrd" = inspect ]]; then
20 | __style=${FAST_THEME_NAME}subcommand
21 | else
22 | FAST_HIGHLIGHT[chroma-node-file]=0
23 | if [[ -f ${~__wrd} || -f ${~__wrd}.js || -f ${~__wrd}/index.js ]]; then
24 | __style=${FAST_THEME_NAME}path
25 | else
26 | __style=${FAST_THEME_NAME}incorrect-subtle
27 | fi
28 | fi
29 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
30 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
31 | (( this_word = next_word ))
32 | _start_pos=$_end_pos
33 |
34 | return 0
35 | fi
36 |
37 | return 1
38 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-precommand.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 |
3 | local __first_call="$1" __start_pos="$3" __end_pos="$4"
4 |
5 | [[ "$__arg_type" = 3 ]] && return 2
6 |
7 | (( __first_call )) && {
8 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
9 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}precommand]}")
10 | (( next_word = (next_word & ~2) | 4 | 1 ))
11 | } || {
12 | return 1
13 | }
14 |
15 | (( this_word = next_word ))
16 | _start_pos=$_end_pos
17 | return 0
18 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-sh.ch:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Copyright (c) 2018 Sebastian Gniazdowski
3 | #
4 | # Chroma function for `sh' shell. It colorizes string passed with -c option.
5 | #
6 | # $1 - 0 or 1, denoting if it's first call to the chroma, or following one
7 | # $2 - the current token, also accessible by $__arg from the above scope -
8 | # basically a private copy of $__arg
9 | # $3 - a private copy of $_start_pos, i.e. the position of the token in the
10 | # command line buffer, used to add region_highlight entry (see man),
11 | # because Zsh colorizes by *ranges* in command line buffer
12 | # $4 - a private copy of $_end_pos from the above scope
13 | #
14 |
15 | (( next_word = 2 | 8192 ))
16 |
17 | local __first_call=$1 __wrd=$2 __start_pos=$3 __end_pos=$4
18 | local __style
19 | integer __idx1 __idx2
20 | local -a __lines_list
21 |
22 | (( __first_call )) && {
23 | # Called for the first time - new command
24 | FAST_HIGHLIGHT[chrome-git-got-c]=0
25 | return 1
26 | } || {
27 | # Following call, i.e. not the first one
28 |
29 | # Check if chroma should end – test if token is of type
30 | # "starts new command", if so pass-through – chroma ends
31 | [[ $__arg_type = 3 ]] && return 2
32 |
33 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
34 | return 1
35 | fi
36 |
37 | __wrd=${${${(Q)__wrd}#[\"\']}%[\"\']}
38 | if [[ $__wrd = -* && $__wrd != -*c* ]]; then
39 | __style=${FAST_THEME_NAME}${${${__wrd:#--*}:+single-hyphen-option}:-double-hyphen-option}
40 | else
41 | if (( FAST_HIGHLIGHT[chrome-git-got-c] == 1 )); then
42 | for (( __idx1 = 1, __idx2 = 1; __idx2 <= __asize; ++ __idx1 )); do
43 | [[ ${__arg[__idx2]} = ${__wrd[__idx1]} ]] && break
44 | while [[ ${__arg[__idx2]} != ${__wrd[__idx1]} ]]; do
45 | (( ++ __idx2 ))
46 | (( __idx2 > __asize )) && { __idx2=0; break; }
47 | done
48 | (( __idx2 == 0 )) && break
49 | [[ ${__arg[__idx2]} = ${__wrd[__idx1]} ]] && break
50 | done
51 |
52 | FAST_HIGHLIGHT[chrome-git-got-c]=0
53 | (( _start_pos-__PBUFLEN >= 0 )) && \
54 | -fast-highlight-process "$PREBUFFER" "${__wrd}" "$(( __start_pos + __idx2 - 1 ))"
55 | elif [[ $__wrd = -*c* ]]; then
56 | FAST_HIGHLIGHT[chrome-git-got-c]=1
57 | else
58 | return 1
59 | fi
60 | fi
61 | }
62 |
63 | # Add region_highlight entry (via `reply' array)
64 | [[ -n $__style ]] && (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
65 |
66 | # We aren't passing-through, do obligatory things ourselves
67 | (( this_word = next_word ))
68 | _start_pos=$_end_pos
69 |
70 | return 0
71 |
72 | # vim:ft=zsh:et:sw=4
73 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-source.ch:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Copyright (c) 2018 Sebastian Gniazdowski
3 | #
4 | # Chroma for `source' builtin - verifies if file to be sourced compiles
5 | # correctly.
6 | #
7 | # $1 - 0 or 1, denoting if it's first call to the chroma, or following one
8 | #
9 | # $2 - the current token, also accessible by $__arg from the above scope -
10 | # basically a private copy of $__arg; the token can be eg.: "grep"
11 | #
12 | # $3 - a private copy of $_start_pos, i.e. the position of the token in the
13 | # command line buffer, used to add region_highlight entry (see man),
14 | # because Zsh colorizes by *ranges* in command line buffer
15 | #
16 | # $4 - a private copy of $_end_pos from the above scope
17 | #
18 |
19 | (( next_word = 2 | 8192 ))
20 |
21 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
22 | local __style __chars __home=${XDG_CACHE_HOME:-$HOME/.cache}/fsh
23 | integer __idx1 __idx2
24 |
25 | # First call, i.e. command starts, i.e. "grep" token etc.
26 | (( __first_call )) && {
27 | FAST_HIGHLIGHT[chroma-src-counter]=0
28 | __style=${FAST_THEME_NAME}builtin
29 |
30 | } || {
31 | # Following call, i.e. not the first one.
32 |
33 | # Check if chroma should end – test if token is of type
34 | # "starts new command", if so pass-through – chroma ends
35 | [[ "$__arg_type" = 3 ]] && return 2
36 |
37 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
38 | return 1
39 | fi
40 |
41 | if [[ "$__wrd" = -* ]]; then
42 | # Detected option, add style for it.
43 | [[ "$__wrd" = --* ]] && __style=${FAST_THEME_NAME}double-hyphen-option || \
44 | __style=${FAST_THEME_NAME}single-hyphen-option
45 | else
46 | # Count non-option tokens.
47 | (( FAST_HIGHLIGHT[chroma-src-counter] += 1, __idx1 = FAST_HIGHLIGHT[chroma-src-counter] ))
48 |
49 | if (( FAST_HIGHLIGHT[chroma-src-counter] == 1 )); then
50 | command mkdir -p "$__home"
51 | command cp -f "${__wrd}" "$__home" 2>/dev/null && {
52 | zcompile "$__home"/"${__wrd:t}" 2>/dev/null 1>&2 && __style=${FAST_THEME_NAME}correct-subtle || __style=${FAST_THEME_NAME}incorrect-subtle
53 | }
54 | elif (( FAST_HIGHLIGHT[chroma-src-counter] == 2 )); then
55 | # Handle paths, etc. normally - just pass-through to the big
56 | # highlighter (the main FSH highlighter, used before chromas).
57 | return 1
58 | fi
59 | fi
60 | }
61 |
62 | # Add region_highlight entry (via `reply' array).
63 | #
64 | # This is a common place of adding such entry, but any above
65 | # code can do it itself (and it does) and skip setting __style
66 | # to disable this code.
67 | [[ -n "$__style" ]] && (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
68 |
69 | # We aren't passing-through (no return 1 occured), do obligatory things ourselves.
70 | (( this_word = next_word ))
71 | _start_pos=$_end_pos
72 |
73 | return 0
74 |
75 | # vim:ft=zsh:et:sw=4
76 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-subcommand.ch:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh:et:sw=4
2 | (( next_word = 2 | 8192 ))
3 | [[ "$__arg_type" = 3 ]] && return 2
4 |
5 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
6 |
7 | if (( __first_call )); then
8 | FAST_HIGHLIGHT[chroma-subcommand]=""
9 | return 1
10 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
11 | return 1
12 | elif [[ "$2" = -* ]]; then
13 | return 1
14 | elif [[ -z "${FAST_HIGHLIGHT[chroma-subcommand]}" ]]; then
15 | FAST_HIGHLIGHT[chroma-subcommand]="$__wrd"
16 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
17 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}subcommand]}")
18 | else
19 | return 1
20 | fi
21 |
22 | (( this_word = next_word ))
23 | _start_pos=$_end_pos
24 |
25 | return 0
26 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fast-syntax-highlighting/→chroma/-vim.ch:
--------------------------------------------------------------------------------
1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
2 | # Copyright (c) 2018 Sebastian Gniazdowski
3 | #
4 | # Chroma for vim, shows last opened files under prompt.
5 | #
6 | # $1 - 0 or 1, denoting if it's first call to the chroma, or following one
7 | #
8 | # $2 - the current token, also accessible by $__arg from the above scope -
9 | # basically a private copy of $__arg; the token can be eg.: "grep"
10 | #
11 | # $3 - a private copy of $_start_pos, i.e. the position of the token in the
12 | # command line buffer, used to add region_highlight entry (see man),
13 | # because Zsh colorizes by *ranges* in command line buffer
14 | #
15 | # $4 - a private copy of $_end_pos from the above scope
16 | #
17 |
18 | (( next_word = 2 | 8192 ))
19 |
20 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
21 | local __style __chars
22 | integer __idx1 __idx2
23 | local -a __viminfo
24 |
25 | # First call, i.e. command starts, i.e. "grep" token etc.
26 | (( __first_call )) && {
27 | (( ${+commands[vim]} )) && __style=${FAST_THEME_NAME}command || __style=${FAST_THEME_NAME}unknown-token
28 |
29 | { __viminfo=( ${(f)"$(<$HOME/.viminfo)"} ); } >> /dev/null
30 | __viminfo=( "${${(M)__viminfo[@]:#>*}[@]:t}" )
31 | __viminfo=( "${__viminfo[@]:#COMMIT_EDITMSG}" )
32 | zle -M "Last opened:"$'\n'"${(F)__viminfo[1,5]}"
33 | } || {
34 | # Pass almost everything to big loop
35 | return 1
36 | }
37 |
38 | # Add region_highlight entry (via `reply' array).
39 | #
40 | # This is a common place of adding such entry, but any above
41 | # code can do it itself (and it does, see other chromas) and
42 | # skip setting __style to disable this code.
43 | [[ -n "$__style" ]] && (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}")
44 |
45 | # We aren't passing-through (no return 1 occured), do obligatory things ourselves.
46 | (( this_word = next_word ))
47 | _start_pos=$_end_pos
48 |
49 | return 0
50 |
51 | # vim:ft=zsh:et:sw=4
52 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/.gitattributes:
--------------------------------------------------------------------------------
1 | modules/** linguist-vendored
2 | modules/Src/aloxaf/*.c -linguist-vendored
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[BUG]"
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | #### Describe the bug
11 | A clear and concise description of what the bug is.
12 |
13 | I can make sure:
14 | - [ ] I am using the latest version of fzf-tab
15 | - [ ] this is the minimal zshrc which can reproduce this bug
16 | - [ ] fzf-tab is loaded after `compinit`
17 | - [ ] fzf-tab is loaded after plugins which will wrap Tab, like [junegunn/fzf/completion.zsh](https://github.com/junegunn/fzf/blob/master/shell/completion.zsh)
18 | - [ ] fzf-tab is loaded before zsh-autosuggestions, zsh-syntax-highlighting and fast-syntax-highlighting.
19 |
20 | #### To Reproduce
21 | Steps to reproduce the behavior:
22 | 1. Type '...'
23 | 2. Press Tab
24 | 4. See error
25 |
26 | #### Expected behavior
27 | A clear and concise description of what you expected to happen.
28 |
29 | #### Screenshots
30 | If applicable, add screenshots to help explain your problem.
31 |
32 | #### Environment:
33 | - OS: [e.g. Arch Linux]
34 | - zsh version: [e.g. 5.8.1]
35 |
36 | #### Minimal zshrc
37 | If applicable, add a minimal zshrc to help us analyze.
38 |
39 | #### Log
40 | If applicable, use `C-x .` to trigger completion and provide the log.
41 |
42 | If there are only three lines in your log, please make sure your fzf-tab is loaded with the correct order (see the checklist above).
43 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[FR]"
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Ask a question about fzf-tab
4 | title: "[Q]"
5 | labels: question
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe your question**
11 | A clear and concise description of your question.
12 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/.github/workflows/ci.yaml:
--------------------------------------------------------------------------------
1 | name: ci
2 |
3 | on:
4 | pull_request:
5 | push:
6 | branches:
7 | - master
8 |
9 | jobs:
10 | test:
11 | name: run test
12 | runs-on: ${{ matrix.os }}
13 | strategy:
14 | matrix:
15 | os: [ubuntu-latest, macos-latest]
16 | steps:
17 | - name: checkout
18 | uses: actions/checkout@v1
19 | with:
20 | fetch-depth: 1
21 |
22 | - name: install zsh (ubuntu)
23 | if: matrix.os == 'ubuntu-latest'
24 | run: sudo apt-get install zsh
25 |
26 | - name: test completion (ubuntu)
27 | if: matrix.os == 'ubuntu-latest'
28 | run: cd test && zsh -f runtests.zsh fzftab.ztst
29 |
30 | - name: build binary module
31 | run: zsh -fc 'source ./fzf-tab.zsh && build-fzf-tab-module'
32 |
33 | - name: test binary module (ubuntu)
34 | if: matrix.os == 'ubuntu-latest'
35 | run: cd test && zsh -f runtests.zsh fzftab.ztst
36 |
37 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/.gitignore:
--------------------------------------------------------------------------------
1 | *.zwc
2 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019-2021 Aloxaf
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/fzf-tab.plugin.zsh:
--------------------------------------------------------------------------------
1 | 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
2 | 0="${${(M)0:#/*}:-$PWD/$0}"
3 | source "${0:A:h}/fzf-tab.zsh"
4 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/-ftb-colorize:
--------------------------------------------------------------------------------
1 | #!/hint/zsh
2 | emulate -L zsh -o cbases -o octalzeroes
3 |
4 | local REPLY
5 | local -a reply stat lstat
6 |
7 | # fzf-tab-lscolors::match-by $1 lstat follow
8 | zstat -A lstat -L -- $1
9 | # follow symlink
10 | (( lstat[3] & 0170000 )) && zstat -A stat -- $1 2>/dev/null
11 |
12 | fzf-tab-lscolors::from-mode "$1" "$lstat[3]" $stat[3]
13 | # fall back to name
14 | [[ -z $REPLY ]] && fzf-tab-lscolors::from-name $1
15 |
16 | # If this is a symlink
17 | if [[ -n $lstat[14] ]]; then
18 | local sym_color=$REPLY
19 | local rsv_color=$REPLY
20 | local rsv=$lstat[14]
21 | # If this is not a broken symlink
22 | if [[ -e $rsv ]]; then
23 | # fzf-tab-lscolors::match-by $rsv stat
24 | zstat -A stat -- $rsv
25 | fzf-tab-lscolors::from-mode $rsv $stat[3]
26 | # fall back to name
27 | [[ -z $REPLY ]] && fzf-tab-lscolors::from-name $rsv
28 | rsv_color=$REPLY
29 | fi
30 | dpre=$'\033[0m\033['$sym_color'm'
31 | dsuf+=$'\033[0m -> \033['$rsv_color'm'$rsv
32 | else
33 | dpre=$'\033[0m\033['$REPLY'm'
34 | fi
35 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/-ftb-generate-header:
--------------------------------------------------------------------------------
1 | #!/hint/zsh
2 |
3 | typeset -ga _ftb_headers=()
4 | local i tmp group_colors
5 | local -i mlen=0 len=0
6 |
7 | if (( $#_ftb_groups == 1 )) && { ! -ftb-zstyle -m single-group "header" }; then
8 | return
9 | fi
10 |
11 | # calculate the max column width
12 | for i in $_ftb_groups; do
13 | (( $#i > mlen )) && mlen=$#i
14 | done
15 | mlen+=1
16 |
17 | -ftb-zstyle -a group-colors group_colors || group_colors=($_ftb_group_colors)
18 |
19 | for (( i=1; i<=$#_ftb_groups; i++ )); do
20 | [[ $_ftb_groups[i] == "__hide__"* ]] && continue
21 |
22 | if (( len + $#_ftb_groups[i] > COLUMNS - 5 )); then
23 | _ftb_headers+=$tmp
24 | tmp='' && len=0
25 | fi
26 | if (( len + mlen > COLUMNS - 5 )); then
27 | # the last column doesn't need padding
28 | _ftb_headers+=$tmp$group_colors[i]$_ftb_groups[i]$'\033[00m'
29 | tmp='' && len=0
30 | else
31 | tmp+=$group_colors[i]${(r:$mlen:)_ftb_groups[i]}$'\033[00m'
32 | len+=$mlen
33 | fi
34 | done
35 | (( $#tmp )) && _ftb_headers+=$tmp
36 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/-ftb-generate-query:
--------------------------------------------------------------------------------
1 | #!/hint/zsh
2 |
3 | if zmodload -s zsh/pcre; then
4 | setopt localoptions rematch_pcre
5 | fi
6 |
7 | local key qtype tmp query_string
8 | typeset -g _ftb_query=
9 | -ftb-zstyle -a query-string query_string || query_string=(prefix input first)
10 | for qtype in $query_string; do
11 | if [[ $qtype == prefix ]]; then
12 | # find the longest common prefix among descriptions
13 | local -a keys=(${_ftb_compcap%$'\2'*})
14 | tmp=$keys[1]
15 | local MATCH match mbegin mend prefix=(${(s::)tmp})
16 | for key in ${keys:1}; do
17 | (( $#tmp )) || break
18 | [[ $key == $tmp* ]] && continue
19 | # interpose characters from the current common prefix and $key and see how
20 | # many pairs of equal characters we get at the start of the resulting string
21 | [[ ${(j::)${${(s::)key[1,$#tmp]}:^prefix}} =~ '^(((.)\3)*)' ]]
22 | # truncate common prefix and maintain loop invariant: ${(s::)tmp} == $prefix
23 | tmp[$#MATCH/2+1,-1]=""
24 | prefix[$#MATCH/2+1,-1]=()
25 | done
26 | elif [[ $qtype == input ]]; then
27 | local fv=${_ftb_compcap[1]#*$'\2'}
28 | local -A v=("${(@0)fv}")
29 | tmp=$v[PREFIX]
30 | if (( $RBUFFER[(i)$v[SUFFIX]] != 1 )); then
31 | tmp=${tmp/%$v[SUFFIX]}
32 | fi
33 | tmp=${${tmp#$v[hpre]}#$v[apre]}
34 | fi
35 | if (( $query_string[(I)longest] )); then
36 | (( $#tmp > $#_ftb_query )) && _ftb_query=$tmp
37 | elif [[ -n $tmp ]]; then
38 | _ftb_query=$tmp && break
39 | fi
40 | done
41 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/ftb-switch-group:
--------------------------------------------------------------------------------
1 | #!/hint/zsh
2 | emulate -L zsh -o extended_glob
3 |
4 | zmodload zsh/mapfile
5 |
6 | # receive arguments
7 | local pid=$1 header_lines=$2 tmp_dir=$3 offset=$@[-1]
8 |
9 | # read completion list
10 | local -a list=(${(f)mapfile[$tmp_dir/completions.$pid]})
11 |
12 | # get total group count
13 | if (( $#list > 10000 )); then
14 | local -Ua total=(${(f)"$(print -l ${list:$header_lines} | grep -a -oP '^\x1b\[[0-9;]*m')"})
15 | else
16 | local -Ua total=(${(M)${list:$header_lines}#$'\x1b['[0-9;]#*m})
17 | fi
18 |
19 | # get current group index, start from 2
20 | local current=2
21 | if [[ -f $tmp_dir/current-group.$pid ]]; then
22 | current=$(( $(<$tmp_dir/current-group.$pid) + offset ))
23 | fi
24 | (( current > $#total )) && current=1
25 | (( current == 0 )) && current=$#total
26 | echo $current > $tmp_dir/current-group.$pid
27 |
28 | # print headers
29 | if (( header_lines != 0 )); then
30 | print -l ${list[1,header_lines]/${total[current]}/$'\x1b[1m'}
31 | fi
32 |
33 | # print current group
34 | if (( $#list > 10000 )); then
35 | print -l ${list:$header_lines} | grep -a -F "${total[current]}"
36 | else
37 | print -l ${(M)${list:$header_lines}:#${total[current]}*}
38 | fi
39 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/ftb-tmux-popup:
--------------------------------------------------------------------------------
1 | #!/hint/zsh
2 | # Show results with tmux popup
3 | # Example usage:
4 | # zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
5 | # zstyle ':fzf-tab:*' popup-pad 0 0
6 | # It can also be used as a standalone tool, like:
7 | # ls | ftb-tmux-popup
8 | emulate -L zsh -o extended_glob
9 |
10 | # import min
11 | autoload -Uz zmathfunc
12 | zmathfunc
13 |
14 | : ${tmp_dir:=${TMPPREFIX:-/tmp/zsh}-fzf-tab-$USER}
15 |
16 | # fallback to fzf if it is not running in tmux
17 | if (( ! $+TMUX_PANE )); then
18 | fzf $@
19 | return
20 | fi
21 |
22 | local ret=0
23 |
24 | local -a fzf_opts=($@)
25 | fzf_opts=(${${fzf_opts/--height*}/--layout*})
26 |
27 | # get position of cursor and size of window
28 | local -a tmp=($(command tmux display-message -p "#{pane_top} #{cursor_y} #{pane_left} #{cursor_x} #{window_height} #{window_width} #{status} #{status-position}"))
29 | local cursor_y=$((tmp[1] + tmp[2])) cursor_x=$((tmp[3] + tmp[4])) window_height=$tmp[5] window_width=$tmp[6] window_top=0
30 |
31 | if [[ $tmp[8] == 'top' ]]; then
32 | window_top=$tmp[7]
33 | cursor_y=$((cursor_y + window_top))
34 | fi
35 |
36 | # if not called by fzf-tab
37 | if (( ! $+IN_FZF_TAB )); then
38 | [[ -d $tmp_dir ]] || mkdir -p $tmp_dir
39 | cat > $tmp_dir/completions.$$
40 | fi
41 |
42 | local text REPLY comp_lines comp_length length popup_pad
43 |
44 | zstyle -a ":fzf-tab:$_ftb_curcontext" popup-pad popup_pad || popup_pad=(0 0)
45 |
46 | # get the size of content, note we should remove all ANSI color code
47 | comp_lines=$(( ${#${(f)mapfile[$tmp_dir/completions.$$]}} + $popup_pad[2] ))
48 | if (( comp_lines <= 500 )); then
49 | comp_length=0
50 | for line in ${(f)mapfile[$tmp_dir/completions.$$]}; do
51 | length=${(m)#${(S)line//$'\x1b['[0-9]#*m}}
52 | (( length >= comp_length )) && comp_length=$length
53 | done
54 | else
55 | # FIXME: can't get the correct width of CJK characters.
56 | comp_length=$( command perl -ne 's/\x1b\[[0-9;]*m//g;s/\x00//g; $m= length() if $m < length(); END { print $m }' < $tmp_dir/completions.$$ )
57 | fi
58 | comp_length=$(( comp_length + $popup_pad[1] ))
59 |
60 | local popup_height popup_y popup_width popup_x
61 |
62 | # calculate the popup height and y position
63 | if (( cursor_y * 2 > window_height )); then
64 | # show above the cursor
65 | popup_height=$(( min(comp_lines + 4, cursor_y - window_top) ))
66 | popup_y=$cursor_y
67 | else
68 | # show below the cursor
69 | popup_height=$(( min(comp_lines + 4, window_height - cursor_y + window_top - 1) ))
70 | popup_y=$(( cursor_y + popup_height + 1 ))
71 | fzf_opts+=(--layout=reverse)
72 | fi
73 |
74 | # calculate the popup width and x position
75 | popup_width=$(( min(comp_length + 5, window_width) ))
76 | popup_x=$(( cursor_x + popup_width > window_width ? window_width - popup_width : cursor_x ))
77 |
78 | echo -E "$commands[fzf] ${(qq)fzf_opts[@]} < $tmp_dir/completions.$$ > $tmp_dir/result-$$" > $tmp_dir/fzf-$$
79 | {
80 | tmux popup -x $popup_x -y $popup_y \
81 | -w $popup_width -h $popup_height \
82 | -d $PWD -E ". $tmp_dir/fzf-$$" || ret=$?
83 | echo -E "$(<$tmp_dir/result-$$)"
84 | } always {
85 | command rm $tmp_dir/*-$$
86 | (( $+IN_FZF_TAB )) || command rm $tmp_dir/completions.$$
87 | }
88 | return $ret
89 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/zsh-ls-colors/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Gamma
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/zsh-ls-colors/README.md:
--------------------------------------------------------------------------------
1 | # zsh-ls-colors
2 |
3 | 
4 |
5 | A zsh library to use `LS_COLORS` in scripts or other plugins.
6 |
7 | For a simple demo, see the `demo` script in this repo.
8 |
9 | For more advanced usage,
10 | instructions are located at top of the source files for `from-mode` and `from-name`.
11 | If a use case isn't adequately covered,
12 | please open an issue!
13 |
14 | ## Using zsh-ls-colors in a plugin
15 |
16 | You can use this as a submodule or a subtree.
17 |
18 | ### submodule:
19 |
20 | ```sh
21 | # Add (only once)
22 | git submodule add git://github.com/xPMo/zsh-ls-colors.git ls-colors
23 | git commit -m 'Add ls-colors as submodule'
24 |
25 | # Update
26 | cd ls-colors
27 | git fetch
28 | git checkout origin/master
29 | cd ..
30 | git commit ls-colors -m 'Update ls-colors to latest'
31 | ```
32 |
33 | ### Subtree:
34 |
35 | ```sh
36 | # Initial add
37 | git subtree add --prefix=ls-colors/ --squash -m 'Add ls-colors as a subtree' \
38 | git://github.com/xPMo/zsh-ls-colors.git master
39 |
40 | # Update
41 | git subtree pull --prefix=ls-colors/ --squash -m 'Update ls-colors to latest' \
42 | git://github.com/xPMo/zsh-ls-colors.git master
43 |
44 |
45 | # Or, after adding a remote:
46 | git remote add ls-colors git://github.com/xPMo/zsh-ls-colors.git
47 |
48 | # Initial add
49 | git subtree add --prefix=ls-colors/ --squash -m 'Add ls-colors as a subtree' ls-colors master
50 |
51 | # Update
52 | git subtree pull --prefix=ls-colors/ --squash -m 'Update ls-colors to latest' ls-colors master
53 | ```
54 |
55 | ### Function namespacing
56 |
57 | Since functions are a public namespace,
58 | this plugin allows you to customize the preifix for your plugin:
59 |
60 | ```zsh
61 | # load functions as my-lscolors::{init,match-by,from-name,from-mode}
62 | source ${0:h}/ls-colors/ls-colors.zsh my-lscolors
63 | ```
64 |
65 | ### Parameter namespacing
66 |
67 | While indirect parameter expansion exists with `${(P)var}`,
68 | it doesn't play nicely with array parameters.
69 |
70 | There are multiple strategies to prevent unnecessary re-parsing:
71 |
72 | ```zsh
73 | # Call once when loading.
74 | # Pollutes global namespace but prevents re-parsing
75 | ls-color::init
76 | ```
77 |
78 | ```zsh
79 | # Don't call init at all and only use ::match-by.
80 | # Doesn't pollute global namespace but reparses LS_COLORS on every call
81 | ls-color::match-by $file lstat
82 | ```
83 |
84 | ```zsh
85 | # Initialize within a scope with local parameters.
86 | # Best for not polluting global namespace when multiple filenames need to be parsed.
87 | (){
88 | local -A namecolors modecolors
89 | ls-color::init
90 |
91 | for arg; do
92 | ...
93 | done
94 | }
95 | ```
96 |
97 | ```zsh
98 | # Serialize:
99 | typeset -g LS_COLORS_CACHE_FILE=$(mktemp)
100 | (){
101 | local -A namecolors modecolors
102 | ls-color::init
103 | typeset -p modecolors namecolors >| $LS_COLORS_CACHE_FILE
104 | zcompile $LS_COLORS_CACHE_FILE
105 | }
106 |
107 | my-function(){
108 | local -A namecolors modecolors
109 | source $LS_COLORS_CACHE_FILE
110 |
111 | ...
112 | }
113 | ```
114 |
115 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/lib/zsh-ls-colors/demo:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | # set $0 (ref: zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#zero-handling)
3 | 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
4 | 0="${${(M)0:#/*}:-$PWD/$0}"
5 |
6 | # load library functions
7 | source ls-colors.zsh ''
8 |
9 | # to name the functions with a different namespace
10 | # call source with a different argument
11 | #source my-plugin::ls
12 |
13 | # init (sets modecolors and namecolors)
14 | # You have options. Either you can pollute global namespace:
15 | ls-color::init
16 | # Or you can have ::match-by re-parse colors on every call
17 | : # (do nothing)
18 | # Or if you have multiple calls, you can parse colors once for a scope:
19 | (){
20 | local -A modecolors namecolors
21 | ls-color::init
22 |
23 | for arg; do
24 | ls-color::match-by $arg lstat
25 | : do something else
26 | done
27 | }
28 |
29 |
30 | # colors can also be added for other globs after init as well:
31 | namecolors[*.md]='01' # bold markdown files
32 |
33 | # EXTENDED_GLOB is enabled when matching, so things like this are possible:
34 | namecolors[(#i)(*/|)license(|.*)]='04' # underline LICENSE, or license.txt, or similar
35 |
36 | local file reply
37 | # color each file in the argument list
38 | for file; do
39 | ls-color::match-by $file all
40 | # point to symlink resolution if it exists
41 | print '\e['$reply[1]'m'$file'\e[0m'${reply[2]:+' → \e['$reply[3]'m'$reply[2]'\e[0m'}
42 | done
43 |
44 | # =======================
45 | # Alternate manual method:
46 | for file; do
47 | ls-color::match-by $file lstat follow
48 | if [[ $reply[2] ]]; then
49 | # This is a symlink
50 | symlink_color=$reply[1]
51 | # If broken, use link color for destination
52 | resolved_color=$reply[1]
53 | resolved=$reply[2]
54 | if [[ -e $file ]]; then
55 | # Not broken, update destination color
56 | ls-color::match-by $file stat
57 | resolved_color=$reply[1]
58 | fi
59 | print '\e['$symlink_color'm'$file'\e[0m → \e['$resolved_color'm'$resolved'\e[0m'
60 | else
61 | # This is not a symlink
62 | print '\e['$reply[1]'m'$file'\e[0m'
63 | fi
64 | done
65 |
66 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/.cvsignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | META-FAQ
3 | config.cache
4 | config.h
5 | config.h.in
6 | config.log
7 | config.modules
8 | config.modules.sh
9 | config.status
10 | configure
11 | cscope.out
12 | stamp-h
13 | stamp-h.in
14 | autom4te.cache
15 | *.swp
16 | .git
17 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/.distfiles:
--------------------------------------------------------------------------------
1 | DISTFILES_SRC='
2 | META-FAQ
3 | configure config.h.in stamp-h.in
4 | '
5 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/.editorconfig:
--------------------------------------------------------------------------------
1 | # Top-most editorconfig file
2 |
3 | root = true
4 |
5 | [*]
6 | end_of_line = lf
7 | tab_width = 8
8 | indent_size = 2
9 | indent_style = tab
10 |
11 | [ChangeLog]
12 | indent_size = 8
13 |
14 | [*.[ch]]
15 | indent_size = 4
16 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | tags
3 | TAGS
4 | *.o
5 | *.o.c
6 | *.orig
7 | *.a
8 | *.so
9 | *.dll
10 | *~
11 | .*.sw?
12 | \#*
13 |
14 | /META-FAQ
15 | /config.cache
16 | /config.h
17 | /config.log
18 | /config.modules
19 | /config.modules.sh
20 | /config.status
21 | /config.status.lineno
22 | /cscope.out
23 | /stamp-h
24 | /autom4te.cache
25 |
26 | Config/defs.mk
27 |
28 | CVS
29 | .#*
30 |
31 | Doc/help
32 | Doc/help.txt
33 | Doc/help/[_a-zA-Z0-9]*
34 |
35 | Doc/intro.pdf
36 | Doc/intro.ps
37 | Doc/intro.a4.pdf
38 | Doc/intro.a4.ps
39 | Doc/intro.us.pdf
40 | Doc/intro.us.ps
41 | Doc/version.yo
42 | Doc/texi2html.conf
43 | Doc/zsh*.1
44 | Doc/zsh.texi
45 | Doc/zsh.info*
46 | Doc/*.html
47 | Doc/zsh.aux
48 | Doc/zsh.toc
49 | Doc/zsh.cp
50 | Doc/zsh.cps
51 | Doc/zsh.fn
52 | Doc/zsh.fns
53 | Doc/zsh.ky
54 | Doc/zsh.kys
55 | Doc/zsh.pg
56 | Doc/zsh.pgs
57 | Doc/zsh.vr
58 | Doc/zsh.vrs
59 | Doc/zsh.log
60 | Doc/zsh.dvi
61 | Doc/zsh_a4.dvi
62 | Doc/zsh_us.dvi
63 | Doc/zsh.tp
64 | Doc/zsh.tps
65 | Doc/zsh.idx
66 | Doc/zsh_*.ps
67 | Doc/infodir
68 | Doc/zsh.pdf
69 | Doc/zsh_a4.pdf
70 | Doc/zsh_us.pdf
71 |
72 | Doc/Zsh/modlist.yo
73 | Doc/Zsh/modmenu.yo
74 | Doc/Zsh/manmodmenu.yo
75 |
76 | Etc/FAQ
77 | Etc/FAQ.html
78 |
79 | Src/*.epro
80 | Src/*.export
81 | Src/*.mdh
82 | Src/*.mdh.tmp
83 | Src/*.mdhi
84 | Src/*.mdhs
85 | Src/*.syms
86 | Src/Makemod.in
87 | Src/Makemod
88 | Src/[_a-zA-Z0-9]*.pro
89 | Src/ansi2knr
90 | Src/bltinmods.list
91 | Src/cscope.out
92 | Src/libzsh.so*
93 | Src/modules-bltin
94 | Src/modules.index
95 | Src/modules.index.tmp
96 | Src/modules.stamp
97 | Src/patchlevel.h
98 | Src/sigcount.h
99 | Src/signames.c
100 | Src/signames2.c
101 | Src/stamp-modobjs
102 | Src/stamp-modobjs.tmp
103 | Src/tags
104 | Src/TAGS
105 | Src/version.h
106 | Src/zsh
107 | Src/zsh.exe
108 | Src/zshcurses.h
109 | Src/zshpaths.h
110 | Src/zshterm.h
111 | Src/zshxmods.h
112 |
113 | Src/Builtins/Makefile.in
114 | Src/Builtins/*.export
115 | Src/Builtins/so_locations
116 | Src/Builtins/*.pro
117 | Src/Builtins/*.epro
118 | Src/Builtins/*.syms
119 | Src/Builtins/*.mdh
120 | Src/Builtins/*.mdhi
121 | Src/Builtins/*.mdhs
122 | Src/Builtins/*.mdh.tmp
123 | Src/Builtins/rlimits.h
124 |
125 | Src/Modules/Makefile.in
126 | Src/Modules/*.export
127 | Src/Modules/so_locations
128 | Src/Modules/*.pro
129 | Src/Modules/*.epro
130 | Src/Modules/*.syms
131 | Src/Modules/*.mdh
132 | Src/Modules/*.mdhi
133 | Src/Modules/*.mdhs
134 | Src/Modules/*.mdh.tmp
135 | Src/Modules/errnames.c
136 | Src/Modules/errcount.h
137 | Src/Modules/curses_keys.h
138 |
139 | Src/Zle/Makefile.in
140 | Src/Zle/*.export
141 | Src/Zle/so_locations
142 | Src/Zle/*.pro
143 | Src/Zle/*.epro
144 | Src/Zle/*.syms
145 | Src/Zle/*.mdh
146 | Src/Zle/*.mdhi
147 | Src/Zle/*.mdhs
148 | Src/Zle/*.mdh.tmp
149 | Src/Zle/thingies.list
150 | Src/Zle/widgets.list
151 | Src/Zle/zle_things.h
152 | Src/Zle/zle_widget.h
153 |
154 | Test/*.tmp
155 | /.project
156 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/.preconfig:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | set -e
4 |
5 | autoconf
6 | autoheader
7 | echo > stamp-h.in
8 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/.cvsignore:
--------------------------------------------------------------------------------
1 | defs.mk
2 | *.swp
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/.distfiles:
--------------------------------------------------------------------------------
1 | DISTFILES_SRC='
2 | '
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/aczshoot.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([zsh_OOT],
2 | [
3 | AC_CHECK_HEADERS(stdarg.h varargs.h termios.h termio.h)
4 |
5 | AC_TYPE_SIGNAL
6 |
7 | AC_DEFINE([ZSH_OOT_MODULE], [], [Out-of-tree module])
8 | ])
9 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/clean.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile fragment for cleanup
3 | #
4 | # Copyright (c) 1995-1997 Richard Coleman
5 | # All rights reserved.
6 | #
7 | # Permission is hereby granted, without written agreement and without
8 | # license or royalty fees, to use, copy, modify, and distribute this
9 | # software and to distribute modified versions of this software for any
10 | # purpose, provided that the above copyright notice and the following
11 | # two paragraphs appear in all copies of this software.
12 | #
13 | # In no event shall Richard Coleman or the Zsh Development Group be liable
14 | # to any party for direct, indirect, special, incidental, or consequential
15 | # damages arising out of the use of this software and its documentation,
16 | # even if Richard Coleman and the Zsh Development Group have been advised of
17 | # the possibility of such damage.
18 | #
19 | # Richard Coleman and the Zsh Development Group specifically disclaim any
20 | # warranties, including, but not limited to, the implied warranties of
21 | # merchantability and fitness for a particular purpose. The software
22 | # provided hereunder is on an "as is" basis, and Richard Coleman and the
23 | # Zsh Development Group have no obligation to provide maintenance,
24 | # support, updates, enhancements, or modifications.
25 | #
26 |
27 | mostlyclean: mostlyclean-recursive mostlyclean-here
28 | clean: clean-recursive clean-here
29 | distclean: distclean-recursive distclean-here
30 | realclean: realclean-recursive realclean-here
31 |
32 | mostlyclean-here:
33 | clean-here: mostlyclean-here
34 | distclean-here: clean-here
35 | realclean-here: distclean-here
36 |
37 | mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive:
38 | @subdirs='$(SUBDIRS)'; if test -n "$$subdirs"; then \
39 | target=`echo $@ | sed s/-recursive//`; \
40 | for subdir in $$subdirs; do \
41 | (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
42 | done; \
43 | fi
44 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/config.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile fragment for building Makefiles
3 | #
4 | # Copyright (c) 1995-1997 Richard Coleman
5 | # All rights reserved.
6 | #
7 | # Permission is hereby granted, without written agreement and without
8 | # license or royalty fees, to use, copy, modify, and distribute this
9 | # software and to distribute modified versions of this software for any
10 | # purpose, provided that the above copyright notice and the following
11 | # two paragraphs appear in all copies of this software.
12 | #
13 | # In no event shall Richard Coleman or the Zsh Development Group be liable
14 | # to any party for direct, indirect, special, incidental, or consequential
15 | # damages arising out of the use of this software and its documentation,
16 | # even if Richard Coleman and the Zsh Development Group have been advised of
17 | # the possibility of such damage.
18 | #
19 | # Richard Coleman and the Zsh Development Group specifically disclaim any
20 | # warranties, including, but not limited to, the implied warranties of
21 | # merchantability and fitness for a particular purpose. The software
22 | # provided hereunder is on an "as is" basis, and Richard Coleman and the
23 | # Zsh Development Group have no obligation to provide maintenance,
24 | # support, updates, enhancements, or modifications.
25 | #
26 |
27 | config: Makefile
28 | @subdirs='$(SUBDIRS)'; for subdir in $$subdirs; do \
29 | (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
30 | done
31 |
32 | CONFIG_INCS = \
33 | $(dir_top)/Config/clean.mk $(dir_top)/Config/config.mk \
34 | $(dir_top)/Config/defs.mk $(dir_top)/Config/version.mk
35 |
36 | Makefile: Makefile.in $(dir_top)/config.status $(CONFIG_INCS)
37 | cd $(dir_top) && \
38 | $(SHELL) ./config.status `echo $(subdir)/$@ | sed 's%^./%%'`
39 |
40 | $(dir_top)/Config/defs.mk: $(sdir_top)/Config/defs.mk.in $(dir_top)/config.status
41 | cd $(dir_top) && \
42 | $(SHELL) ./config.status Config/defs.mk
43 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/installfns.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | fndir=$DESTDIR$fndir
4 | scriptdir=$DESTDIR$scriptdir
5 |
6 | /bin/sh $sdir_top/mkinstalldirs $fndir || exit 1;
7 |
8 | allfuncs="`grep ' functions=.' ${dir_top}/config.modules |
9 | sed -e '/^#/d' -e '/ link=no/d' -e 's/^.* functions=//'`"
10 |
11 | allfuncs="`cd $sdir_top; echo ${allfuncs}`"
12 |
13 | test -d installfnsdir || mkdir installfnsdir
14 |
15 | # We now have a list of files, but we need to use `test -f' to check
16 | # (1) the glob got expanded (2) we are not looking at directories.
17 | for file in $allfuncs; do
18 | if test -f $sdir_top/$file; then
19 | case "$file" in
20 | */CVS/*) continue;;
21 | esac
22 | if test x$FUNCTIONS_SUBDIRS != x && test x$FUNCTIONS_SUBDIRS != xno; then
23 | case "$file" in
24 | Completion/*/*)
25 | subdir="`echo $file | sed -e 's%/[^/]*/[^/]*$%%'`"
26 | instdir="$fndir/$subdir"
27 | ;;
28 | Completion/*)
29 | instdir="$fndir/Completion"
30 | ;;
31 | Scripts/*)
32 | instdir="$scriptdir"
33 | ;;
34 | *)
35 | subdir="`echo $file | sed -e 's%/[^/]*$%%' -e 's%^Functions/%%'`"
36 | instdir="$fndir/$subdir"
37 | ;;
38 | esac
39 | else
40 | case "$file" in
41 | Scripts/*)
42 | instdir="$scriptdir"
43 | ;;
44 | *)
45 | instdir="$fndir"
46 | ;;
47 | esac
48 | fi
49 | basename=`basename $file`
50 | ok=0
51 | if test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir; then
52 | if sed "s|@runhelpdir@|$runhelpdir|" <$sdir_top/$file \
53 | >installfnsdir/$basename; then
54 | if $INSTALL_DATA installfnsdir/$basename $instdir; then
55 | ok=1
56 | fi
57 | fi
58 | fi
59 | case $ok in
60 | 0)
61 | rm -rf installfnsdir
62 | exit 1
63 | ;;
64 | esac
65 | read line < $sdir_top/$file
66 | case "$line" in
67 | '#!'*)
68 | chmod +x $instdir/`echo $file | sed -e 's%^.*/%%'`
69 | ;;
70 | esac
71 | fi
72 | done
73 |
74 | rm -rf installfnsdir
75 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/uninstallfns.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | fndir=$DESTDIR$fndir
4 | scriptdir=$DESTDIR$scriptdir
5 |
6 | allfuncs="`grep ' functions=' ${dir_top}/config.modules |
7 | sed -e '/^#/d' -e '/ link=no/d' -e 's/^.* functions=//'`"
8 |
9 | allfuncs="`cd ${sdir_top}; echo ${allfuncs}`"
10 |
11 | case $fndir in
12 | *$VERSION*)
13 | # Version specific function directory, safe to remove completely.
14 | rm -rf $fndir
15 | ;;
16 | *) # The following will only apply with a custom install directory
17 | # with no version information. This is rather undesirable.
18 | # But let's try and do the best we can.
19 | # We now have a list of files, but we need to use `test -f' to check
20 | # (1) the glob got expanded (2) we are not looking at directories.
21 | for file in $allfuncs; do
22 | case $file in
23 | Scripts/*)
24 | ;;
25 | *)
26 | if test -f $sdir_top/$file; then
27 | if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
28 | file=`echo $file | sed -e 's%%^(Functions|Completion)/%'`
29 | rm -f $fndir/$file
30 | else
31 | bfile="`echo $file | sed -e 's%^.*/%%'`"
32 | rm -f "$fndir/$bfile"
33 | fi
34 | fi
35 | ;;
36 | esac
37 | done
38 | ;;
39 | esac
40 |
41 | case $scriptdir in
42 | *$VERSION*)
43 | # $scriptdir might be the parent of fndir.
44 | rm -rf $scriptdir
45 | ;;
46 | *) for file in $allfuncs; do
47 | case $file in
48 | Scripts/*)
49 | if test -f $sdir_top/$file; then
50 | bfile="`echo $file | sed -e 's%^.*/%%'`"
51 | rm -f "$scriptdir/$bfile"
52 | fi
53 | ;;
54 | esac
55 | done
56 | ;;
57 | esac
58 |
59 | exit 0
60 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Config/version.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile fragment for version numbers
3 | #
4 | # Copyright (c) 1995-1997 Richard Coleman
5 | # All rights reserved.
6 | #
7 | # Permission is hereby granted, without written agreement and without
8 | # license or royalty fees, to use, copy, modify, and distribute this
9 | # software and to distribute modified versions of this software for any
10 | # purpose, provided that the above copyright notice and the following
11 | # two paragraphs appear in all copies of this software.
12 | #
13 | # In no event shall Richard Coleman or the Zsh Development Group be liable
14 | # to any party for direct, indirect, special, incidental, or consequential
15 | # damages arising out of the use of this software and its documentation,
16 | # even if Richard Coleman and the Zsh Development Group have been advised of
17 | # the possibility of such damage.
18 | #
19 | # Richard Coleman and the Zsh Development Group specifically disclaim any
20 | # warranties, including, but not limited to, the implied warranties of
21 | # merchantability and fitness for a particular purpose. The software
22 | # provided hereunder is on an "as is" basis, and Richard Coleman and the
23 | # Zsh Development Group have no obligation to provide maintenance,
24 | # support, updates, enhancements, or modifications.
25 | #
26 |
27 | # This must also serve as a shell script, so do not add spaces around the
28 | # `=' signs.
29 |
30 | VERSION=5.3.1-dev-0
31 | VERSION_DATE='December 22, 2016'
32 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/LICENCE:
--------------------------------------------------------------------------------
1 | Unless otherwise noted in the header of specific files, files in this
2 | distribution have the licence shown below.
3 |
4 | However, note that certain shell functions are licensed under versions
5 | of the GNU General Public Licence. Anyone distributing the shell as a
6 | binary including those files needs to take account of this. Search
7 | shell functions for "Copyright" for specific copyright information.
8 | None of the core functions are affected by this, so those files may
9 | simply be omitted.
10 |
11 | --
12 |
13 | The Z Shell is copyright (c) 1992-2017 Paul Falstad, Richard Coleman,
14 | Zoltán Hidvégi, Andrew Main, Peter Stephenson, Sven Wischnowsky, and
15 | others. All rights reserved. Individual authors, whether or not
16 | specifically named, retain copyright in all changes; in what follows, they
17 | are referred to as `the Zsh Development Group'. This is for convenience
18 | only and this body has no legal status. The Z shell is distributed under
19 | the following licence; any provisions made in individual files take
20 | precedence.
21 |
22 | Permission is hereby granted, without written agreement and without
23 | licence or royalty fees, to use, copy, modify, and distribute this
24 | software and to distribute modified versions of this software for any
25 | purpose, provided that the above copyright notice and the following
26 | two paragraphs appear in all copies of this software.
27 |
28 | In no event shall the Zsh Development Group be liable to any party for
29 | direct, indirect, special, incidental, or consequential damages arising out
30 | of the use of this software and its documentation, even if the Zsh
31 | Development Group have been advised of the possibility of such damage.
32 |
33 | The Zsh Development Group specifically disclaim any warranties, including,
34 | but not limited to, the implied warranties of merchantability and fitness
35 | for a particular purpose. The software provided hereunder is on an "as is"
36 | basis, and the Zsh Development Group have no obligation to provide
37 | maintenance, support, updates, enhancements, or modifications.
38 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Makefile.in:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile for top level of zsh distribution
3 | #
4 | # Copyright (c) 1995-1997 Richard Coleman
5 | # All rights reserved.
6 | #
7 | # Permission is hereby granted, without written agreement and without
8 | # license or royalty fees, to use, copy, modify, and distribute this
9 | # software and to distribute modified versions of this software for any
10 | # purpose, provided that the above copyright notice and the following
11 | # two paragraphs appear in all copies of this software.
12 | #
13 | # In no event shall Richard Coleman or the Zsh Development Group be liable
14 | # to any party for direct, indirect, special, incidental, or consequential
15 | # damages arising out of the use of this software and its documentation,
16 | # even if Richard Coleman and the Zsh Development Group have been advised of
17 | # the possibility of such damage.
18 | #
19 | # Richard Coleman and the Zsh Development Group specifically disclaim any
20 | # warranties, including, but not limited to, the implied warranties of
21 | # merchantability and fitness for a particular purpose. The software
22 | # provided hereunder is on an "as is" basis, and Richard Coleman and the
23 | # Zsh Development Group have no obligation to provide maintenance,
24 | # support, updates, enhancements, or modifications.
25 | #
26 |
27 | subdir = .
28 | dir_top = .
29 | SUBDIRS = Src
30 |
31 | @VERSION_MK@
32 |
33 | # source/build directories
34 | VPATH = @srcdir@
35 | sdir = @srcdir@
36 | sdir_top = @top_srcdir@
37 | INSTALL = @INSTALL@
38 |
39 | @DEFS_MK@
40 |
41 | # ========== DEPENDENCIES FOR BUILDING ==========
42 |
43 | # default target
44 | all: config.h config.modules
45 | cd Src && $(MAKE) $(MAKEDEFS) $@
46 |
47 | # prepare module configuration
48 | prep:
49 | @cd Src && $(MAKE) $(MAKEDEFS) $@
50 |
51 | # ========== DEPENDENCIES FOR CLEANUP ==========
52 |
53 | @CLEAN_MK@
54 |
55 | distclean-here:
56 | rm -f Makefile config.h config.status config.log config.cache config.modules config.modules.sh stamp-h Config/defs.mk
57 | rm -rf autom4te.cache
58 |
59 | realclean-here:
60 | cd $(sdir) && rm -f config.h.in stamp-h.in configure
61 |
62 | # ========== DEPENDENCIES FOR MAINTENANCE ==========
63 |
64 | @CONFIG_MK@
65 |
66 | config: config.h
67 |
68 | config.status: $(sdir)/configure
69 | $(SHELL) ./config.status --recheck
70 |
71 | $(sdir)/configure: $(sdir)/aclocal.m4 $(sdir)/aczsh.m4 $(sdir)/configure.ac
72 | cd $(sdir) && autoconf
73 |
74 | config.h: stamp-h
75 | stamp-h: $(sdir)/config.h.in config.status
76 | cd $(dir_top) && $(SHELL) ./config.status config.h $@
77 |
78 | config.modules: $(sdir)/config.h.in config.status config.modules.sh
79 | cd $(dir_top) && $(SHELL) ./config.status $@ && \
80 | $(SHELL) ./config.modules.sh
81 |
82 | $(sdir)/config.h.in: $(sdir)/stamp-h.in
83 | $(sdir)/stamp-h.in: $(sdir)/configure
84 | cd $(sdir) && autoheader
85 | echo > $(sdir)/stamp-h.in
86 |
87 | FORCE:
88 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/RECOMPILE_REQUEST:
--------------------------------------------------------------------------------
1 | 1580588806
2 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/.cvsignore:
--------------------------------------------------------------------------------
1 | *.dll
2 | *.epro
3 | *.export
4 | *.mdh
5 | *.mdh.tmp
6 | *.mdhi
7 | *.mdhs
8 | *.o
9 | *.o.c
10 | *.so
11 | *.swp
12 | *.syms
13 | Makefile
14 | Makemod.in Makemod
15 | [_a-zA-Z0-9]*.pro
16 | ansi2knr
17 | bltinmods.list
18 | cscope.out
19 | libzsh.so*
20 | modules-bltin
21 | modules.index
22 | modules.index.tmp
23 | modules.stamp
24 | patchlevel.h
25 | sigcount.h
26 | signames.c signames2.c
27 | stamp-modobjs
28 | stamp-modobjs.tmp
29 | tags TAGS
30 | version.h
31 | zsh
32 | zshcurses.h
33 | zshpaths.h
34 | zshterm.h
35 | zshxmods.h
36 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/.distfiles:
--------------------------------------------------------------------------------
1 | DISTFILES_SRC='
2 | '
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/.exrc:
--------------------------------------------------------------------------------
1 | set ai
2 | set sw=4
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/.indent.pro:
--------------------------------------------------------------------------------
1 | --dont-format-comments
2 | --procnames-start-lines
3 | --no-parameter-indentation
4 | --indent-level4
5 | --line-comments-indentation4
6 | --cuddle-else
7 | --brace-indent0
8 | --dont-star-comments
9 | --blank-lines-after-declarations
10 | --blank-lines-after-procedures
11 | --no-blank-lines-after-commas
12 | --comment-indentation33
13 | --declaration-comment-column33
14 | --no-comment-delimiters-on-blank-lines
15 | --continuation-indentation4
16 | --case-indentation0
17 | --else-endif-column33
18 | --no-space-after-casts
19 | --no-blank-before-sizeof
20 | --declaration-indentation0
21 | --continue-at-parentheses
22 | --no-space-after-function-call-names
23 | --swallow-optional-blank-lines
24 | --dont-space-special-semicolon
25 | --tab-size8
26 | --line-length132
27 | --braces-on-if-line
28 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/aloxaf/.cvsignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | Makefile.in
3 | *.export
4 | so_locations
5 | *.pro
6 | *.epro
7 | *.syms
8 | *.o
9 | *.o.c
10 | *.so
11 | *.mdh
12 | *.mdhi
13 | *.mdhs
14 | *.mdh.tmp
15 | *.swp
16 | errnames.c errcount.h
17 | *.dll
18 | curses_keys.h
19 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/aloxaf/.distfiles:
--------------------------------------------------------------------------------
1 | DISTFILES_SRC='
2 | '
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/aloxaf/.exrc:
--------------------------------------------------------------------------------
1 | set ai
2 | set sw=4
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/aloxaf/.gitignore:
--------------------------------------------------------------------------------
1 | Makefile.in
2 | *.epro
3 | *.export
4 | *.mdh
5 | *.mdhi
6 | *.mdhs
7 | *.pro
8 | *.syms
9 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/aloxaf/fzftab.mdd:
--------------------------------------------------------------------------------
1 | name=aloxaf/fzftab
2 | link=dynamic
3 | load=no
4 |
5 | autofeatures="b:fzf-tab-colorize p:FZF_TAB_MODULE_VERSION"
6 |
7 | objects="fzftab.o"
8 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/hashtable.h:
--------------------------------------------------------------------------------
1 | /*
2 | * hashtable.h - header file for hash table handling code
3 | *
4 | * This file is part of zsh, the Z shell.
5 | *
6 | * Copyright (c) 1992-1997 Paul Falstad
7 | * All rights reserved.
8 | *
9 | * Permission is hereby granted, without written agreement and without
10 | * license or royalty fees, to use, copy, modify, and distribute this
11 | * software and to distribute modified versions of this software for any
12 | * purpose, provided that the above copyright notice and the following
13 | * two paragraphs appear in all copies of this software.
14 | *
15 | * In no event shall Paul Falstad or the Zsh Development Group be liable
16 | * to any party for direct, indirect, special, incidental, or consequential
17 | * damages arising out of the use of this software and its documentation,
18 | * even if Paul Falstad and the Zsh Development Group have been advised of
19 | * the possibility of such damage.
20 | *
21 | * Paul Falstad and the Zsh Development Group specifically disclaim any
22 | * warranties, including, but not limited to, the implied warranties of
23 | * merchantability and fitness for a particular purpose. The software
24 | * provided hereunder is on an "as is" basis, and Paul Falstad and the
25 | * Zsh Development Group have no obligation to provide maintenance,
26 | * support, updates, enhancements, or modifications.
27 | *
28 | */
29 |
30 | /* Builtin function numbers; used by handler functions that handle more *
31 | * than one builtin. Note that builtins such as compctl, that are not *
32 | * overloaded, don't get a number. */
33 |
34 | #define BIN_TYPESET 0
35 | #define BIN_BG 1
36 | #define BIN_FG 2
37 | #define BIN_JOBS 3
38 | #define BIN_WAIT 4
39 | #define BIN_DISOWN 5
40 | #define BIN_BREAK 6
41 | #define BIN_CONTINUE 7
42 | #define BIN_EXIT 8
43 | #define BIN_RETURN 9
44 | #define BIN_CD 10
45 | #define BIN_POPD 11
46 | #define BIN_PUSHD 12
47 | #define BIN_PRINT 13
48 | #define BIN_EVAL 14
49 | #define BIN_SCHED 15
50 | #define BIN_FC 16
51 | #define BIN_R 17
52 | #define BIN_PUSHLINE 18
53 | #define BIN_LOGOUT 19
54 | #define BIN_TEST 20
55 | #define BIN_BRACKET 21
56 | #define BIN_READONLY 22
57 | #define BIN_ECHO 23
58 | #define BIN_DISABLE 24
59 | #define BIN_ENABLE 25
60 | #define BIN_PRINTF 26
61 | #define BIN_COMMAND 27
62 | #define BIN_UNHASH 28
63 | #define BIN_UNALIAS 29
64 | #define BIN_UNFUNCTION 30
65 | #define BIN_UNSET 31
66 |
67 | /* These currently depend on being 0 and 1. */
68 | #define BIN_SETOPT 0
69 | #define BIN_UNSETOPT 1
70 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/signames1.awk:
--------------------------------------------------------------------------------
1 | # This is an awk script which finds out what the possibilities for
2 | # the signal names are, and dumps them out so that cpp can turn them
3 | # into numbers. Since we don't need to decide here what the
4 | # real signals are, we can afford to be generous about definitions,
5 | # in case the definitions are in terms of other definitions.
6 | # However, we need to avoid definitions with parentheses, which will
7 | # mess up the syntax.
8 | BEGIN { printf "#include \n\n" }
9 |
10 | /^[\t ]*#[\t ]*define[\t _]*SIG[A-Z][A-Z0-9]*[\t ][\t ]*[^(\t ]/ {
11 | sigindex = index($0, "SIG")
12 | sigtail = substr($0, sigindex, 80)
13 | split(sigtail, tmp)
14 | signam = substr(tmp[1], 4, 20)
15 | if (substr($0, sigindex-1, 1) == "_")
16 | printf("XXNAMES XXSIG%s _SIG%s\n", signam, signam)
17 | else
18 | printf("XXNAMES XXSIG%s SIG%s\n", signam, signam)
19 | }
20 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/zsh.rc:
--------------------------------------------------------------------------------
1 | // Use this file as follows
2 | //
3 | // myapp.exe : myapp.o myapp.res
4 | // gcc -mwindows myapp.o myapp.res -o $@
5 | //
6 | // myapp.res : myapp.rc resource.h
7 | // windres $< -O coff -o $@
8 | IDR_MAINFRAME ICON DISCARDABLE "zsh.ico"
9 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Src/ztype.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ztype.h - character classification macros
3 | *
4 | * This file is part of zsh, the Z shell.
5 | *
6 | * Copyright (c) 1992-1997 Paul Falstad
7 | * All rights reserved.
8 | *
9 | * Permission is hereby granted, without written agreement and without
10 | * license or royalty fees, to use, copy, modify, and distribute this
11 | * software and to distribute modified versions of this software for any
12 | * purpose, provided that the above copyright notice and the following
13 | * two paragraphs appear in all copies of this software.
14 | *
15 | * In no event shall Paul Falstad or the Zsh Development Group be liable
16 | * to any party for direct, indirect, special, incidental, or consequential
17 | * damages arising out of the use of this software and its documentation,
18 | * even if Paul Falstad and the Zsh Development Group have been advised of
19 | * the possibility of such damage.
20 | *
21 | * Paul Falstad and the Zsh Development Group specifically disclaim any
22 | * warranties, including, but not limited to, the implied warranties of
23 | * merchantability and fitness for a particular purpose. The software
24 | * provided hereunder is on an "as is" basis, and Paul Falstad and the
25 | * Zsh Development Group have no obligation to provide maintenance,
26 | * support, updates, enhancements, or modifications.
27 | *
28 | */
29 |
30 | #define IDIGIT (1 << 0)
31 | #define IALNUM (1 << 1)
32 | #define IBLANK (1 << 2)
33 | #define INBLANK (1 << 3)
34 | #define ITOK (1 << 4)
35 | #define ISEP (1 << 5)
36 | #define IALPHA (1 << 6)
37 | #define IIDENT (1 << 7)
38 | #define IUSER (1 << 8)
39 | #define ICNTRL (1 << 9)
40 | #define IWORD (1 << 10)
41 | #define ISPECIAL (1 << 11)
42 | #define IMETA (1 << 12)
43 | #define IWSEP (1 << 13)
44 | #define INULL (1 << 14)
45 | #define IPATTERN (1 << 15)
46 | #define zistype(X,Y) (typtab[STOUC(X)] & Y)
47 | #define idigit(X) zistype(X,IDIGIT)
48 | #define ialnum(X) zistype(X,IALNUM)
49 | #define iblank(X) zistype(X,IBLANK) /* blank, not including \n */
50 | #define inblank(X) zistype(X,INBLANK) /* blank or \n */
51 | #define itok(X) zistype(X,ITOK)
52 | #define isep(X) zistype(X,ISEP)
53 | #define ialpha(X) zistype(X,IALPHA)
54 | #define iident(X) zistype(X,IIDENT)
55 | #define iuser(X) zistype(X,IUSER) /* username char */
56 | #define icntrl(X) zistype(X,ICNTRL)
57 | #define iword(X) zistype(X,IWORD)
58 | #define ispecial(X) zistype(X,ISPECIAL)
59 | #define imeta(X) zistype(X,IMETA)
60 | #define iwsep(X) zistype(X,IWSEP)
61 | #define inull(X) zistype(X,INULL)
62 | #define ipattern(X) zistype(X,IPATTERN)
63 |
64 | /*
65 | * Bit flags for typtab_flags --- preserved after
66 | * shell initialisation.
67 | */
68 | #define ZTF_INIT (0x0001) /* One-off initialisation done */
69 | #define ZTF_INTERACT (0x0002) /* Shell interative and reading from stdin */
70 | #define ZTF_SP_COMMA (0x0004) /* Treat comma as a special characters */
71 | #define ZTF_BANGCHAR (0x0008) /* Treat bangchar as a special character */
72 |
73 | #ifdef MULTIBYTE_SUPPORT
74 | #define WC_ZISTYPE(X,Y) wcsitype((X),(Y))
75 | # ifdef ENABLE_UNICODE9
76 | # define WC_ISPRINT(X) u9_iswprint(X)
77 | # else
78 | # define WC_ISPRINT(X) iswprint(X)
79 | # endif
80 | #else
81 | #define WC_ZISTYPE(X,Y) zistype((X),(Y))
82 | #define WC_ISPRINT(X) isprint(X)
83 | #endif
84 |
85 | #if defined(__APPLE__) && defined(BROKEN_ISPRINT)
86 | #define ZISPRINT(c) isprint_ascii(c)
87 | #else
88 | #define ZISPRINT(c) isprint(c)
89 | #endif
90 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/.cvsignore:
--------------------------------------------------------------------------------
1 | Makefile
2 | *.tmp
3 | *.swp
4 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/.distfiles:
--------------------------------------------------------------------------------
1 | DISTFILES_SRC='
2 | '
3 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/A03quoting.ztst:
--------------------------------------------------------------------------------
1 | %test
2 | print 'single quotes' "double quotes" `echo backquotes`
3 | 0:Simple use of quotes
4 | >single quotes double quotes backquotes
5 |
6 | foo=text
7 | print -r '$foo\\\' "$foo\$foo\\\"\``echo bar`\`\"" `print -r $foo\\\``
8 | 0:Quoting inside quotes
9 | >$foo\\\ text$foo\"`bar`" text`
10 |
11 | print -r $'\'ut queant laxis\'\n"resonare fibris"'
12 | 0:$'-style quotes
13 | >'ut queant laxis'
14 | >"resonare fibris"
15 |
16 | print -r $'\'a \\\' is \'a backslash\' is \'a \\\''
17 | 0:$'-style quotes with backslashed backslashes
18 | >'a \' is 'a backslash' is 'a \'
19 |
20 | chars=$(print -r $'BS\\MBS\M-\\')
21 | for (( i = 1; i <= $#chars; i++ )); do
22 | char=$chars[$i]
23 | print $(( [#16] #char ))
24 | done
25 | 0:$'-style quote with metafied backslash
26 | >16#42
27 | >16#53
28 | >16#5C
29 | >16#4D
30 | >16#42
31 | >16#53
32 | >16#DC
33 |
34 | print -r ''''
35 | setopt rcquotes
36 | # We need to set rcquotes here for the next example since it is
37 | # needed while parsing.
38 | 0:No RC_QUOTES with single quotes
39 | >
40 |
41 | print -r ''''
42 | unsetopt rcquotes
43 | 0:Yes RC_QUOTES with single quotes
44 | >'
45 | # ' Deconfuse Emacs quoting rules
46 |
47 | print '<\u0041>'
48 | printf '%s\n' $'<\u0042>'
49 | print '<\u0043>'
50 | printf '%s\n' $'<\u0044>'
51 | 0:\u in both print and printf
52 | >
53 | >
54 | >
55 | >
56 |
57 | null1="$(print -r a$'b\0c'd)"
58 | null2="$(setopt posixstrings; print -r a$'b\0c'd)"
59 | for string in $null1 $null2; do
60 | print ":"
61 | for (( i = 1; i <= $#string; i++ )); do
62 | char=$string[$i]
63 | print $(( [#16] #char ))
64 | done
65 | done
66 | 0:Embedded null characters in $'...' strings.
67 | >:
68 | >16#61
69 | >16#62
70 | >16#0
71 | >16#63
72 | >16#64
73 | >:
74 | >16#61
75 | >16#62
76 | >16#64
77 |
78 | () { print $# } '' "" $''
79 | 0:$'' should not be elided, in common with other empty quotes
80 | >3
81 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/A05execution.ztst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fzf-tab/modules/Test/A05execution.ztst
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/B04read.ztst:
--------------------------------------------------------------------------------
1 | # Tests for the read builtin
2 |
3 | # Tested elsewhere:
4 | # reading from a coprocess A01grammar, A04redirect
5 |
6 | # Not tested:
7 | # -c/-l/-n (options for compctl functions)
8 | # -q/-s (needs a tty)
9 |
10 | %test
11 |
12 | read <<<'hello world'
13 | print $REPLY
14 | 0:basic read command
15 | >hello world
16 |
17 | read -A <<<'hello world'
18 | print $reply[2]
19 | 0:array read
20 | >world
21 |
22 | read -k3 -u0 <<foo
26 |
27 | for char in y Y n N X $'\n'; do
28 | read -q -u0 <<<$char
29 | print $?
30 | done
31 | 0:read yes or no, default no
32 | >0
33 | >0
34 | >1
35 | >1
36 | >1
37 | >1
38 |
39 | read -d: <<foo
43 |
44 | print foo:bar|IFS=: read -A
45 | print $reply
46 | 0:use different, IFS separator to array
47 | >foo bar
48 |
49 | print -z hello world; read -z
50 | print $REPLY
51 | 0:read from editor buffer stack
52 | >hello world
53 |
54 | unset REPLY
55 | read -E <<hello
59 | >hello
60 |
61 | unset REPLY
62 | read -e <<hello
66 | >
67 |
68 | read -e -t <<hello
71 |
72 | SECONDS=0
73 | read -e -t 5 <<hello
77 | >0
78 |
79 | print -n 'Testing the\0null hypothesis\0' |
80 | while read -d $'\0' line; do print $line; done
81 | 0:read with null delimiter
82 | >Testing the
83 | >null hypothesis
84 |
85 | # Note that trailing NULLs are not stripped even if they are in
86 | # $IFS; only whitespace characters contained in $IFS are stripped.
87 | print -n $'Aaargh, I hate nulls.\0\0\0' | read line
88 | print ${#line}
89 | 0:read with trailing metafied characters
90 | >24
91 |
92 | (typeset -r foo
93 | read foo) <<one
101 | >two
102 | >three
103 | >one:two:three
104 |
105 | array=()
106 | read -Ae array <<<'four five six'
107 | print ${(j.:.)array}
108 | 0:Behaviour of -A and -e combination
109 | >four
110 | >five
111 | >six
112 | >
113 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/B05eval.ztst:
--------------------------------------------------------------------------------
1 | # Tests for the eval builtin.
2 | # This is quite short; eval is widely tested throughout the test suite
3 | # and its basic behaviour is fairly straightforward.
4 |
5 | %prep
6 |
7 | cmd='print $?'
8 |
9 | %test
10 |
11 | false
12 | eval $cmd
13 | 0:eval retains value of $?
14 | >1
15 |
16 | # no point getting worked up over what the error message is...
17 | ./command_not_found 2>/dev/null
18 | eval $cmd
19 | 0:eval after command not found
20 | >127
21 |
22 | # trick the test system
23 | sp=
24 | false
25 | eval "
26 | $sp
27 | $sp
28 | $sp
29 | "
30 | 0:eval with empty command resets the status
31 |
32 | false
33 | eval
34 | 0:eval with empty command resets the status
35 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/B06fc.ztst:
--------------------------------------------------------------------------------
1 | # Tests of fc command
2 | %prep
3 |
4 | mkdir fc.tmp
5 | cd fc.tmp
6 | print 'fc -l foo' >fcl
7 |
8 | %test
9 | $ZTST_testdir/../Src/zsh -f ./fcl
10 | 1:Checking that fc -l foo doesn't core dump when history is empty
11 | ?./fcl:fc:1: event not found: foo
12 |
13 | PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< $'fc -p /dev/null 0 0\n:'
14 | 0:Checking that fc -p doesn't core dump when history size is zero
15 | *?*%*
16 |
17 | PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null a 0'
18 | 1:Checking that fc -p rejects non-integer history size
19 | *?*% fc: HISTSIZE must be an integer
20 | *?*%*
21 |
22 | PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null 0 a'
23 | 1:Checking that fc -p rejects non-integer history save size
24 | *?*% fc: SAVEHIST must be an integer
25 | *?*%*
26 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst:
--------------------------------------------------------------------------------
1 | # Test the shift builtin.
2 |
3 | %test
4 |
5 | set -- one two three four five six seven eight nine ten
6 | shift
7 | print $*
8 | shift 2
9 | print $*
10 | shift -p 3
11 | print $*
12 | shift -p
13 | print $*
14 | 0:shifting positional parameters
15 | >two three four five six seven eight nine ten
16 | >four five six seven eight nine ten
17 | >four five six seven
18 | >four five six
19 |
20 | array=(yan tan tether mether pip azer sezar akker conter dick)
21 | shift 2 array
22 | print $array
23 | shift array
24 | print $array
25 | shift -p 3 array
26 | print $array
27 | shift -p array
28 | print $array
29 | 0:shifting array
30 | >tether mether pip azer sezar akker conter dick
31 | >mether pip azer sezar akker conter dick
32 | >mether pip azer sezar
33 | >mether pip azer
34 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/B09hash.ztst:
--------------------------------------------------------------------------------
1 | # The hash builtin is most used for the command hash table, which is
2 | # populated automatically. This is therefore highly system specific,
3 | # so mostly we'll test with the directory hash table: the logic is
4 | # virtually identical but with the different table, and furthermore
5 | # the shell doesn't care whether the directory exists unless you refer
6 | # to it in a context that needs one.
7 |
8 | %prep
9 | populate_hash() {
10 | hash -d one=/first/directory
11 | hash -d two=/directory/the/second
12 | hash -d three=/noch/ein/verzeichnis
13 | hash -d four=/bored/with/this/now
14 | }
15 |
16 | %test
17 |
18 | hash -d
19 | 0:Directory hash initially empty
20 |
21 | populate_hash
22 | hash -d
23 | 0:Populating directory hash and output with sort
24 | >four=/bored/with/this/now
25 | >one=/first/directory
26 | >three=/noch/ein/verzeichnis
27 | >two=/directory/the/second
28 |
29 | hash -rd
30 | hash -d
31 | 0:Empty hash
32 |
33 | populate_hash
34 | hash -d
35 | 0:Refill hash
36 | >four=/bored/with/this/now
37 | >one=/first/directory
38 | >three=/noch/ein/verzeichnis
39 | >two=/directory/the/second
40 |
41 | hash -dL
42 | 0:hash -L option
43 | >hash -d four=/bored/with/this/now
44 | >hash -d one=/first/directory
45 | >hash -d three=/noch/ein/verzeichnis
46 | >hash -d two=/directory/the/second
47 |
48 | hash -dm 't*'
49 | 0:hash -m option
50 | >three=/noch/ein/verzeichnis
51 | >two=/directory/the/second
52 |
53 | hash -d five=/yet/more six=/here/we/go seven=/not/yet/eight
54 | hash -d
55 | 0:Multiple assignments
56 | >five=/yet/more
57 | >four=/bored/with/this/now
58 | >one=/first/directory
59 | >seven=/not/yet/eight
60 | >six=/here/we/go
61 | >three=/noch/ein/verzeichnis
62 | >two=/directory/the/second
63 |
64 | hash -d one two three
65 | 0:Multiple arguments with no assignment not in verbose mode
66 |
67 | hash -vd one two three
68 | 0:Multiple arguments with no assignment in verbose mode
69 | >one=/first/directory
70 | >two=/directory/the/second
71 | >three=/noch/ein/verzeichnis
72 |
73 | hash -d t-t=/foo
74 | i="~t-t"
75 | print ~t-t/bar
76 | print ${~i}/rab
77 | 0:Dashes are untokenized in directory hash names
78 | >/foo/bar
79 | >/foo/rab
80 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/D02glob.ztst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.config/zsh/plugins/fzf-tab/modules/Test/D02glob.ztst
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/D05array.ztst:
--------------------------------------------------------------------------------
1 | # Tests for array indexing
2 |
3 | %prep
4 |
5 | foo=(a b c d e f g)
6 | arr=(foo bar baz)
7 | mkdir array.tmp
8 | touch array.tmp/{1..9}
9 |
10 | %test
11 |
12 | echo .$foo[1].
13 | 0:The first element
14 | >.a.
15 |
16 | echo .$foo[1,4].
17 | 0:Normal multi-item indexing
18 | >.a b c d.
19 |
20 | echo .$foo[1,0].
21 | 0:This should be empty
22 | >..
23 |
24 | echo .$foo[4,1].
25 | 0:Another empty slice
26 | >..
27 |
28 | echo .$foo[1,-8].
29 | 0:An empty slice with a negative end
30 | >..
31 |
32 | echo .$foo[0].
33 | 0:Treat 0 as empty
34 | >..
35 |
36 | echo .$foo[0,0].
37 | 0:Treat 0,0 as empty
38 | >..
39 |
40 | echo .$foo[0,1].
41 | 0:Another weird way to access the first element
42 | >.a.
43 |
44 | echo .$foo[3].
45 | 0:An inner element
46 | >.c.
47 |
48 | echo .$foo[2,2].
49 | 0:Another inner element
50 | >.b.
51 |
52 | echo .$foo[2,-4].
53 | 0:A slice with a negative end
54 | >.b c d.
55 |
56 | echo .$foo[-4,5].
57 | 0:A slice with a negative start
58 | >.d e.
59 |
60 | echo .$foo[-6,-2].
61 | 0:A slice with a negative start and end
62 | >.b c d e f.
63 |
64 | echo .${${arr[2]}[1]}.
65 | echo .${${arr[-2]}[1]}.
66 | echo .${${arr[2,2]}[1]}.
67 | echo .${${arr[-2,-2]}[1]}.
68 | echo .${${arr[2,-2]}[1]}.
69 | echo .${${arr[-2,2]}[1]}.
70 | 0:Slices should return an array, elements a scalar
71 | >.b.
72 | >.b.
73 | >.bar.
74 | >.bar.
75 | >.bar.
76 | >.bar.
77 |
78 | setopt ksh_arrays
79 | echo .${foo[1,2]}.
80 | unsetopt ksh_arrays
81 | 0:Ksh array indexing
82 | >.b c.
83 |
84 | setopt ksh_arrays
85 | echo .${foo[0,1]}.
86 | unsetopt ksh_arrays
87 | 0:Ksh array indexing (ii)
88 | >.a b.
89 |
90 | setopt ksh_arrays
91 | echo .${foo[1,-1]}.
92 | unsetopt ksh_arrays
93 | 0:Ksh array indexing (iii)
94 | >.b c d e f g.
95 |
96 | cd array.tmp
97 | echo . ?([3,5]) .
98 | cd ..
99 | 0:Glob array indexing
100 | >. 3 4 5 .
101 |
102 | cd array.tmp
103 | echo . ?([2,-2]) .
104 | cd ..
105 | 0:Glob array indexing (ii)
106 | >. 2 3 4 5 6 7 8 .
107 |
108 | cd array.tmp
109 | echo . ?([-6,-4]) .
110 | cd ..
111 | 0:Glob array indexing (iii)
112 | >. 4 5 6 .
113 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/Makefile.in:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile for Test subdirectory
3 | #
4 | # Copyright (c) 1999 Peter Stephensons
5 | # All rights reserved.
6 | #
7 | # Permission is hereby granted, without written agreement and without
8 | # license or royalty fees, to use, copy, modify, and distribute this
9 | # software and to distribute modified versions of this software for any
10 | # purpose, provided that the above copyright notice and the following
11 | # two paragraphs appear in all copies of this software.
12 | #
13 | # In no event shall Peter Stephenson or the Zsh Development Group be liable
14 | # to any party for direct, indirect, special, incidental, or consequential
15 | # damages arising out of the use of this software and its documentation,
16 | # even if Peter Stephenson and the Zsh Development Group have been advised of
17 | # the possibility of such damage.
18 | #
19 | # Peter Stephenson and the Zsh Development Group specifically disclaim any
20 | # warranties, including, but not limited to, the implied warranties of
21 | # merchantability and fitness for a particular purpose. The software
22 | # provided hereunder is on an "as is" basis, and Peter Stephenson and the
23 | # Zsh Development Group have no obligation to provide maintenance,
24 | # support, updates, enhancements, or modifications.
25 | #
26 |
27 | subdir = Test
28 | dir_top = ..
29 | SUBDIRS =
30 |
31 | @VERSION_MK@
32 |
33 | # source/build directories
34 | VPATH = @srcdir@
35 | sdir = @srcdir@
36 | sdir_top = @top_srcdir@
37 | INSTALL = @INSTALL@
38 |
39 | @DEFS_MK@
40 |
41 | # ========== DEPENDENCIES FOR TESTING ==========
42 |
43 | check test:
44 | if test -n "$(DLLD)"; then \
45 | cd $(dir_top) && DESTDIR= \
46 | $(MAKE) MODDIR=`pwd`/$(subdir)/Modules install.modules > /dev/null; \
47 | fi
48 | if ZTST_testlist="`for f in $(sdir)/$(TESTNUM)*.ztst; \
49 | do echo $$f; done`" \
50 | ZTST_srcdir="$(sdir)" \
51 | ZTST_exe=$(dir_top)/Src/zsh@EXEEXT@ \
52 | $(dir_top)/Src/zsh@EXEEXT@ +Z -f $(sdir)/runtests.zsh; then \
53 | stat=0; \
54 | else \
55 | stat=1; \
56 | fi; \
57 | sleep 1; \
58 | rm -rf Modules .zcompdump; \
59 | exit $$stat
60 |
61 | # ========== DEPENDENCIES FOR CLEANUP ==========
62 |
63 | @CLEAN_MK@
64 |
65 | mostlyclean-here:
66 | rm -rf Modules .zcompdump *.tmp
67 |
68 | distclean-here:
69 | rm -f Makefile
70 |
71 | realclean-here:
72 |
73 | # ========== DEPENDENCIES FOR MAINTENANCE ==========
74 |
75 | @CONFIG_MK@
76 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/README:
--------------------------------------------------------------------------------
1 | There are now different sections, expressed by the first letter in the
2 | scripts names:
3 |
4 | A: basic command parsing and execution
5 | B: builtins
6 | C: shell commands with special syntax
7 | D: substititution
8 | E: options
9 | V: modules
10 | W: builtin interactive commands and constructs
11 | X: line editing
12 | Y: completion
13 | Z: separate systems and user contributions
14 |
15 | You will need to run these by using `make test' in the Test subdirectory of
16 | the build area for your system (which may or may not be the same as the
17 | Test subdirectory of the source tree), or the directory above. You can get
18 | more information about the tests being performed with
19 | ZTST_verbose=1 make check
20 | (`test' is equivalent to `check') or change 1 to 2 for even more detail.
21 |
22 | Individual or groups of tests can be performed with
23 | make TESTNUM=C02 check
24 | or
25 | make TESTNUM=C check
26 | to perform just the test beginning C02, or all tests beginning C,
27 | respectively.
28 |
29 | Instructions on how to write tests are given in B01cd.ztst, which acts as a
30 | model.
31 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/V08zpty.ztst:
--------------------------------------------------------------------------------
1 | # zpty is required by tests of interactive modes of the shell itself.
2 | # This tests some extra things.
3 |
4 | %prep
5 |
6 | if ! zmodload zsh/zpty 2>/dev/null
7 | then
8 | ZTST_unimplemented="the zsh/zpty module is not available"
9 | elif [[ $OSTYPE = cygwin ]]; then
10 | ZTST_unimplemented="the zsh/zpty module does not work on Cygwin"
11 | fi
12 |
13 | %test
14 |
15 | zpty cat cat
16 | zpty -w cat a line of text
17 | var=
18 | zpty -r cat var && print -r -- ${var%%$'\r\n'}
19 | zpty -d cat
20 | 0:zpty with a process that does not set up the terminal: internal write
21 | >a line of text
22 |
23 | zpty cat cat
24 | print a line of text | zpty -w cat
25 | var=
26 | zpty -r cat var && print -r -- ${var%%$'\r\n'}
27 | zpty -d cat
28 | 0:zpty with a process that does not set up the terminal: write via stdin
29 | >a line of text
30 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/V09datetime.ztst:
--------------------------------------------------------------------------------
1 | %prep
2 |
3 | if zmodload zsh/datetime 2>/dev/null; then
4 | setopt multibyte
5 | unset LC_ALL
6 | LC_TIME=C
7 | TZ=UTC+0
8 | # It's not clear this skip_extensions is correct, but the
9 | # format in question is causing problems on Solaris.
10 | # We'll revist this after the release.
11 | [[ "$(strftime %^_10B 0)" = " JANUARY" ]] || skip_extensions=1
12 | [[ "$(LC_TIME=ja_JP.UTF-8 strftime %OS 1)" = 一 ]] || skip_japanese=1
13 | else
14 | ZTST_unimplemented="can't load the zsh/datetime module for testing"
15 | fi
16 |
17 | %test
18 |
19 | strftime %y 0
20 | strftime %Y 1000000000
21 | strftime %x 1200000000
22 | strftime %X 1200000001
23 | 0:basic format specifiers
24 | >70
25 | >2001
26 | >01/10/08
27 | >21:20:01
28 |
29 | strftime %-m_%f_%K_%L 1181100000
30 | strftime %6. 0
31 | 0:zsh extensions
32 | >6_6_3_3
33 | >000000
34 |
35 | if [[ $skip_extensions = 1 ]]; then
36 | ZTST_skip="strftime extensions not supported"
37 | elif [[ $skip_japanese = 1 ]]; then
38 | ZTST_skip="Japanese UTF-8 locale not supported"
39 | else
40 | (
41 | LC_TIME=ja_JP.UTF-8
42 | strftime %Ey 1000000000
43 | strftime %Oy 1000000000
44 | strftime %Ex 1000000000
45 | strftime %OS 1000000000
46 | strftime %03Ey 650000000
47 | )
48 | fi
49 | 0:alternate format extensions
50 | >13
51 | >一
52 | >平成13年09月09日
53 | >四十
54 | >002
55 |
56 | if [[ $skip_extensions = 1 ]]; then
57 | ZTST_skip="strftime extensions not supported"
58 | else
59 | (
60 | strftime '%#A' 0
61 | strftime '%^_10B' 0
62 | strftime %03Ey 650000000
63 | strftime %-Oe 0
64 | )
65 | fi
66 | 0:various extensions
67 | >THURSDAY
68 | > JANUARY
69 | >090
70 | >1
71 |
72 | print -r -- ${(V)"$(strftime $'%Y\0%m\0%d' 100000000)"}
73 | 0:Embedded nulls
74 | >1973^@03^@03
75 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/W01history.ztst:
--------------------------------------------------------------------------------
1 | # Tests for BANG_HIST replacements
2 |
3 | %prep
4 |
5 | if [[ -t 0 ]]; then print -u $ZTST_fd History tests write to /dev/tty; fi
6 |
7 | %test
8 |
9 | $ZTST_testdir/../Src/zsh -fis <<<'
10 | print one two three four five six seven eight nine ten
11 | print !:$ !:10 !:9 !:1 !:0
12 | print one two three four five six seven eight nine ten
13 | print !:0-$ !:1-2
14 | ' 2>/dev/null
15 | 0:History word references
16 | >one two three four five six seven eight nine ten
17 | >ten ten nine one print
18 | >one two three four five six seven eight nine ten
19 | >print one two three four five six seven eight nine ten one two
20 |
21 | $ZTST_testdir/../Src/zsh -fis <<<'
22 | print line one of an arbitrary series
23 | print issue two for some mystery sequence
24 | print !-1:5-$
25 | print !1:2
26 | print !2:2
27 | print !-3:1-$
28 | ' 2>/dev/null
29 | 0:History line numbering
30 | >line one of an arbitrary series
31 | >issue two for some mystery sequence
32 | >mystery sequence
33 | >one
34 | >two
35 | >mystery sequence
36 |
37 | $ZTST_testdir/../Src/zsh -fis <<<'
38 | print All metaphor, Malachi, stilts and all
39 | print !1:2:s/,/\\\\?/ !1:2:s/m/shm/:s/,/\!/
40 | print !1:2:&
41 | print -l !1:2-3:gs/a/o/
42 | ' 2>/dev/null
43 | 0:History substitution
44 | >All metaphor, Malachi, stilts and all
45 | >metaphor? shmetaphor!
46 | >metaphor!
47 | >metophor,
48 | >Molochi,
49 |
50 | $ZTST_testdir/../Src/zsh -fis <<<'
51 | echo foo bar
52 | echo $(!!) again
53 | echo more $( !! )' 2>/dev/null
54 | 0:Regression test for history references in command substitution
55 | >foo bar
56 | >foo bar again
57 | >more foo bar again
58 | *?*
59 | F:Check that a history bug introduced by workers/34160 is working again.
60 | # Discarded line of error output consumes prompts printed by "zsh -i".
61 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/Test/runtests.zsh:
--------------------------------------------------------------------------------
1 | #!/bin/zsh -f
2 |
3 | emulate zsh
4 |
5 | # Run all specified tests, keeping count of which succeeded.
6 | # The reason for this extra layer above the test script is to
7 | # protect from catastrophic failure of an individual test.
8 | # We could probably do that with subshells instead.
9 |
10 | integer success failure skipped retval
11 | for file in "${(f)ZTST_testlist}"; do
12 | $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
13 | retval=$?
14 | if (( $retval == 2 )); then
15 | (( skipped++ ))
16 | elif (( $retval )); then
17 | (( failure++ ))
18 | else
19 | (( success++ ))
20 | fi
21 | done
22 | print "**************************************
23 | $success successful test script${${success:#1}:+s}, \
24 | $failure failure${${failure:#1}:+s}, \
25 | $skipped skipped
26 | **************************************"
27 | return $(( failure ? 1 : 0 ))
28 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/aclocal.m4:
--------------------------------------------------------------------------------
1 | # Local additions to Autoconf macros.
2 | # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
3 | # Francois Pinard , 1992.
4 |
5 | # @defmac fp_PROG_CC_STDC
6 | # @maindex PROG_CC_STDC
7 | # @ovindex CC
8 | # If the C compiler in not in ANSI C mode by default, try to add an option
9 | # to output variable @code{CC} to make it so. This macro tries various
10 | # options that select ANSI C on some system or another. It considers the
11 | # compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
12 | # handles function prototypes correctly.
13 | #
14 | # If you use this macro, you should check after calling it whether the C
15 | # compiler has been set to accept ANSI C; if not, the shell variable
16 | # @code{fp_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
17 | # code in ANSI C, you can make an un-ANSIfied copy of it by using the
18 | # program @code{ansi2knr}, which comes with Ghostscript.
19 | # @end defmac
20 |
21 | define(fp_PROG_CC_STDC,
22 | [AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C,
23 | fp_cv_prog_cc_stdc,
24 | [fp_cv_prog_cc_stdc=no
25 | ac_save_CFLAGS="$CFLAGS"
26 | # Don't try gcc -ansi; that turns off useful extensions and
27 | # breaks some systems' header files.
28 | # AIX -qlanglvl=ansi
29 | # Ultrix and OSF/1 -std1
30 | # HP-UX -Ae or -Aa -D_HPUX_SOURCE
31 | # SVR4 -Xc
32 | # For HP-UX, we try -Ae first; this turns on ANSI but also extensions,
33 | # as well as defining _HPUX_SOURCE, and we can then use long long.
34 | # We keep the old version for backward compatibility.
35 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" -Xc
36 | do
37 | CFLAGS="$ac_save_CFLAGS $ac_arg"
38 | AC_TRY_COMPILE(
39 | [#ifndef __STDC__
40 | choke me
41 | #endif
42 | ], [int test (int i, double x);
43 | struct s1 {int (*f) (int a);};
44 | struct s2 {int (*f) (double a);};],
45 | [fp_cv_prog_cc_stdc="$ac_arg"; break])
46 | done
47 | CFLAGS="$ac_save_CFLAGS"
48 | ])
49 | case "x$fp_cv_prog_cc_stdc" in
50 | x|xno) ;;
51 | *) CC="$CC $fp_cv_prog_cc_stdc" ;;
52 | esac
53 | ])
54 |
55 | AC_DEFUN(AC_PROG_LN,
56 | [AC_MSG_CHECKING(whether ln works)
57 | AC_CACHE_VAL(ac_cv_prog_LN,
58 | [rm -f conftestdata conftestlink
59 | echo > conftestdata
60 | if ln conftestdata conftestlink 2>/dev/null
61 | then
62 | rm -f conftestdata conftestlink
63 | ac_cv_prog_LN="ln"
64 | else
65 | rm -f conftestdata
66 | ac_cv_prog_LN="cp"
67 | fi])dnl
68 | LN="$ac_cv_prog_LN"
69 | if test "$ac_cv_prog_LN" = "ln"; then
70 | AC_MSG_RESULT(yes)
71 | else
72 | AC_MSG_RESULT(no)
73 | fi
74 | AC_SUBST(LN)dnl
75 | ])
76 |
77 | builtin(include, aczsh.m4)
78 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/copy_from_zsh_src.zsh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | [[ -z "$1" || "$1" = "-h" || "$1" = "--help" ]] && { print "Single argument: path to Zsh source tree"; exit 0; }
4 |
5 | print "Will invoke git clean -dxf, 3 seconds"
6 | sleep 3
7 |
8 | git clean -dxf
9 |
10 | [[ ! -d "$1" ]] && { print "Path to Zsh source doesn't exist (i.e.: $1)"; exit 1; }
11 |
12 | local from="$1"
13 |
14 | autoload -Uz colors
15 | colors
16 |
17 | integer count=0
18 |
19 | for i in configure.ac Src/*.c Src/*.h; do
20 | if [[ -f "$from/$i" ]]; then
21 | cp -vf "$from/$i" "$i" && (( ++ count )) || print "${fg_bold[red]}Copy error for: $i${reset_color}"
22 | else
23 | print "${fg[red]}$i Doesn't exist${reset_color}"
24 | fi
25 | done
26 |
27 | echo "${fg[green]}Copied ${fg[yellow]}$count${fg[green]} files${reset_color}"
28 |
29 | patch -p2 -i ./patch_cfgac.diff
30 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/patch_cfgac.diff:
--------------------------------------------------------------------------------
1 | diff --git a/module/configure.ac b/module/configure.ac
2 | index 298af02..b116b80 100644
3 | --- a/module/configure.ac
4 | +++ b/module/configure.ac
5 | @@ -437,11 +437,6 @@ fi],
6 | [AC_DEFINE(DEFAULT_READNULLCMD,"more")]
7 | )
8 |
9 | -dnl Do you want to look for pcre support?
10 | -AC_ARG_ENABLE(pcre,
11 | -AC_HELP_STRING([--enable-pcre],
12 | -[enable the search for the pcre library (may create run-time library dependencies)]))
13 | -
14 | dnl Do you want to look for capability support?
15 | AC_ARG_ENABLE(cap,
16 | AC_HELP_STRING([--enable-cap],
17 | @@ -672,16 +667,6 @@ AC_HEADER_STAT
18 | AC_HEADER_SYS_WAIT
19 |
20 | oldcflags="$CFLAGS"
21 | -if test x$enable_pcre = xyes; then
22 | -AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config)
23 | -dnl Typically (meaning on this single RedHat 9 box in front of me)
24 | -dnl pcre-config --cflags produces a -I output which needs to go into
25 | -dnl CPPFLAGS else configure's preprocessor tests don't pick it up,
26 | -dnl producing a warning.
27 | -if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then
28 | - CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
29 | -fi
30 | -fi
31 |
32 | AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
33 | termios.h sys/param.h sys/filio.h string.h memory.h \
34 | @@ -689,7 +674,7 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
35 | locale.h errno.h stdio.h stdarg.h varargs.h stdlib.h \
36 | unistd.h sys/capability.h \
37 | utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
38 | - netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \
39 | + netinet/in_systm.h langinfo.h wchar.h stddef.h \
40 | sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \
41 | ncurses/ncurses.h)
42 | if test x$dynamic = xyes; then
43 | @@ -932,12 +917,6 @@ if test "x$ac_found_iconv" = "xyes"; then
44 | [Define as const if the declaration of iconv() needs const.])
45 | fi
46 |
47 | -if test x$enable_pcre = xyes; then
48 | -dnl pcre-config should probably be employed here
49 | -dnl AC_SEARCH_LIBS(pcre_compile, pcre)
50 | - LIBS="`$ac_cv_prog_PCRECONF --libs` $LIBS"
51 | -fi
52 | -
53 | dnl ---------------------
54 | dnl CHECK TERMCAP LIBRARY
55 | dnl ---------------------
56 | @@ -1311,7 +1290,6 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \
57 | pathconf sysconf \
58 | tgetent tigetflag tigetnum tigetstr setupterm initscr resize_term \
59 | getcchar setcchar waddwstr wget_wch win_wch use_default_colors \
60 | - pcre_compile pcre_study pcre_exec \
61 | nl_langinfo \
62 | erand48 open_memstream \
63 | posix_openpt \
64 | @@ -3278,8 +3256,7 @@ AC_SUBST_FILE(CONFIG_MK)dnl
65 | AC_SUBST_FILE(DEFS_MK)dnl
66 | AC_SUBST_FILE(VERSION_MK)dnl
67 |
68 | -AC_CONFIG_FILES(Config/defs.mk Makefile Doc/Makefile Etc/Makefile \
69 | -Src/Makefile Test/Makefile)
70 | +AC_CONFIG_FILES(Config/defs.mk Makefile Src/Makefile Test/Makefile)
71 | AC_CONFIG_COMMANDS([config.modules], [. ./config.modules.sh])
72 | AC_CONFIG_COMMANDS([stamp-h], [echo >stamp-h])
73 |
74 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/modules/stamp-h.in:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/test/.gitignore:
--------------------------------------------------------------------------------
1 | .zcompdump
2 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/test/runtests.zsh:
--------------------------------------------------------------------------------
1 | #!/bin/zsh -f
2 |
3 | emulate zsh
4 |
5 | # Run all specified tests, keeping count of which succeeded.
6 | # The reason for this extra layer above the test script is to
7 | # protect from catastrophic failure of an individual test.
8 | # We could probably do that with subshells instead.
9 |
10 | integer success failure skipped retval
11 | for file in ${@:1}; do
12 | zsh +Z -f ./ztst.zsh $file
13 | retval=$?
14 | if (( $retval == 2 )); then
15 | (( skipped++ ))
16 | elif (( $retval )); then
17 | (( failure++ ))
18 | else
19 | (( success++ ))
20 | fi
21 | done
22 | print "**************************************
23 | $success successful test script${${success:#1}:+s}, \
24 | $failure failure${${failure:#1}:+s}, \
25 | $skipped skipped
26 | **************************************"
27 | return $(( failure ? 1 : 0 ))
28 |
--------------------------------------------------------------------------------
/.config/zsh/plugins/fzf-tab/test/select:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | zmodload zsh/zutil
4 |
5 | local -A headers range query
6 |
7 | zparseopts -E h:=headers n:=range q:=query e:=expect
8 |
9 | print -r -- "${query//\"/}"
10 | print -r -- "$expect"
11 | print -r -- "${query//\"/}" >&2
12 |
13 | local -a lines=()
14 | while read input; do
15 | lines+=(${input%$'\033[00m'})
16 | done
17 |
18 | for ((i = 1; i <= headers; i++)); do
19 | print -r -- $lines[i] >&2
20 | done
21 |
22 | lines[1,headers]=()
23 |
24 | for i in {1..$#lines}; do
25 | print -r -- ${lines[i]//$'\0'}"" >&2
26 | done
27 |
28 | if [[ $range != QUERY ]]; then
29 | for i in ${(s:,:)range}; do
30 | print -r -- $lines[i]
31 | done
32 | fi
33 |
--------------------------------------------------------------------------------
/.local/bin/appimagetool:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.local/bin/appimagetool
--------------------------------------------------------------------------------
/.local/bin/kjv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.local/bin/kjv
--------------------------------------------------------------------------------
/.local/bin/lid_shut:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | killall swayidle
3 |
--------------------------------------------------------------------------------
/.local/bin/minecraft-launcher:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Spagett1/dotfiles/2c8844664821dc56d4d4b20669be92d191b9b0c0/.local/bin/minecraft-launcher
--------------------------------------------------------------------------------
/.local/bin/mpd-start:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | mpd &
3 | sleep 3
4 | mpDris2
5 |
--------------------------------------------------------------------------------
/.local/bin/music-tool:
--------------------------------------------------------------------------------
1 | #!/usr/bin/bash
2 | cd $(pwd)
3 | if [ $1 = unsort ]; then
4 | mv ./*/*/{*.flac,*.mp3,*.opus} ./
5 | rmdir */* > /dev/null 2>&1
6 | rmdir * > /dev/null 2>&1
7 | else if [ $1 = opus ]; then
8 | mkdir out
9 | N=20
10 | for file in ./*
11 | do
12 | (
13 | # opus="out/$(echo ${file%.*}).opus"
14 | # echo $file $opus
15 | opusenc --bitrate 256 "$file" "out/${file%.*}.opus"
16 | ) &
17 | if [[ $(jobs -r -p | wc -l) -ge $N ]]; then
18 | # now there are $N jobs already running, so wait here for any job
19 | # to be finished so there is a place to start next one.
20 | wait -n
21 | fi
22 | done
23 | wait
24 | mv *.mp3 ./out
25 | rename 's/[*“”‘’\n<|>"[\]]//g; s/:/-/g; s/\s+/ /g; s/^\s*//; s/\s+\././g; '"s/'//g" out/*
26 | else if [ $1 = sort ]; then
27 | for file in {*.flac,*.mp3,*.opus}; do
28 | if echo "$file" | grep "opus" >/dev/null;
29 | then
30 | artist=$(opusinfo "$file" | grep "ARTIST=" | grep -v "ALBUM" | grep -v "DISPLAY" | tr -d '\n' | cut -d= -f2)
31 | album=$(opusinfo "$file" | grep "ALBUM=" | tr -d '\n' | cut -d= -f2)
32 | [ ! -d "$artist/$album" ] && mkdir -p "$artist/$album"
33 | mv "$file" "$artist/$album/"
34 | else
35 | artist=`ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 "$file"`
36 | artist="${artist// /_}"
37 | album=`ffprobe -loglevel error -show_entries format_tags=album -of default=noprint_wrappers=1:nokey=1 "$file"`
38 | album="${album// /_}"
39 | [ ! -d "$artist/$album" ] && mkdir -p "$artist/$album"
40 | mv "$file" "$artist/$album/"
41 | fi
42 | done
43 | rename "_" " " *
44 | rename "_" " " */*
45 | rename "_" " " */*/*
46 | rename "_" " " *
47 | rename "_" " " */*
48 | rename "_" " " */*/*
49 | rename "_" " " *
50 | rename "_" " " */*
51 | rename "_" " " */*/*
52 | rename "_" " " *
53 | rename "_" " " */*
54 | rename "_" " " */*/*
55 | rename "_" " " *
56 | rename "_" " " */*
57 | rename "_" " " */*/*
58 | rename "_" " " *
59 | rename "_" " " */*
60 | rename "_" " " */*/*
61 | rename "_" " " *
62 | rename "_" " " */*
63 | rename "_" " " */*/*
64 | fi
65 | fi
66 | fi
67 | fi
68 | mpc up
69 |
--------------------------------------------------------------------------------
/.local/bin/powersave:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | if [ $@ == "save" ]; then
3 | tlp bat
4 | cpupower frequency-set -g powersave
5 | cpupower frequency-set -u 2.7GHz
6 | else
7 | fi
8 |
9 |
--------------------------------------------------------------------------------
/.local/bin/ransong:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | unset folder
3 | unset song
4 | cd $HOME/music
5 | folder=`ls | sort -R | tail -n 1`
6 | cd "$folder"
7 | artist=`ls | sort -R | tail -n1`
8 | cd "$artist"
9 | song=`ls | sort -R | tail -n 1`
10 | mpc clear
11 | mpc add "$folder"/"$artist"/"$song"
12 | mpc play
13 | mpc pause
14 |
15 |
--------------------------------------------------------------------------------
/.local/bin/remap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # This script is called on startup to remap keys.
4 | # Decrease key repeat delay to 300ms and increase key repeat rate to 50 per second.
5 | xset r rate 300 50
6 | # Map the caps lock key to super, and map the menu key to right super.
7 | setxkbmap -option caps:super,altwin:menu_win
8 | # When caps lock is pressed only once, treat it as escape.
9 | killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
10 | # Turn off caps lock if on since there is no longer a key for it.
11 | xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
12 |
13 | # Set trackpad options
14 | xinput --set-prop 'MSFT0001:01 06CB:CE2D Touchpad' 'libinput Disable While Typing Enabled' 0
15 | xinput --set-prop 'MSFT0001:01 06CB:CE2D Touchpad' 'libinput Tapping Enabled' 1
16 | xinput --set-prop 'MSFT0001:01 06CB:CE2D Touchpad' 'libinput Middle Emulation Enabled' 1
17 |
--------------------------------------------------------------------------------
/.local/bin/res.sh:
--------------------------------------------------------------------------------
1 | if [ $(hyprctl monitors | grep ' at ' | cut -d@ -f2 | cut -d. -f1) = 60 ]; then
2 | hyprctl keyword monitor eDP-1,2880x1800@120,0x0,1 && sleep 1
3 | brightnessctl s $(brightnessctl g)
4 | echo 120 > /tmp/fps.tmp
5 | else
6 | hyprctl keyword monitor eDP-1,2880x1800@60,0x0,1 && sleep 1
7 | brightnessctl s $(brightnessctl g)
8 | echo 60 > /tmp/fps.tmp
9 | fi
10 |
--------------------------------------------------------------------------------
/.local/bin/toggle_dashboard.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | eww open --toggle background
3 | eww open --toggle profile
4 | eww open --toggle clock
5 | eww open --toggle network
6 | eww open --toggle music
7 | eww open --toggle system
8 | eww open --toggle workspaces
9 | eww open --toggle battery
10 | eww open --toggle weather
11 |
12 | rofi -show drun /home/spagett/.config/rofi/ && \\
13 | eww close background \\
14 | eww close profile \\
15 | eww close clock \\
16 | eww close network \\
17 | eww close music \\
18 | eww close system \\
19 | eww close workspaces \\
20 | eww close battery \\
21 | eww close weather \\
22 | || killall rofi
23 |
24 |
--------------------------------------------------------------------------------
/.local/bin/trackpad_toggle.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | HYPRLAND_DEVICE="asue120b:00-04f3:31c0-touchpad"
4 |
5 | if [ -z "$XDG_RUNTIME_DIR" ]; then
6 | export XDG_RUNTIME_DIR=/run/user/$(id -u)
7 | fi
8 |
9 | export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
10 |
11 | enable_touchpad() {
12 | printf "true" > "$STATUS_FILE"
13 |
14 | notify-send -u normal "Enabling Touchpad"
15 |
16 | hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" true
17 | }
18 |
19 | disable_touchpad() {
20 | printf "false" > "$STATUS_FILE"
21 |
22 | notify-send -u normal "Disabling Touchpad"
23 |
24 | hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" false
25 | }
26 |
27 | if ! [ -f "$STATUS_FILE" ]; then
28 | disable_touchpad
29 | else
30 | if [ $(cat "$STATUS_FILE") = "true" ]; then
31 | disable_touchpad
32 | elif [ $(cat "$STATUS_FILE") = "false" ]; then
33 | enable_touchpad
34 | fi
35 | fi
36 |
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Dotfiles
2 | 
3 |
4 | To deploy use Gnu Stow
5 | ```
6 | git clone https://github.com/Spagett1/dotfiles
7 | cd dotfiles
8 | stow ./ -t ~/
9 | ```
10 | Edit your city for the weather widget in .config/eww/scripts/weather_info and use your own openweathermaps api key.
11 |
--------------------------------------------------------------------------------