You are not logged in.

#1 2011-05-10 11:14:16

natostanco
Member
Registered: 2008-01-07
Posts: 126

awesome wm mod+r and aliases

Hello, I have a .bashrc where I have set some aliases, but these don't work when I run mod+r command from awesome wm, how can I fix this?

Offline

#2 2011-05-10 15:39:51

koomi
Member
Registered: 2010-09-26
Posts: 17

Re: awesome wm mod+r and aliases

This doesn't work because 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 either spawn a shell which executes a command in interactive mode, e.g. with bash 'bash -i -c "alias"', or you use functions instead of aliases and use awful.util.spawn_with_shell (didn't try this, not sure it works).

Offline

#3 2011-05-17 09:33:22

natostanco
Member
Registered: 2008-01-07
Posts: 126

Re: awesome wm mod+r and aliases

what i have done so far is adding a script for every alias in /bin/ directory sad

Offline

#4 2011-05-17 11:43:35

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: awesome wm mod+r and aliases

Have awesome call somthing like this:

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

Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#5 2011-05-19 08:42:52

natostanco
Member
Registered: 2008-01-07
Posts: 126

Re: awesome wm mod+r and aliases

can you explain better? thanks

Offline

#6 2013-03-05 13:26:02

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: awesome wm mod+r and aliases

I'm necroposting because this is the top result on Google and it is not solved.

Here is a solution to have working aliases in awesome run prompt :

edit your ~/.xinitrc, and just before the «exec awesome»
add something like :
source ~/.zshrc if you use zsh
or
source ~/.bashrc

You will then have your $PATH and your aliases working in the Run prompt smile


ktr

Offline

#7 2014-01-18 18:15:03

geekmiki
Member
Registered: 2011-10-10
Posts: 72

Re: awesome wm mod+r and aliases

Hi,

I tried your solution by placing source ~/.bashrc in .xinitrc but I'm still unable to use my aliases with mod+r.

Anything else I could try to get aliases working?

Offline

#8 2014-01-18 18:36:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,209

Re: awesome wm mod+r and aliases

geekmiki,
Hey, I am going to go ahead and close this thread.  It is just too old.

Please feel free to start a new thread, state your problem and, if you feel this thread is relevant, go head and link back to this thread.

Thanks.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB