Skip to content

Instantly share code, notes, and snippets.

@itisrazza
Last active April 29, 2021 10:50
Show Gist options
  • Save itisrazza/775b6ac4c1a151f0e97a8e6d72a4a34c to your computer and use it in GitHub Desktop.
Save itisrazza/775b6ac4c1a151f0e97a8e6d72a4a34c to your computer and use it in GitHub Desktop.
SuperSize Script Dump

SuperSize Script Dump

These are some scripts I've written before removing them from Git (cbf with git history) before purging the old system out after implementing the new plugin system.

I will add them back in when I'm writing the new built-in and contrib plugins.

primary = get_screens()[0].Bounds
center = point(primary.X + primary.Width / 2, primary.Y + primary.Height / 2)
all_bounds = get_all_screen_bounds()
d_top = abs(center.Y - all_bounds.Top)
d_right = abs(center.X - all_bounds.Right)
d_bottom = abs(center.Y - all_bounds.Bottom)
d_left = abs(center.X - all_bounds.Left)
dw = min(d_left, d_right)
dh = min(d_top, d_bottom)
set_size(rectangle(center.X - dw,
center.Y - dh,
2 * dw,
2 * dh))
using SuperSize.Model;
using SuperSize.OS;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SuperSize.Scripts
{
public class FillOutCompletely : SizingLogic
{
public override Rectangle Calculate(Screen[] screens)
{
return Utilities.GetAllScreenBounds();
}
}
}
#
# Creates a window as big as the screens.
#
# Author: Raresh Nistor
#
#
set_size(get_all_screen_bounds())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment