Copies a random code block from StackOverflow to the clipboard.
Inspired by:
- Create and activate a Python3 virtual environment
- Install dependencies with
pip install -r requirements.txt
Runpython ctrlc.py
- Compile with
python -m nuitka --onefile --linux-onefile-icon icon.png ctrlc.py
- Move binary to your bin folder, e.g.
$HOME/bin
- Run
ctrlc.bin
- To speed things up, bind this to a keyboard shortcut in your window manager (see screenshot below for XFCE)!
- Paste with
ctrl+v
!
- Needs a clipboard manager. e.g. xsel or xclip on GNU/Linux
nuitka
needschrpath
to be installed on your system, e.g.sudo pacman -S chrpath
- Create flow to trigger via keyboard shortcut.
- Package to a distributable binary.
Would not be possible without these gems: