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.

Revisions

  1. pengshp revised this gist Nov 6, 2024. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions arch-pet-snippet.toml
    Original file line number Diff line number Diff line change
    @@ -40,3 +40,17 @@
    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"
  2. pengshp revised this gist Oct 4, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arch-pet-snippet.toml
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@
    Filename = "/home/hypr/.config/pet/snippet.toml"
    Output = ""
    Tag = ["linux", "fzf"]
    command = "procs |fzf --prompt='Kill Process> ' |awk '{print $2}' |xargs -r kill"
    command = "sudo ps axo pid,args |fzf --prompt='Kill Process> ' |awk '{print $1}' |sudo xargs -r kill"

    [[Snippets]]
    Description = "tldr help preview."
  3. pengshp created this gist Oct 3, 2024.
    42 changes: 42 additions & 0 deletions arch-pet-snippet.toml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@

    [[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 = "procs |fzf --prompt='Kill Process> ' |awk '{print $2}' |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"