Today I’ll be briefly touching upon ways to send text to clipboard from Bash, and to Open Popup windows.
Bash and the Clipboard
To copy to clipboard, you may use xclip (Or xsel).
The format is:
To send to primary clipboard (Middle click pastes this content)
echo "Something" | xclip[/code]To send to secondary clipboard (Rightclick and Choose Paste to paste)
echo "Something else" | xclip -selection clipboard[/code]Bash and Popups
Install zenity
sudo apt-get install zenity[/code]Informational popups:
zenity --info --text 'Hello World!'[/code]
Dialog options
--calendar
Display calendar dialog--entry
Display text entry dialog--error
Display error dialog--file-selection
Display file selection dialog--info Display info dialog
--list Display list dialog
--notification
Display notification--progress
Display progress indication dialog--question
Display question dialog--text-info
Display text information dialog--warning
Display warning dialog--scale
Display scale dialog--color-selection
Display color selection dialogGeneral options
--title=TITLE
Set the dialog title--window-icon=ICONPATH
Set the window icon with the path to an image. Alternatively, one of the four stock icons can be used: 'error', 'info', 'question' or 'warning'Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.