Kaleb Klein

Update to KParser

Created: Jul 03rd, 2016, 12:51:45 AM UTC (8 years ago)

Like for share this blog post:

2 comments
KParser Terminal Widget

I've built a new tag for KParser, the [terminal] tag. This tag creates a terminal widget, which allows you to display a terminal emulator like widget with commands and responses.

The tags are as follows:

the terminal opening tag has 2 required attributes, user and host. User references the username of the user with the terminal open, and host represents the computer's hostname (or computer name). These are required, as they are used to display the username and hostname in both the widget title AND each command.

Here's an example of the widget, with the tags used above.

Terminal: kaleb@kalebklein.com ~
[kaleb@kalebklein.com ~]: #
which php
/usr/bin/php
[kaleb@kalebklein.com ~]: #
ls -l
total 16
drwxr-xr-x 6 kaleb users 4096 Jul  2 22:27 Desktop
drwx------ 2 kaleb users 4096 Jul  2 22:02 Downloads
drwxr-xr-x 3 kaleb users 4096 Jun 23 17:43 kse
drwxr-xr-x 2 kaleb users 4096 Jun 23 02:41 Pictures
[kaleb@kalebklein.com ~]: #
sudo pacman -Sy
[sudo] password for kaleb: 
:: Synchronizing package databases...
 core is up to date
 extra      1743.2 KiB  1772K/s 00:01 [######################] 100%
 community  3.5 MiB     2.10M/s 00:02 [######################] 100%
 multilib is up to date
[kaleb@kalebklein.com ~]: #
git clone git@github.com:pazuzu156/KParser.git
Cloning into 'KParser'...
Warning: Permanently added the RSA host key for IP address
'192.30.253.113'to the list of known hosts.
Enter passphrase for key '/home/kaleb/.ssh/id_rsa': 
remote: Counting objects: 765, done.
remote: Total 765 (delta 0), reused 0 (delta 0), pack-reused 765
Receiving objects: 100% (765/765), 1.27 MiB | 0 bytes/s, done.
Resolving deltas: 100% (277/277), done.
Checking connectivity... done.

The terminal does allow for scrolling to see more, however, if you use a webkit browser (Google Chrome, Safari, or Opera) you can see it also has a nice custom scrollbar to match the rest of the terminal's style. I may implement more styles into the terminal tag to give an option for multiple styles, but alas, it's only got this one. This style is taken from how my current terminal looks on my Linux box, so I used a template I felt looked nice to me smile

If you wish to fork the KParser project, and work on it yourself, please feel free to do so. You can fork the project on the KParser GitHub Page [github.com].


Leave a comment down below
(Required)
(Required) - For avatar image in comments area


BBCode tags you can use: [url] [code] [img] [p] [b] [i] [u] [s] [o] [size] [color] [center] [quote] /// What is BBCode?
Emoticons you can use
2
Comments (2 awaiting approval)


Google+

Archive

Ads