Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は、自分が何をしているかを追跡するのに役立つ小さな関数を自分で作成しようとしています。これは、各ワークスペースで異なるタスクが進行中であり、ワークスペースごとに異なる「todo.txt」ファイルがあるという考えです。コマンドを呼び出すときに、どのワークスペースにいるのかを確かに指定できますが、どのワークスペースを自動的に検出して適切なファイルを変更したいのですか。
コマンドラインから現在のワークスペースを特定する方法はありますか? bash 関数で使用できますか?
metacity と python を使用している場合は、次のようなことができます。
python -c "import wnck; s=wnck.screen_get_default(); s.force_update(); w=s.get_active_workspace(); w_num=w.get_number(); print(w_num);" 2>/dev/null