Urxvt terminal title set -- dynamic possibly?[solved]

Does anyone know how I could set urxvt's title set to say my $PS1, I tried declaring it in my .XDefaults but it literally says echo $PS1 in the title when I do that....
Or also I remember when I used xfce4-terminal I think it showed dynamically what was going on in the term title, is this achievable somehow?
I'm bash btw.
Thanks,
bladdo
Last edited by bladdo (2008-05-11 00:42:27)

tami wrote:
I have in my .bashrc:
# Change the window title of X terminals
if [[ $TERM =~ "xterm|*rxvt*" ]]; then
# set -o functrace
trap 'set_title' DEBUG
fi
I 'm sorry - I do not remember from where I grabbed it... Anyway - my urxvt window titles are changing dynamically. Don't forget to source your .bashrc after editing it though...
I hope it will help you,
tami
At first I settled for it just showing my username/host/pwd in the titlebar. Then I really wanted dynamic, I looked and everywhere I saw online it said it was only achievable through zsh. Tami, your code error'd my term for some reason.
Eventually I found out how to do it
# urxvt title
case $TERM in
rxvt-256color)
trap 'echo -ne "\e]0;$USER@$HOSTNAME: $BASH_COMMAND\007"' DEBUG
esac
Will display as :
user@host: command
PWD and TTY can be added in but it looks to stuffed then in my opinion. Just change the rxvt-256color to any term and it should work for you too
-bladdo

Similar Messages

  • Zsh/urxvt terminal title? [SOLVED!]

    I'm using urxvt(c) as my terminal emulator, and my shell is zsh.
    What do I need to add to my .zshrc to set the title to the current command (plus arguments) when a command is run, and back to 'urxvt' when it finishes? The solution in this thread didn't work.
    My current .zshrc:
    # Lines configured by zsh-newuser-install
    HISTFILE=~/.bash_history
    HISTSIZE=8192
    SAVEHIST=8192
    setopt appendhistory notify
    unsetopt beep
    setopt autocd
    bindkey -e
    # End of lines configured by zsh-newuser-install
    # The following lines were added by compinstall
    zstyle :compinstall filename '/home/james/.zshrc'
    autoload -Uz compinit
    compinit
    # End of lines added by compinstall
    autoload -U colors && colors
    PS1="%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[green]%}%m%{$reset_color%} [%{$fg_bold[white]%}%~%{$reset_color%}]%# "
    export EDITOR=nano
    # Key Bindings #
    #urxvt
    bindkey "\e[2~" quoted-insert
    bindkey "\e[7~" beginning-of-line
    bindkey "\e[3~" delete-char
    bindkey "\e[8~" end-of-line
    #Screen, ConnectBot, etc.
    bindkey "\e[1~" beginning-of-line
    bindkey "\e[4~" end-of-line
    bindkey "\e[5~" up-line-or-history
    bindkey "\e[6~" down-line-or-history
    export PATH=$PATH:~/.local/bin
    alias userctl='systemctl --user'
    Last edited by ThePacman (2014-05-06 23:23:30)

    qinohe wrote:
    ThePacman wrote:What do I need to add to my .zshrc to set the title to the current command (plus arguments) when a command is run, and back to 'urxvt' when it finishes? The solution in this thread didn't work.
    This is how I set my title at the moment, the script is not mine.
    Variables found here:#Prompt_variables
    This one shows  'date@tty/nr' so today '14-05-06@pts/4'
    When I run xcalc from cli, the title shows: [qinohe@dryad]  @ (xcalc)
    Thanks! It'll take a bit of fiddling to get it to be right for me, but this provides exactly the starting point I needed!
    If anyone wants it, here's my completion:
    case $TERM in
    termite|*xterm*|rxvt|rxvt-unicode|rxvt-256color|rxvt-unicode-256color|(dt|k|E)term)
    precmd () { print -Pn "\e]0;Terminal\a" }
    preexec () { print -Pn "\e]0;$1\a" }
    screen|screen-256color)
    precmd () {
    print -Pn "\e]83;title \"$1\"\a"
    print -Pn "\e]0;$TERM\a"
    preexec () {
    print -Pn "\e]83;title \"$1\"\a"
    print -Pn "\e]0;$TERM - $1\a"
    esac
    Last edited by ThePacman (2014-05-07 11:54:09)

  • [solved] URxvt in Openbox: Set WM_WINDOW_ROLE

    Hi, I'd like to do what it says in the title: Set custom window-roles for URxvt (like e.g. Terminal can do via command line options).
    Background of the question is this:
    I'm using Openbox and I want to start 2 Terminals on Desktop 4 on startup (via autostart.sh), but still have additional terminals I might start appear on the current desktop. I did this by setting the WM_WINDOW_ROLE property of the startup-terminals to 'desk4' and instruct Openbox to start Terminals with that role on Desktop 4.
    Unfortunately URxvt has no such option.
    So, any ideas on how to define the window role or achieve the above by other means?
    Last edited by lastchancetosee (2009-11-01 00:29:53)

    nope, no reason to use window role instead of name. Coming from xfce-terminal I was sort of looking at roles, not names. I must have missed the -name option, urxvt's manpages are huge.
    Thanks.
    Not to others:
    If you change the 'name' property of URxvt, make sure that all your configuration in .Xdefaults is
    URxvt.<property>
    and not
    urxvt.<property>
    or otherwise your renamed terminals wont use those settings.
    Alternatively you can define entirely different properties for the newly-named terminal with
    <newname>.<property>
    Last edited by lastchancetosee (2009-11-01 09:21:17)

  • Set Terminal title via shell command

    Hi
    From xTerm under linux I know that it is possible to set the window title to the output of a special command with setttitle (e.g. to display the hostname of the machine I am on). Is there any possibility in Terminal.app? I'd be grateful for a workaround too. E.g. using apple-script to set the title.
    Thank you
    Bernhard
      Mac OS X (10.4.9)  

    Try using the following AppleScript:
    tell application "Terminal"
    set name of window 1 to "name"
    end tell
    To call it from the shell:
    osascript -e 'tell application "Terminal" to set name of window 1 to "name"'
    (21097)

  • Possible to set Dynamic Config from ABAP Proxy

    Hi,
    I know how to get and set Dynamic Config from Java/XSLT mappings and adapter modules. But I want to do this from an outbound ABAP Proxy Call (in the same way I can set the serialization context for EOIO), is that possible?
    The scenario is: I have an interface; Proxy -> Xi -> ftp, with no mapping. It seems unnecessary to introduce a mapping just to set some dynamic config values for the receiving adapter which are already known at the outbound proxy call...
    rgds Johan

    Hi Bhavesh,
    In the thread you mention it is shown that you can set Dynamic Config properties during an ABAP mapping. My question was if I can set these properties already in the proxy call? Or did I miss something?
    Of-course I can introduce a dummy mapping in Java/XSLT/ABAP which copies the source message to the result message and sets the dynamic config properties, but I would rather not introduce a mapping if not neccessary...
    rgds Johan

  • Terminal colors vs Vim colors [SOLVED]

    Hey guys!
    I've been using vim since the very first day I started learning programming, and am now using it on my brand new arch system. Everything works really well so far, but I'm having a bit of trouble customizing colors. I wouldn't normally make a big deal out of it, but since I'm going to spend an enormous amount of hours using it for school and personnal projects, I'd really like to get all my colors right. I'm using an urxvt terminal, under awesome wm.
    Here are my 16 terminal colors:
    http://tinypic.com/r/2yper6b/5
    Here is what my vim loks like:
    http://tinypic.com/r/s1547k/5
    As you can see, vim uses a crap-looking, brownish-red color for line numbers and html tags. This color is not in any of the 16 I specified in .Xresources. I don't know where it comes from, but I would like for vim to use only these 16 colors. Is that possible? I assume it is, because most of my vim colors are changed whenever I edit them in .Xresources.
    If not, I'd like to know how I can edit the colors vim uses myself. Thank you for reading!
    Last edited by PolyBender (2013-05-12 00:35:41)

    You select a colorscheme (:help colorscheme) in your vimrc.  The themes can use 256 colors, which I find nice once I customized the theme/scheme.  But if you want to limit it to 16, just `set t_Co=16` in your vimrc.

  • Gnome-terminal title

    Hi guys,
    Sorry is this has been posted before but I searched and could not find anything. My Gnome-terminal title does not update as it should. I work on many remote servers daily and when I exit a server the title still says root@server when infact I'm working on my home directory. Is there a way to fix this?

    hussam wrote:in gnome-terminal. Open Edit > Current Profile > Title and Command.
    Check that 'Dynamically-set title' is set to 'Replace initial title' and not 'Isn't displayed'.
    I had that already, it should be like that by default afaik?

  • How to Change Value set Dynamically for a Parameter in Apps?

    Hi All,
    I have a requirement where i need to change the value set dynamically for a given Parameter. This goes as, I have a Concurrent Program with 4 parameters. First Parameter is mandatory Business group.Second Parameter is Warehouse. Based up on the First parameter the second parameters LoV's are displayed, the third and fourth parameters value sets are dependent up on the Second parameter value. Parameter 2,3,4 Value sets are Table type. So i Used .$FLEX$.Value_setname to retrive the LOV's
    The Requirment now is that if the User doesn't enter the Parameter 2 than the Third Parameter field must be Open and he must be able to enter the Free text. In my case it is an Order Number. If the User enters the paramter 2 value than LOV's for ORder number pertaining to that Warehouse must get displayed. I've figured that this can be possible only if i change the Valuesets Dyanamically. I'm not sure if that is possible or not.
    I have tried :
    Using a Dummy Parameter with a new valueset(Transactable Independent) and giving Y and N based up on Warehouse parameter input.
    SELECT (DECODE ( :$FLEX$.WAREHOUSE_NAMES,NULL,'Y','N')) from dual;
    The default type was SQL.
    Then in the 3rd Parameter i have used Case function to differentiate Y or N. The third parameter being ORder number, is a table type and derived from Oe_order_headers_all.
    In the Query section i tried using dummy parameter value set to retreive the values. I was terribly Unsuccessful in doing so.
    Does the above Case exists or is Doable? Please, Help me out if somone had worked on Similar thing or have any idea of standard report/program using it in Oracle.
    Thanks alot for the Help!

    You will probably have better luck on the eBusinesSuite forum. This is more of a setup issue when defining your LOV and program parameters than it is a SQL or PL/SQL issue.
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Good luck - this is an aggravating issue to work with and I wish I did have the answer for you!

  • How to set dynamic table name in sql query?

    I want set dynamic table name by parameter in sql query,just like:
    select * from :tbname
    but run report is error,BI P report table name is invalidation.
    What can i do? Thanks!

    Hi,
    that's only possible inside a data template with a lexical parameter.
    Regards
    Rainer

  • Problem in setting dynamic expiration duration from Human Task

    Hi,
    I have a BPEL process, in which the Human task expiration has to be set dynamically..
    In the , I have set the expiration duration with this :-
    <copy>
    <from expression="xp20:format-dateTime(xp20:current-dateTime(),'PT1M')"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:systemAttributes/task:expirationDuration"/>
    </copy>
    Do not get confused with 'PT1M' .. I want the duration to be 1 minute... Had I used 'PT1M' as a String and assign to the expirationDuration var, it would have caused an error... It needs to be fromatted as a Date..That's y i took this approach ... I am sure this is working fine as I have checked the payload of the task..
    It has a proper duration..
    <initiateTaskInput><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><initiateTask xmlns="http://xmlns.oracle.com/bpel/workflow/taskService">
    <task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
    <systemAttributes>
    <expirationDuration>PT1M</expirationDuration>
    Now in the Human task definition(.task file), I have set the expiration duration with "By Expression" option in this way..
    <globalConfiguration>
    <owner>oc4jadmin</owner>
    <expirationDuration duration="/task:task/task:systemAttributes/task:expirationDuration"
    type="XPATH"/>
    </globalConfiguration>
    The problem is the task(at runtime) cannot evaluate the expirationDuration from the XPATH..
    I checked with the WF_TASK table in the orabpel schema ...
    When I use a static duration EXPIRATIONDURATION cloumn gets assigned properly (ie PT1M).. But when i take the XPATH approach, it translates to PT0S.
    Can someone look into this please ?
    Struggling with this for quite sometime...
    saptarishi

    If the Human Task shows status complete, then it's possible that there was an error in the output data association in the process. In EM do you see a fault on the output for the Human Task activity, or if PS4FP the process will go to suspended state if the data association fails.

  • Access/set dynamic configuration in client/server abap proxy

    Hi,
    I have 2 question regarding reading/setting dynamic configuration in ABAP proxies:
    1) Is it possible to set dynamic configuration objects in a server abap proxy (SAP --> XI)?
    When looking at the class CL_PROXY_FRAMEWORK is looks as if it is possible. This class has en attribute IF_XMS_MAIN~DY which is a reference to the class CL_XMS_MSGHDR30_DYNAMIC.
    I'm not sure if I'm supposed to try and access the dynamic configuration objects via this class or if I'm supposed to use the GET_PROTOCOL method in some manner as suggested by:
    http://help.sap.com/saphelp_nw04s/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm
    Above link is for client proxies not server, and I've been unable to find any documentation on this for server proxies.
    2) The same question goes for server proxies (XI --> SAP), though now I would like to set some dynamic configuration data.
    This I believe should be done using get_protocol( if_wsprotocol=>ws_header ) as indicated by before mentioned link.
    However in both cases I'm not sure of if it is indeed possible and which road to choose for sure. So a hint or 2 would be really nice.
    Best Regards,
    Daniel
    ps. maybe I should just mention that I am pretty new to the ABAP world, so bear with me.

    The link that you gave does give you an example for both server and client proxies:
    Accessing Protocol Classes for Client Proxies
    In client proxies, you access the protocol class by using the GET_PROTOCOL method. Below is an example for the IF_WSPROTOCOL_PAYLOAD protocol:
    DATA:
    lo_clientProxy      TYPE REF TO co_clientProxy,
    lo_payload_protocol TYPE REF TO if_wsprotocol_payload
    lo_payload          TYPE REF TO if_ws_payload.
    CREATE OBJECT lo_clientProxy.
    Get Protocol Class Using Method GET_PROTOCOL
    lo_payload_protocol ?=
           lo_clientProxy->get_protocol( if_wsprotocol=>payload ).
    CALL METHOD lo_clientProxy->execute_synchronous
                EXPORTING output  = ls_request
                IMPORTING input   = ls_response.
    Use Protocol Methods
    lo_payload = lo_payload->get_sent_request_payload( ).
    Accessing Protocol Classes for Server Proxies (XI Only)
    Within the implementation of a server proxy, you get the protocol class by using the CL_PROXY_ACCESS=>GET_SERVER_CONTEXT( ) method:
    DATA:  lo_server_context   TYPE REF TO if_ws_server_context,
           lo_payload_protocol TYPE REF TO if_wsprotocol_payload.
    lo_server_context   = cl_proxy_access=>get_server_context( ).
    lo_payload_protocol =
         lo_server_context->get_protocol( if_wsprotocol=>payload ).

  • How to set dynamic color , based on xml element

    Hi,
    We have a requirement, where based on certain conditions, a cell will be shown in a specific color. We would like the coloir to be based on an XML element. The xml element will have values like '#FF00FF' etc..
    We tried using xsl attribute with the following syntax ,
    <xsl:attribute xdofo:ctx="block"name="color"><?stdcolor?></xsl:attribute><?end if?>
    where stdcolor is the xml element, but when we use this , this is giving a syntax error.
    Let us know, if this is possible or is there any other alternate way to do this.
    Regards,
    - Vasu -

    Hi Vasu,
    http://winrichman.blogspot.com/2008/09/how-to-set-dynamic-color-based-on-xml.html
    use the following :)
    <xsl:attribute xdofo:ctx="block" name="color" ><xsl:value-of select="stdcolor" /></xsl:attribute>
    TO get the colors you wanted , you can refer to
    http://www.w3schools.com/Html/html_colors.asp

  • Setting dynamically instance id

    Hello
    Is this possible to set dynamically instance id for bpel process instance?
    I would like to implement following scenario: bpel process listen on aq/jms queue. Every message dequeued from this queue creates new bpel process instance. Message payload is XML element containing i.a. unique id which I would like to set as bpel process instance id. Is this possible? Is this possible to set dynamically instance id using Java API to create new BPEL process instances?
    Thanks
    Jarek

    you can't change the instance id but the engine allows you to assign an application id (or many application ids) to an bpel process instance.
    In the NormalizedMessage you could do:
    nm.setProperty(NormalizedMessage.CONVERSATION_ID, your-application-id)

  • Set dynamic data attribute subvi

    Hi,
    I am facing this wierd issue with a subvi, "set dynamic data attribute". When I place it on the block diagram, it disappears as I move this to the right. It is functional, though I can not see the icon of this subvi, if I move this beyond certain area on the block diagram. I am using LabView 2010 SP1.
    Any clues,
    Thanks,
    Deepak
    LAB View 2010 SP1
    Solved!
    Go to Solution.

    Thank you very much. I looked at the last thread as well. Following are the dimensions of my block diagram in pixels,
    vertically -423 to +121
    horizontally -16338 to +13537
    certainly it is too large. I prefer to use flat sequences over stacked, and that resulted in such a large block diagram. Any tips to improve this. I have started breaking the vi. into subvi as one of the solutions.
    Thank you again,
    Deepak
    LAB View 2010 SP1

  • How to set dynamic parameter in list of values in parameter property

    Hi,
    I am using cr4e-all-in-one-win_2.0.1version.I have created .rpt file in that how to set dynamic parameters(from database) in list of values parameter property
    Regards,
    amol

    Hi,
    I am using cr4e-all-in-one-win_2.0.1version.I have created .rpt file in that how to set dynamic parameters(from database) in list of values parameter property
    Regards,
    amol

Maybe you are looking for