Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE: Fenstertitel autom. an das aktuelle Directory anpassen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Wed Jan 18, 2006 4:25 pm    Post subject: KDE: Fenstertitel autom. an das aktuelle Directory anpassen Reply with quote

Wie ?
Danke
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Wed Jan 18, 2006 5:19 pm    Post subject: Reply with quote

Meinst du konsole? Da kann man den Fenstertitel durch den Aufruf von
Code:
dcop $(dcopfind -a 'konsole-*') konsole-mainwindow#1 setCaption 'neuer Titel'
setzen.
_________________
KDE
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Thu Jan 19, 2006 9:19 am    Post subject: Reply with quote

Ah, danke.
Jetzt brauche ich nur noch einen Mechanismus, um dies bei jedem change dir auch automatisiert ausführen zu können.
Back to top
View user's profile Send private message
Qubit
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 136
Location: /dev/urandom

PostPosted: Thu Jan 19, 2006 9:46 am    Post subject: Reply with quote

HI,

eigentlich sollte das in Deiner .bashrc ausreichen!

Code:

# Change the window title of X terminals
case $TERM in
        xterm*|rxvt|Eterm|eterm)
                PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
                ;;
        screen)
                PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
                ;;
esac


Gruß Qubit
_________________
©Qubit
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Thu Jan 19, 2006 10:00 am    Post subject: Reply with quote

Danke :-)
Ehm, ohne jetzt nerven zu wollen: Wie kann ich auch den unteren Reiter der KDE-Konsole ebenfalls autom. anpassen ?
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Thu Jan 19, 2006 11:04 am    Post subject: Reply with quote

Ginge zum Beispiel durch folgenden Hack (in ~/.bashrc einfügen):
Code:
function cdrename {
  cd $*
  konsole="$(xprop -id $(xdpyinfo | grep focus | cut -c 16-24) -notype _NET_WM_PID | cut -d "=" -f 2 | sed 's/ /konsole-/')" 2>/dev/null
  dcop $konsole $(dcop $konsole konsole currentSession) renameSession "$(pwd)" 2>/dev/null
}

alias cd=cdrename

Falls die Verzeichnisse zu lang werden, kannst du $(pwd) mit sed o.ä. verkleinern.
_________________
KDE
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Thu Jan 19, 2006 11:31 am    Post subject: Reply with quote

yup, danke Euch beiden - zum Kürzen reicht mir sogar ein "$(basename $(pwd))"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum