You are not logged in.
pcurses features package browsing and management in a curses frontend written in C++
Features:
* regexp filtering and searching any package property
* customizable colorcoding
* customizable sorting
* external command execution with package list string replacements
* user defined macros and hotkeys
Package management is done through external command execution: for example, '!sudo pacman -S %p' will install all currently queued packages.
For more information, read the README file at github and take a look at some of the defined macros in /etc/pcurses.conf.
Default hotkey mappings:
1 - filter packages with updates available
2 - filter installed packages
5 - run pacman -Syu
6 - run pacman -S on the current contents of the queue
7 - run pacman -Rs on the current contents of the queue
These macros are entirely customizable and are defined in /etc/pcurses.conf.
The default view optimized for 80x24 terminals:
And a 3 pane view for larger terminals:
Get it here: http://aur.archlinux.org/packages.php?ID=42685
Or, if you are using pacman-git: http://aur.archlinux.org/packages.php?ID=50804
Github: https://github.com/schuay/pcurses
Old thread from Nov 2010: https://bbs.archlinux.org/viewtopic.php?id=108585
For now, documentation is located mostly in the README file.
Keyboard commands are displayed by pressing the 'h' key in pcurses.
Last edited by schuay (2011-07-18 13:54:05)
Offline
Reposting the full tutorial from the README file:
QUICK TUTORIAL
--------------
Navigation and queue management
The package list and queue can be navigated using the up/down arrows, page
up/down, and the home and end keys. The tab key switches focus between the
package and queue lists.
Adding packages to the queue is done by pressing the right arrow key while the
package list is focused. Left arrow removes the selected package from the
queue.
Filtering
Keybindings are displayed by pressing the 'h' (Help) key in pcurses.
Filtering takes the following syntax:
nd:game 1 23
1 is a list of field specifiers. These tell pcurses which fields to search.
Field specifiers are the highlighted characters in the field names in the info
pane. In this example, this means that the Name and Description are searched
for the phrase 'game'.
2 the character ':' separates the field specifier list from the search phrase.
If this character is not present, the entire string is interpreted as the
search phrase.
3 is the actual search phrase. If it contains only alphanumeric characters, a
simple and quick string search is used. Otherwise, it is treated as a regular
expression (which is a bit slower). The search is case INSENSITIVE.
1 and 2 are OPTIONAL.
These searches can be chained. This means that a search for 'n:^a', followed by
'b:2010' will show all packages beginning with the letter 'a' and having a
build date in the year 2010.
Previous filters are cleared by pressing the 'c' key.
Pressing the up and down keys while in input mode will scroll through all
previous history.
Sorting and colorcoding
Colorcoding and sorting use the same syntax as filtering, but only accept a
single field specifier.
Command execution
Command execution can be entered by pressing the '!' key. The token '%p' will
be replaced by the current contents of the package queue. For example, with a
current package selection of pcurses and pacman,
!sudo pacman -S '%p'
will be expanded to
echo 'sudo pacman -S pcurses pacman'
A few useful commands could be
!pacman -Sy
!sudo pacman -S %p
!sudo pacman -Rs %p
Macros
Macros are defined in /etc/pcurses.conf using the syntax 'macroname=command'.
Macros can be chained by separating them with a comma. A few examples:
sortbyname=.n
colorbyrepo=;r
filterupdates=/d:update available
chainedmacro=@sortbyname,colorbyrepo,filterupdates
If defined, the macro named 'startup' will be executed on each application
start. Hotkeys can be defined by creating macros named '1', '2', [...], and are
triggered by pressing the corresponding key in pcurses.
All macros can be executed in pcurses by pressing the '@' key and entering the
macro name.
Last edited by schuay (2011-07-18 13:50:37)
Offline
looks great. I am writing a curses application in c++ too. maybe I can learn some tricks.
I was playe right now with it, but why does the color of those packages lsited on the left side change? Normally they are redish and blueish, but afeter trying '6' and aborting it the colros changed into greenish....that's normal?
anyway. Nice idea. I like every terminal application. avoiding GUIs makes the system more robust.
Offline
do like! was thinking of making something like this in python but now this is here!
Offline
@linux-ka: I fixed a couple of inconsistencies with colorcoding in https://github.com/schuay/pcurses/commi … fff65bd0b3, I believe I caught your case as well.
The next couple of commits change the way package loading is handled. It's now started manually instead of reloading the entire db after each external command execution. This gets rid of the hugely annoying wait times after running an external command, and allows us to preserve set filters, colorcodings, sort order and the package queue easily.
I'm currently hiking in Iceland, but I plan on pushing the next release by the end of July.
Offline
Yes, I don't usually post "+1" on here, but this is a nice job, very well done!
Offline
I just uploaded pcurses 1.1 containing the changes I mentioned in post #5:
* colorcoding consistency improvements
* after startup, the pacman db is only read on-demand by pressing 'r'
Let me know if you run into any issues. Enjoy!
Offline
1.2 is out with two crash fixes:
* scrolling into an empty history
* entering an invalid regexp
Please feel free to post here if there are any features/improvements you'd like to see in pcurses.
Offline
How about adding AUR support? I used to use aptitude in ubuntu. Now I feel nice to found pcurses in arch. I've used yaourt but it sometimes output a lot which make it not so convinient to use. If pcurses has AUR support, it will be great!
Offline
How about adding AUR support? I used to use aptitude in ubuntu. Now I feel nice to found pcurses in arch. I've used yaourt but it sometimes output a lot which make it not so convinient to use. If pcurses has AUR support, it will be great!
pcurses is a frontend to libalpm http://www.archlinux.org/pacman/libalpm.3.html
I think adding AUR support is not trivial.
Have you tried other AUR helpers apart from yaourt?
Offline
How about adding AUR support? I used to use aptitude in ubuntu. Now I feel nice to found pcurses in arch. I've used yaourt but it sometimes output a lot which make it not so convinient to use. If pcurses has AUR support, it will be great!
Sorry to disappoint you, but I currently have no plans of adding AUR support.
The entire AUR database would have to be pulled at each program start, and that's just not feasable in an acceptable timeframe AFAIK.
Personally, I'd recommend using cower to manage AUR packages.
Offline
]The entire AUR database would have to be pulled at each program start, and that's just not feasable in an acceptable timeframe AFAIK.
http://aur3.org/ is updated daily so it should be sufficiently fresh for most purposes, but I agree that an AUR helper is the way to go.
Offline