到另一个页面窗口的大小_一键窗口排列整理 Rectangle 开源窗口管理工具

8da6fb985d5159a4b951546a98251464.png

自从用上了多显示器,屏幕面积增大后,可同时摆放的窗口也多了,效率得到极大提升。

不过每次使用 Alfred 打开或切换窗口,总要用鼠标拖拽、缩放效率特别低。

搜了搜带快捷键的窗口管理软件,大家都在推荐大名鼎鼎的 Magnet,3.99刀也不太贵。

152333219d5fe70eec274aa72c18a697.png

正要下单,顺手搜了搜 github,居然发现了一款开源的 Magnet 替代品 Rectangle

不仅包含了 Magnet 全部功能,还多出了许多更精细的选项并且可以自定义快捷键。

a04ff6e2d96ac1608571ca0d6d8c2bdb.png
Rectangle 可使用的快捷键列表

细致之极,几乎涵盖了大多数窗口摆放情况。

815f826d217b7413ac5c519926b9c419.gif
上图为使用 Rectangle 快捷键,将多个凌乱的窗口快速排列在屏幕指定位置

场景一:使用快捷键快速排列多个页面

上图是我其中一块屏幕,是竖着放的。一般打开一大堆窗口,有些是当下需要操作的,有些是摆在一边参考的。这些摆放凌乱的页面,我们可以使用 Rectangle 快捷键,快速排列这些窗口到指定位置,窗口大小也能同时调整。

b81709ce59326003e74dcae09521cf61.gif
上图为使用 Alfred 打开软件,然后使用 Rectangle 将窗口一向一旁

场景二:Alfred + Rectangle 打开软件并快速放到合适的位置

有时候我们用 Alfred 打开某个软件,只是为了查看信息,并不是当前工作的主要页面,通常会用鼠标挪到一旁。

比如我们正在看英文网页,使用 Alfred 快速打开词典,并使用 Rectangle 放在一旁待用。

又或者微信来消息了,我们使用 Alfred 打开微信窗口,然后用 Rectangle 放在屏幕一角待看。

22e29b10015f4079d574e0db9be17904.gif
上图为使用快捷键将窗口在两台显示器之间移动

场景三:页面在多个屏幕间快速移动

多显示器使用逻辑一般是一个为主屏,其他为辅屏幕。主屏用于主线工作,辅屏用于摆放信息类窗口方便浏览查看。

当我们查询或使用完一个页面时,想把它放到辅屏上备用时,Rectangle 有快速切换屏幕的快捷键,瞬间移动窗口到辅屏指定位置。极其高效。

061faaf63c570ee673b23402e4733395.gif
类似 Windows 上,窗口移到边缘自动排列的功能

彩蛋:窗口移到屏幕边缘自动排列的磁贴效果,类似 windows

虽然我更喜欢键盘操作,但到周围挺多从 win 切换到 Mac 的朋友问过我 Mac 有没有这个功能,有些朋友急需这种磁贴排列。意外发现 Rectangle 居然可以做到。送给需要的朋友们。

最后

更多快捷键,可以在 Rectangle 的偏好设置里找到。灵活使用后,工作效率得到提升惊人。

大家可以去 Rectangle 官网下载 https://rectangleapp.com

也可以去项目的 github 下载:https://github.com/rxhanson/Rectangle

有机会写写纯键盘工作流,纯键盘工作才是效率利器。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
#include <iostream> #include <string> using namespace std; struct CPoint { int x ; int y ; }; class CRectangle { private: const int id;//常量数据成员 static int total;//静态数据成员 const static string sclass; const static int f=1.0f; CPoint lefttop ; CPoint rightdown ; public: CRectangle( ); CRectangle( CPoint& lt, CPoint& rd ); CPoint GetLefttop() const { return lefttop; } CPoint GetRightdown() const { return rightdown; } void SetLefttop(CPoint & pt) { lefttop=pt; } void SetRightdown(CPoint & pt) { rightdown=pt; } int Getid() const { return id; } static int Gettotal() { return total; } int Area( ) const; int Perimeter( ) const; }; int CRectangle::total=0;//静态数据成员必须在类的外部定义(正好一次)。 const string CRectangle::sclass="CRectangle"; CRectangle::CRectangle( ):id(++total) { lefttop.x=0; lefttop.y=0; rightdown.x=1; rightdown.y=1; } CRectangle::CRectangle( CPoint& lt, CPoint& rd ):id(++total) { lefttop = lt ; rightdown = rd ; } int CRectangle::Area( ) const { int wd= rightdown.x - lefttop.x ; int ht= rightdown.y - lefttop.y ; return wd * ht ; } int CRectangle::Perimeter( ) const { int wd= rightdown.x - lefttop.x ; int ht= rightdown.y - lefttop.y ; return 2 * ( wd + ht ) ; } int main() { CPoint lt, rd; cin >> lt.x >> lt.y; cin >> rd.x >> rd.y; CRectangle crt(lt,rd);//调用有参构造函数 CRectangle crt2;//调用默认构造函数 //创建常量对象 const CRectangle crt3(lt,rd); cout<<"当前创建的矩形个数为:"; cout<<CRectangle::Gettotal()<<endl; //返回矩形的左上和右下点 CPoint lt1=crt.GetLefttop(); CPoint lt2=crt.GetRightdown(); //显示矩形的坐标 cout<<crt.Getid()<<"号矩形的坐标是:"<<"("<<lt1.x<<","<<lt1.y<<"), "; cout<<"("<<lt2.x<<","<<lt2.y<<")"<<endl; //显示矩形的面积和周长 cout << "Area:"<<crt.Area( )<<endl; cout <<"Perimeter:"<<crt.Perimeter( )<<endl; //修改矩形的左上角点 cout<<"请输入矩形新的左上点坐标:"; cin>> lt.x>>lt.y; crt.SetLefttop(lt); lt1=crt.GetLefttop(); //显示修改后矩形的坐标 cout<<"矩形的坐标是:"<<"("<<lt1.x<<","<<lt1.y<<"), "; cout<<"("<<lt2.x<<","<<lt2.y<<")"<<endl; //显示修改后矩形的面积和周长 cout << "Area:"<<crt.Area( )<<endl; cout <<"Perimeter:"<<crt.Perimeter( )<<endl; }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值