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,025
  • 4
  • 19
  • 29

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,390
  • 26
  • 45
  • 52
xvan
  • 136
  • 5
  • Excuse me for asking but what kind of changes in /etc/X11/Xsession.d? I'm not clear on what exactly I would be doing with this. – user1028270 Feb 26 '14 at 12:55
  • 1
    In Xsession.d there is an "aliases" script and an awesome script... Both should be called when you start awesome with a desktop manager. You add your global aliases there, or make a call to your user aliases script. – xvan Mar 04 '14 at 19:22