Skip to content

Instantly share code, notes, and snippets.

@pengshp
Last active November 6, 2024 11:00
Show Gist options
  • Save pengshp/f2e7a267e265cc47c7a2fd74ed698df9 to your computer and use it in GitHub Desktop.
Save pengshp/f2e7a267e265cc47c7a2fd74ed698df9 to your computer and use it in GitHub Desktop.
description
[[Snippets]]
Description = "Arch removes pkg with fzf."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["archlinux", "fzf"]
command = "pacman -Qq | fzf --multi --preview 'pacman -Qi {1}' | xargs -ro sudo pacman -Rns"
[[Snippets]]
Description = "Arch Linux installs pkg with fzf."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["archlinux", "fzf"]
command = "pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
[[Snippets]]
Description = "Search fonts with fzf."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["font", "fzf"]
command = "fc-list : family style |fzf"
[[Snippets]]
Description = "Kill process with fzf."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["linux", "fzf"]
command = "sudo ps axo pid,args |fzf --prompt='Kill Process> ' |awk '{print $1}' |sudo xargs -r kill"
[[Snippets]]
Description = "tldr help preview."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["linux", "tldr", "fzf"]
command = "tldr --list | fzf --preview \"tldr {1} --color=always\" --preview-window=right,70% | xargs -r tldr"
[[Snippets]]
Description = "Search and edit file with fzf."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["nvim", "fzf"]
command = "fd -tf --hidden |fzf-tmux -p --border --reverse |xargs -r nvim"
[[Snippets]]
Description = "Search man pages with fzf."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["man", "fzf"]
command = "man -k . |fzf |awk '{print $1}' |xargs -r man"
[[Snippets]]
Description = "Search for services supported by firewall."
Filename = "/home/hypr/.config/pet/snippet.toml"
Output = ""
Tag = ["firewall", "fzf"]
command = "firewall-cmd --get-services |tr ' ' '\\n' |fzf"
@pengshp
Copy link
Author

pengshp commented Oct 3, 2024

Simple command-line snippet manager with pet.
https://github.com/knqyf263/pet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment