6

I have aliases in my bashrc for a few programs.

One example is: alias chrome='google-chrome --disk-cache-size=1000000000'

How can I call this alias from the run prompt (modkey+r)?

Im running linux mint

user1028270
  • 1,075
  • 4
  • 22
  • 33

1 Answers1

2

awful.util.spawn doesn't spawn a shell and it won't work with awful.util.spawn_with_shell because the shell has to be interactive to check for aliases. But you could spawn a shell which executes a command in interactive mode, e.g.

#!/bin/bash
source ~/.bash_aliases
eval "$@"

you could also edit your ~/.xinitrc, and before the «exec awesome» add something like

source ~/.bashrc

This will work with startx. If you use a display manager, changes should be added in /etc/X11/Xsession.d

Either inside the awesome or the aliases scripts.


Source: https://bbs.archlinux.org/viewtopic.php?id=118693

karel
  • 13,706
xvan
  • 136