XCWD(1)
π xcwd β the X current working directory girlie π
okay so bestie, you know how your terminal is always opening in $HOME like it has no idea what you were just doing? yeah. this little icon from the General Commands Manual (section 1, commands, the classics) fixes that. her whole personality is where am I actually standing right now.
β¨ NAME β¨
xcwd β X current working directory πΈ
β¨ SYNOPSIS β¨
xcwd
that's it. that's the whole vibe. no flags, no args, she just knows. π«Ά
β¨ DESCRIPTION β¨
xcwd is a simple tool which prints the current working directory of the focused window. π
lowkey it's giving "personal assistant who always knows where you left your keys." It's useful for launching applications directly into the same directory as the focused applicationβfor instance, you might want to launch a new terminal in the same directory as your editor. π₯
the way you make that happen? you bind something like
urxvt -cd "$(xcwd)"
to a keyboard shortcut within your window manager and then invoke that shortcut during editor usage. main character energy, truly. β
β¨ EXIT STATUS β¨
xcwd exits with a nonzero status if it can't figure out the working directory associated with the currently focused window and $HOME is unset. π
Otherwise, xcwd returns zero. slay. β¨
β¨ ENVIRONMENT β¨
If xcwd can't figure out the working directory associated with the currently focused window, it falls back on $HOME. π a cozy little safety net, we love her.
π BUGS π
okay bestie, here's the part where we're honest. π«£
xcwd's algorithm fails when applied to most single-instance applications, applications with tabs, or terminal multiplexers.
lilyterm(1), screen(1), tmux(1), and urxvtc(1) are all known to fail. π
not me crying over tabs π it's not a bug in your setup, it's just how she works. no cap.
π SEE ALSO π
gnome-terminal(1), terminology(1), urxvt(1), xterm(1)
π COPYRIGHT π
xcwd is copyright 2013 Adrien Schildknecht. β¨
This manual page is copyright 2013, 2015β2018 Benjamin Barenblat and licensed under the Apache License, Version 2.0. π
and that's the whole page, bestie π¦ this xcwd(1) page is from 2018-03-06, and yes the date is part of the flex. go launch a terminal in the right folder for once, i believe in you ππ§
π¦ where this page comes from
- debian bookworm: xcwd 0~2.gbpe2c777c-1+b1 Β· BSD-3-Clause
- debian trixie: xcwd 0~2.gbpe2c777c-1+b1 Β· BSD-3-Clause
- ubuntu jammy: xcwd 0~2.gbpe2c777c-1 Β· BSD-3-Clause
- ubuntu noble: xcwd 0~2.gbpe2c777c-1 Β· BSD-3-Clause
- ubuntu questing: xcwd 0~2.gbpe2c777c-1
- ubuntu resolute: xcwd 0~2.gbpe2c777c-3 Β· BSD-3-Clause
- ubuntu stonking: xcwd 0~2.gbpe2c777c-3 Β· BSD-3-Clause
- Β© 2013, 2015-2018 Benjamin Barenblat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms