Skip to content

qiu-x/swaycwd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

swaycmd - Get the CWD of the focued view

This script allows you to get the current working directory of the focused window/view. If the window/view is running inside xwayland the script simply falls back to xcwd, so that also needs to be installed.

This is useful if you want your terminal or other programs to open in the CWD of the curently focused window.

Dependencies

  • jq
  • xcwd

The script should work on both FreeBSD and Linux.

Usage

Add swaycwd to your $PATH and run the command like this:

$ swaycwd
/usr/home/qiu

Example sway config:

# Start a terminal in CWD
bindsym $mod+Shift+Return exec 'cd "$(swaycwd)" && st'

About

Get CWD of the focued view (Sway only)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages