[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/golden-ratio 0f42738fb9 05/95: Adding "emacs package stand
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/golden-ratio 0f42738fb9 05/95: Adding "emacs package standards" to golden-ratio.el |
Date: |
Thu, 7 Sep 2023 22:02:09 -0400 (EDT) |
branch: elpa/golden-ratio
commit 0f42738fb967f71790705424c6db36cb52b88207
Author: Roman Gonzalez <romanandreg@gmail.com>
Commit: Roman Gonzalez <romanandreg@gmail.com>
Adding "emacs package standards" to golden-ratio.el
---
golden-ratio.el | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/golden-ratio.el b/golden-ratio.el
index d483496923..639fc9faa9 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -1,9 +1,26 @@
+;;; golden-ratio.el --- Automatic resizing of Emacs windows to the golden ratio
+
+;; Copyright (C) 2012 Roman Gonzalez
+
+;; Author: Roman Gonzalez <romanandreg@gmail.com>
+;; Mantainer: Roman Gonzalez <romanandreg@gmail.com>
+;; Created: 13 Oct 2012
+;; Keywords: Window Resizing
+;; Version: 0.0.2
+
+;; This file is not part of GNU Emacs.
+
+;; This file is free software (MIT License)
+
+;;; Code:
+
(defun -golden-ratio-dimensions ()
(let* ((main-rows (floor (/ (frame-height) 1.618)))
(main-columns (floor (/ (frame-width) 1.618))))
(list main-rows
main-columns)))
+
(defun -golden-ratio-resize-window (dimensions window)
(let* ((edges (window-absolute-pixel-edges window))
(nrow (floor
@@ -18,6 +35,7 @@
(defun golden-ratio ()
+ "Resizes current window to the golden-ratio's size specs"
(interactive)
(if (and (not (window-minibuffer-p))
(not (one-window-p)))
@@ -26,16 +44,24 @@
(-golden-ratio-resize-window (-golden-ratio-dimensions)
(selected-window)))))
+
(defadvice select-window
(after golden-ratio-resize-window)
(golden-ratio))
+
(defun golden-ratio-enable ()
+ "Enables golden-ratio's automatic window resizing"
(interactive)
(ad-activate 'select-window))
+
(defun golden-ratio-disable ()
+ "Disables golden-ratio's automatic window resizing"
(interactive)
(ad-deactivate 'select-window))
+
(provide 'golden-ratio)
+
+;;; filename ends here
- [nongnu] branch elpa/golden-ratio created (now bf0035fd6a), ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 9f9c0e3008 02/95: Removing heavy gif from master branch, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio e0f783dfa7 01/95: First commit of golden-ratio.el, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 972eb4d7d6 03/95: Updating gif url on README, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 38305ca407 07/95: Adds dependency on cl, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 55bc7ccb67 09/95: Wraps cl requirement in an eval-when-compile clause, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 8a1214c453 04/95: Adding extra condition for golden-ratio, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 0f42738fb9 05/95: Adding "emacs package standards" to golden-ratio.el,
ELPA Syncer <=
- [nongnu] elpa/golden-ratio 44565934da 10/95: Merge branch 'arcanis', ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 351fe5f8f1 12/95: Removing error messages on minibuffer and full height/width windows, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio f5b3602b5d 17/95: Merge branch '0.0.4', ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio bb4afe59b2 08/95: Merge pull request #3 from dsevilla/master, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 65db8b88aa 06/95: Added a constant to hold the golden ratio value., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 0517fc134a 11/95: Replacing `window-absolute-pixel-edges` in favor of `window-pixel-edges`, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio cb8ff0bdb0 13/95: Bumping to version 0.0.3, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio ed24985e10 14/95: Fix MELPA footer., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 0508acbd20 15/95: Merge pull request #12 from zane/melpa, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 6af760274b 16/95: Fixing several bugs at once, ELPA Syncer, 2023/09/07