Skip to content

Commit

Permalink
Merge pull request #57 from kickingvegas/merge-development-to-main-20…
Browse files Browse the repository at this point in the history
…240315_212506

Merge development to main 20240315_212506
  • Loading branch information
kickingvegas authored Mar 16, 2024
2 parents c0d1e75 + 71c9ce1 commit 3f964bb
Show file tree
Hide file tree
Showing 38 changed files with 2,832 additions and 1,135 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Menus are a user interface (UI) affordance that offer users discoverability and
- Full coverage of all Calc commands. Casual is not intended to be a power user tool.
- Strict adherence to default Calc keybindings. Calc’s prompt-first interface resulted in a command keybinding design that embeds context in the key sequence (e.g. ~v~ for vector, ~b~ for binary). Hierarchical menus make this context implicit, allowing for key reuse in different contexts.
- Strict adherence to Calc command naming. While Casual is mostly in alignment with Calc’s command naming, there are cases where it will make an opinionated change if the name is deemed too vague or idiomatic.
- UX Stability (for now). Given that Casual is early in its life-cycle, expect changes to its user experience in terms of menu hierarchy and keybinding choices in future releases.

* Asks
As Casual is new, we are looking for early adopters! Your [[https://github.com/kickingvegas/Casual/issues][feedback]] is welcome as it will likely impact Casual's evolution, particularly with regards to UI.
Expand Down
45 changes: 45 additions & 0 deletions casual-angle-measure.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
;;; casual-angle-measure.el --- Casual Angle Measure Menu -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Charles Choi

;; Author: Charles Choi <[email protected]>
;; Keywords: tools

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code:
(require 'calc)
(require 'transient)
(require 'casual-labels)

(transient-define-prefix casual-angle-measure-menu ()
"Casual angle measure functions menu."
["Angle Measure"
:description (lambda ()
(format "Angle Measure (now %s)›"
(casual-angle-mode-label)))
("d" "Degrees" calc-degrees-mode :transient nil)
("r" "Radians" calc-radians-mode :transient nil)
("h" "Degrees-Minutes-Seconds" calc-hms-mode :transient nil)]
[:class transient-row
("C-g" "‹Back" ignore :transient transient--do-return)
("q" "Dismiss" ignore :transient transient--do-exit)
("U" "Undo Stack" calc-undo :transient t)])

(provide 'casual-angle-measure)
;;; casual-angle-measure.el ends here
65 changes: 65 additions & 0 deletions casual-binary.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
;;; casual-binary.el --- Casual Binary Menu -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Charles Choi

;; Author: Charles Choi <[email protected]>
;; Keywords: tools

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code
(require 'calc)
(require 'transient)
(require 'casual-labels)
(require 'casual-radix)

(transient-define-prefix casual-binary-menu ()
"Casual binary functions menu."
["Binary Functions"
["Operators"
("a" "and" calc-and :transient nil)
("o" "or" calc-or :transient nil)
("x" "xor" calc-xor :transient nil)
("-" "diff" calc-diff :transient nil)
("!" "not" calc-not :transient nil)]
["Shift"
:pad-keys t
("l" "binary left" calc-lshift-binary :transient t)
("r" "binary right" calc-rshift-binary :transient t)
("M-l" "arithmetic left" calc-lshift-arith :transient t)
("M-r" "arithmetic right" calc-rshift-arith :transient t)
("C-r" "rotate binary" calc-rotate-binary :transient t)]
["Utils"
("R" casual-radix-menu
:description (lambda ()
(format "Radix (now %s)›" (casual-number-radix-label)))
:transient nil)
("z" "Leading Zeroes" calc-leading-zeros
:description (lambda ()
(casual--checkbox-label calc-leading-zeros "Leading Zeroes"))
:transient nil)
("w" "Set Word Size…" calc-word-size :transient nil)
("u" "Unpack Bits" calc-unpack-bits :transient nil)
("p" "Pack Bits" calc-pack-bits :transient nil)]]
[:class transient-row
("C-g" "‹Back" ignore :transient transient--do-return)
("q" "Dismiss" ignore :transient transient--do-exit)
("U" "Undo Stack" calc-undo :transient t)])

(provide 'casual-binary)
;;; casual-binary.el ends here
42 changes: 42 additions & 0 deletions casual-complex.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
;;; casual-complex.el --- Casual Complex Menu -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Charles Choi

;; Author: Charles Choi <[email protected]>
;; Keywords: tools

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code:
(require 'calc)
(require 'transient)

(transient-define-prefix casual-complex-number-menu ()
"Casual complex number functions menu."
["Complex Number"
("r" "Real Part" calc-re :transient nil)
("i" "Imaginary Part" calc-im :transient nil)
("c" "Complex Conjugate" calc-conj :transient nil)
("a" "Argument" calc-argument :transient nil)]
[:class transient-row
("C-g" "‹Back" ignore :transient transient--do-return)
("q" "Dismiss" ignore :transient transient--do-exit)
("U" "Undo Stack" calc-undo :transient t)])

(provide 'casual-complex)
;;; casual-complex.el ends here
43 changes: 43 additions & 0 deletions casual-conversion.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
;;; casual-conversion.el --- Casual Conversion Menu -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Charles Choi

;; Author: Charles Choi <[email protected]>
;; Keywords: tools

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code:
(require 'calc)
(require 'transient)

(transient-define-prefix casual-conversions-menu ()
"Casual conversion functions menu."
["Conversions"
("d" "To Degrees" calc-to-degrees :transient nil)
("r" "To Radians" calc-to-radians :transient nil)
("h" "To HMS" calc-to-hms :transient nil)
("f" "To Float" calc-float :transient nil)
("F" "To Fraction" calc-fraction :transient nil)]
[:class transient-row
("C-g" "‹Back" ignore :transient transient--do-return)
("q" "Dismiss" ignore :transient transient--do-exit)
("U" "Undo Stack" calc-undo :transient t)])

(provide 'casual-conversion)
;;; casual-conversion.el ends here
Loading

0 comments on commit 3f964bb

Please sign in to comment.