rofi-snippet
is a text snippet tool for Linux
rofi-snippet
relies on the following command line tools
xdotool
xsel
rofi
In addition, rofi-snippet
requires golang
for compilation.
For example, on Ubuntu
, you can get what you need with the following commands:
sudo apt install xsel
sudo apt install xdotool
sudo apt install rofi
sudo apt install golang-go
- Clone this repo:
git clone https://github.com/tkancf/rofi-snippet
- Change into rofi-snippet:
cd rofi-snippet
- Install:
make install
- A binary is produced in
~/go/bin
. Make sureGOPATH
is in your environment variables. To check, rungo env
. - Run
rofi-snippet
in the terminal to test.
By default, config.toml
is installed to /etc/rofi-snippet/config.toml
. If you want to change this default location, modify confPath := "/etc" + "/rofi-snippet" + "/config.toml"
in main.go
and following two lines in Makefile
to your desired location:
@sudo mkdir -p /etc/rofi-snippet/
@sudo cp ./config.toml /etc/rofi-snippet/
You probably want to bind rofi-snippet
to a global shortcut. If you're using i3
, you can add the following line to ~/.config/i3
:
bindsym $mod+Shift+d exec --no-startup-id "rofi-snippet"
Restart i3
. By pressing $mod+Shift+d
, it'll bring up the rofi-snippet
.
๐ค tkancf
- Github: @tkancf
Give a โญ๏ธ if this project helped you!
This README was generated with โค๏ธ by readme-md-generator