You are not logged in.
Here's a pacman front-end I use.
The syntax is:
i want vim
#or
i want vim!
#or
i need vim.
#or
i need vim, emacs and gedit!
etc.
Whatever suits you best.
It's still beta, so some advanced features might not work. Here's the source code:
#!/usr/bin/env ruby
(puts('what?');exit(1)) unless (ARGV[0] && ARGV[1] && %w[want need].include?(ARGV[0].downcase))
system "sudo pacman -S #{ARGV[1..-1].join(' ').gsub(/[,!\.]|\band\b/, ' ')}"
EDIT: Of course, save it as i somewhere in your $PATH
Last edited by JezdziecBezNicka (2010-04-25 09:13:01)
This is my signature. If you want to read it, first you need to agree to the EULA.
Offline
What if the system is root only?
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
Fantastic, I say.
Offline
I don't get your script except that it does the same as pacman... And it needs to load ruby.
This I have in my ~/.bashrc , which actually saves me re- and typing of stuff...
# pacman wrapper with wait and auto-sudo
pacman() {
if [[ -f /var/lib/pacman/db.lck ]]; then
if pgrep pacman >/dev/null; then
echo "error: pacman seems to be running. waiting..." >&2
while [[ -f /var/lib/pacman/db.lck ]]; do
sleep 1
done
fi
fi
if [[ $1 =~ ^-(S[yuc]+|Rd)$ || $1 == -[SRU] ]]; then
sudo pacman "$@"
else
$(which pacman) "$@"
fi
}
<rickh> f(Arch) = ((Gentoo - Compiletime) + (Slackware + Depency resolution and Downloading))
Offline
I don't get your script except that it does the same as pacman... And it needs to load ruby
I was at a party and it was intended as a joke (felt funny back then:)
This is my signature. If you want to read it, first you need to agree to the EULA.
Offline
feature request:
'i can haz vim?' should reference 'pacman -Ss vim'
btw, i've never been to a party where i ended up writing a pacman wrapper
Offline
Let me just say that this is, by far, the best pacman wrapper evar!
I suggest, on top of the 'i can haz', a 'i don't want' or some such:
i want more!
i don't need less.
i can haz most?
Last edited by Hiato (2010-04-26 21:03:52)
Offline
don't want inspired me.
#!/usr/bin/env ruby
exit(1) if (ARGV.empty?)
pacman = lambda do |pac_arg|
system "sudo pacman #{pac_arg} #{$'.gsub(/[,!\.]|\band\b/, ' ')}"
end
case ARGV.join(' ')
when /^(want|need|like)/, /^would love to have/
pacman.call('-S')
when /^dont (want|need)/
pacman.call('-R')
when /^(really|definitively) dont (want|need)/, /^insist that you remove/, /^hate/, /^despise/
pacman.call('-Rc')
when /^am looking for/
pacman.call('-Ss')
else
exit(1)
end
Now you can say: i insist that you remove kde! or i despise gnome
I wonder if I'll get tgn'd for this...
Last edited by JezdziecBezNicka (2010-04-26 21:50:13)
This is my signature. If you want to read it, first you need to agree to the EULA.
Offline
Does it work in root only?
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
I guess, if you have sudo installed...
This is my signature. If you want to read it, first you need to agree to the EULA.
Offline
no sudo just root
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
Then I guess not. Though you could just remove 'sudo' from line 4 of the script
This is my signature. If you want to read it, first you need to agree to the EULA.
Offline
I'll try that....................
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline