Maximizing a window (Keepassx2) from command line
3
votes
1
answer
456
views
I'm using
i3wm
and Keepassx2 on an Arch-Linux installation. I configured i3
to automatically move a window with the window class "Keepassx2"
to a certain workspace $WSKP
. I also configured $mod+P
to execute Keepassx2
. Now I would like to write a custom script that is executed by $mod+P
instead. This script should:
- launch Keepassx2
when no other instance of it is currently running
- maximize Keepassx2
and move focus to the specific workspace $WSKP
when there already is a running instance
I want this because I don't need the Keepass-Workspace to be open all the time and it takes another unnecessary keypress when tabbing through the workspaces.
Checking whether there already is a running instance is easy:
if [ $(pidof keepassx2) ]; then
# maximize the running instance and move focus with i3-msg
fi;
But how do I accomplish maximizing the running instance?
Asked by herhuf
(255 rep)
Sep 6, 2017, 12:47 PM
Last activity: Oct 10, 2017, 05:32 PM
Last activity: Oct 10, 2017, 05:32 PM