ratpoison.scm 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2019 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
  4. ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages ratpoison)
  21. #:use-module (guix packages)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system gnu)
  24. #:use-module ((guix licenses) #:select (gpl2+))
  25. #:use-module (gnu packages)
  26. #:use-module (gnu packages xorg)
  27. #:use-module (gnu packages perl)
  28. #:use-module (gnu packages readline)
  29. #:use-module (gnu packages pkg-config)
  30. #:use-module (gnu packages fontutils))
  31. (define-public ratpoison
  32. (package
  33. (name "ratpoison")
  34. (version "1.4.9")
  35. (source
  36. (origin (method url-fetch)
  37. (uri (string-append "mirror://savannah/ratpoison/ratpoison-"
  38. version ".tar.xz"))
  39. (sha256
  40. (base32
  41. "1wfir1gvh5h7izgvx2kd1pr2k7wlncd33zq7qi9s9k2y0aza93yr"))
  42. (patches (search-patches "ratpoison-shell.patch"))))
  43. (build-system gnu-build-system)
  44. (arguments
  45. `(#:modules ((ice-9 format)
  46. ,@%gnu-build-system-modules)
  47. #:phases
  48. (modify-phases %standard-phases
  49. (add-after 'install 'install-xsession
  50. (lambda* (#:key outputs #:allow-other-keys)
  51. ;; Add a .desktop file to xsessions.
  52. (let* ((output (assoc-ref outputs "out"))
  53. (xsessions (string-append output "/share/xsessions")))
  54. (mkdir-p xsessions)
  55. (call-with-output-file (string-append xsessions
  56. "/ratpoison.desktop")
  57. (lambda (port)
  58. (format port
  59. "[Desktop Entry]~@
  60. Name=ratpoison~@
  61. Comment=Tiling window manager: say goodbye to the rodent!~@
  62. Exec=~a/bin/ratpoison~@
  63. TryExec=~@*~a/bin/ratpoison~@
  64. Type=Application~%"
  65. output)))
  66. #t))))))
  67. (inputs
  68. `(("fontconfig" ,fontconfig)
  69. ("freetype" ,freetype)
  70. ("libXft" ,libxft)
  71. ("libXi" ,libxi)
  72. ("libxrandr" ,libxrandr)
  73. ("libXpm" ,libxpm)
  74. ("libXt" ,libxt)
  75. ("libXtst" ,libxtst)
  76. ("libX11" ,libx11)
  77. ("readline" ,readline)
  78. ("xorgproto" ,xorgproto)))
  79. (native-inputs
  80. `(("perl" ,perl)
  81. ("pkg-config" ,pkg-config)))
  82. (home-page "https://www.nongnu.org/ratpoison/")
  83. (synopsis "Simple mouse-free tiling window manager")
  84. (description
  85. "Ratpoison is a simple window manager with no fat library
  86. dependencies, no fancy graphics, no window decorations, and no
  87. rodent dependence. It is largely modelled after GNU Screen which
  88. has done wonders in the virtual terminal market.
  89. The screen can be split into non-overlapping frames. All windows
  90. are kept maximized inside their frames to take full advantage of
  91. your precious screen real estate.
  92. All interaction with the window manager is done through keystrokes.
  93. Ratpoison has a prefix map to minimize the key clobbering that
  94. cripples Emacs and other quality pieces of software.")
  95. (license gpl2+)))