从命令行检测您所在的工作空间 [英] Detecting which workspace you're in from the command line
问题描述
我正在尝试为自己编写一个小函数来帮助我跟踪自己在做什么,这个想法是,在每个工作区中,我都在执行不同的任务,并且每个任务都有一个不同的"todo.txt"文件工作区.在调用该命令时,我当然可以指定我所处的工作空间,但我真的很想自动检测出哪个工作空间并更改相应的文件.
I'm trying to write myself a little function to help me keep track of what I'm doing, the idea being that in each workspace I have a different task underway, and a different "todo.txt" file for each workspace. I can certainly specify, when I call the command, which workspace I'm in, but I'd really like to automatically detect which and alter the appropriate file.
有什么方法可以从命令行确定我所在的工作区,以便可以在bash函数中使用它吗?
Is there any way to determine which workspace I'm in from the command line, so I can use it in a bash function?
推荐答案
xprop -root -notype _NET_CURRENT_DESKTOP
xprop -root -notype _NET_CURRENT_DESKTOP
这篇关于从命令行检测您所在的工作空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!