HarveyHunt / howm

A lightweight, X11 tiling window manager that behaves like vim
GNU General Public License v2.0
649 stars 24 forks source link

Introduce the dot operator in howm #7

Closed anubhavcodes closed 9 years ago

anubhavcodes commented 9 years ago

An operator to repeat the last change made by howm?

HarveyHunt commented 9 years ago

How strange, I was just working on this! I'll push the commit this evening.

anubhavcodes commented 9 years ago

That's good. Waiting to pull it in my fork.

HarveyHunt commented 9 years ago

What are your opinions on keeping all of the last_* variables in a struct?

I also need to find a nice way to check that the last_cmd isn't replay as that causes a segfault. I can't look right now as I am tethered to mobile internet- my ISP "should" be arriving this afternoon...

anubhavcodes commented 9 years ago

Keeping all the last_* variables in a struct seems to be a good option to me. I see that was preety slick to call the last_cmd or last_op functions do the job for you in the replay function.

Creating a struct seems to be the first things that comes to my mind, but every time after a I hit a operator or run a command, howm will need to update the struct each time, will may increase the overhead a little.

How do you plan to implement the update of the struct?

Also I forget to ask, do you think the dot operator should be used with OTHER_MOD instead of MODKEY. It seems logical to me to implement the dot operator using OTHER_MOD as all the counts and operators are called using this key?

HarveyHunt commented 9 years ago

I am going to put the things in a struct to keep the code looking neater and to logically tie the variables together, I'll close this issue when I push the changes.