1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
5 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
6 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
7 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
9 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages tmux)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system trivial)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages bash)
35 #:use-module (gnu packages libevent)
36 #:use-module (gnu packages ncurses))
46 "https://github.com/tmux/tmux/releases/download/"
47 version "/tmux-" version ".tar.gz"))
50 "1fbd93hzaz64h7j0h9nsll29avbq1ikqa438wrgsf1dga0fkagyr"))))
51 (build-system gnu-build-system)
53 `(("libevent" ,libevent)
54 ("ncurses" ,ncurses)))
55 (home-page "https://tmux.github.io/")
56 (synopsis "Terminal multiplexer")
58 "tmux is a terminal multiplexer: it enables a number of terminals (or
59 windows), each running a separate program, to be created, accessed, and
60 controlled from a single screen. tmux may be detached from a screen and
61 continue running in the background, then later reattached.")
62 (license license:isc)))
64 (define-public tmux-themepack
65 (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48")
68 (name "tmux-themepack")
69 (version (git-version "0.0.0" revision commit)) ; no version tags
73 (url "https://github.com/jimeh/tmux-themepack.git")
77 "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))
78 (file-name (git-file-name name version))))
79 (build-system gnu-build-system)
81 `(#:tests? #f ; no test suite
82 #:phases (modify-phases %standard-phases
86 (lambda* (#:key outputs #:allow-other-keys)
87 (let* ((out (string-append
88 (assoc-ref outputs "out")
89 "/share/" ,name "-" ,version)))
90 (copy-recursively "." out)))))))
91 (home-page "https://github.com/jimeh/tmux-themepack")
92 (synopsis "Collection of themes for Tmux")
93 (description "A collection of various themes for Tmux.")
94 (license license:wtfpl2))))
96 (define-public tmuxifier
103 (url "https://github.com/jimeh/tmuxifier.git")
104 (commit (string-append "v" version))))
105 (file-name (git-file-name name version))
108 "1b6a1cw2mnml84k5vhbcp58kvp94xlnlpp4kwdhqw4jrzfgcjfzd"))))
109 (build-system gnu-build-system)
112 #:phases (modify-phases %standard-phases
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let* ((out (assoc-ref %outputs "out"))
118 (bindir (string-append out "/bin"))
119 (share (string-append out "/share/" ,name)))
120 (install-file "bin/tmuxifier" bindir)
121 (substitute* (string-append bindir "/tmuxifier")
123 (string-append "TMUXIFIER=" share "\nset -e")))
124 (for-each (lambda (init-script)
125 (install-file init-script (string-append
127 '("init.sh" "init.tcsh" "init.fish"))
128 (for-each (lambda (dir)
129 (copy-recursively dir (string-append
131 '("completion" "lib" "libexec"
133 (home-page "https://github.com/jimeh/tmuxifier")
134 (synopsis "Powerful session, window & pane management for Tmux")
135 (description "Tmuxifier allows you to easily create, edit, and load
136 @code{layout} files, which are simple shell scripts where you use the tmux
137 command and helper commands provided by tmuxifier to manage Tmux sessions and
139 (license license:expat)))
141 (define-public tmux-xpanes
148 (url "https://github.com/greymd/tmux-xpanes.git")
149 (commit (string-append "v" version))))
150 (file-name (git-file-name name version))
153 "13q02vdk229chgbn547wwv29cj4njvz02lmw840g8qmwh73qb2pi"))))
154 (build-system trivial-build-system)
158 `(#:modules ((guix build utils))
161 (use-modules (guix build utils))
162 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
163 (copy-recursively (assoc-ref %build-inputs "source") ".")
164 (substitute* "bin/xpanes"
165 (("/bin/bash") (which "bash")))
166 (install-file "bin/xpanes" (string-append %output "/bin"))
167 (install-file "man/xpanes.1" (string-append %output "/man/man1"))
169 (home-page "https://github.com/greymd/tmux-xpanes")
170 (synopsis "Tmux based terminal divider")
171 (description "This package provides tmux-based terminal divider.
173 @code{xpanes} or @code{tmux-xpanes} (alias of @code{xpanes}) commands have
177 @item Split tmux window into multiple panes.
178 @item Build command lines & execute them on the panes.
179 @item Runnable from outside of tmux session.
180 @item Runnable from inside of tmux session.
181 @item Record operation log.
182 @item Flexible layout arrangement for panes.
183 @item Display pane title on each pane.
184 @item Generate command lines from standard input (Pipe mode).
186 (license license:expat)))