openbox.scm
1 | (define-module (home-config openbox) |
2 | #:use-module (home) |
3 | #:use-module (home openbox) |
4 | #:use-module (gnu packages compton) |
5 | #:use-module (gnu packages dunst) |
6 | #:use-module (gnu packages game-development) |
7 | #:use-module (gnu packages games) |
8 | #:use-module (gnu packages geo) |
9 | #:use-module (gnu packages gnuzilla) |
10 | #:use-module (gnu packages ibus) |
11 | #:use-module (gnu packages image-viewers) |
12 | #:use-module (gnu packages inkscape) |
13 | #:use-module (gnu packages lxde) |
14 | #:use-module (gnu packages mail) |
15 | #:use-module (gnu packages messaging) |
16 | #:use-module (gnu packages password-utils) |
17 | #:use-module (gnu packages pulseaudio) |
18 | #:use-module (gnu packages sync) |
19 | #:use-module (gnu packages xfce) |
20 | #:use-module (games packages 7-billion-humans) |
21 | #:use-module (games packages baba-is-you) |
22 | #:use-module (games packages factorio) |
23 | #:use-module (games packages mini-metro) |
24 | #:use-module (games packages starsector) |
25 | #:use-module (games packages sunless-skies) |
26 | #:use-module (guix gexp) |
27 | #:export (tyreunom-openbox-configuration |
28 | openbox-home)) |
29 | |
30 | (define openbox-environment |
31 | (plain-file "environment" "eval $(ssh-agent) |
32 | export GTK_IM_MODULE=ibus |
33 | export XMODIFIERS=@im=ibus |
34 | export QT_IM_MODULE=ibus |
35 | export GUIX_GTK2_IM_MODULE_FILE=/home/tyreunom/.guix-profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache |
36 | export GUIX_GTK3_IM_MODULE_FILE=/home/tyreunom/.guix-profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache")) |
37 | (define openbox-autostart |
38 | (computed-file "autostart" |
39 | #~(with-output-to-file #$output |
40 | (lambda _ |
41 | (format #t "HOME=/tmp/pa ~a --start~%" #$(file-append pulseaudio "/bin/pulseaudio")) |
42 | (format #t "~a --bg-fill ~a~%" #$(file-append feh "/bin/feh") |
43 | #$(local-file "/data/tyreunom/background.png")) |
44 | (format #t "~a -CGb~%" #$(file-append compton "/bin/compton")) |
45 | (format #t "~a -conf ~a &~%" #$(file-append dunst "/bin/dunst") |
46 | #$(plain-file "dunstrc" "")) |
47 | (format #t "export GTK_IM_MODULE=ibus |
48 | export XMODIFIERS=@im=ibus |
49 | export QT_IM_MODULE=ibus |
50 | export GUIX_GTK2_IM_MODULE_FILE=~~/.guix-profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache |
51 | export GUIX_GTK3_IM_MODULE_FILE=~~/.guix-profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache |
52 | IBUS_COMPONENT_PATH=~~/.guix-profile/share/ibus/component ~a -drx~%" #$(file-append ibus "/bin/ibus-daemon")))))) |
53 | (define openbox-rc (local-file "files/openbox/rc.xml")) |
54 | |
55 | (define tyreunom-openbox-configuration |
56 | (openbox-configuration |
57 | (autostart openbox-autostart) |
58 | (environ openbox-environment) |
59 | (rc openbox-rc) |
60 | (menus |
61 | (list |
62 | (openbox-menu |
63 | (id "apps-game-menu") |
64 | (label "Jeux") |
65 | (elements |
66 | (list |
67 | (openbox-element-execute |
68 | (label "MineTest") |
69 | (command (file-append minetest "/bin/minetest"))) |
70 | (openbox-element-execute |
71 | (label "Starsector") |
72 | (command (file-append starsector "/bin/starsector"))) |
73 | (openbox-element-execute |
74 | (label "Factorio") |
75 | (command (file-append factorio "/bin/factorio"))) |
76 | (openbox-element-execute |
77 | (label "7 Billion Humans") |
78 | (command (file-append gog-7-billion-humans "/bin/7-billion-humans"))) |
79 | (openbox-element-execute |
80 | (label "Sunless Skies") |
81 | (command (file-append gog-sunless-skies "/bin/sunless-skies"))) |
82 | (openbox-element-execute |
83 | (label "Baba is You") |
84 | (command (file-append baba-is-you "/bin/baba-is-you"))) |
85 | (openbox-element-execute |
86 | (label "Mini Metro") |
87 | (command (file-append mini-metro "/bin/mini-metro"))) |
88 | (openbox-element-execute |
89 | (label "0ad") |
90 | (command (file-append 0ad "/bin/0ad"))) |
91 | (openbox-element-execute |
92 | (label "godot") |
93 | (command (file-append godot "/bin/godot")))))) |
94 | (openbox-menu |
95 | (id "apps-other-menu") |
96 | (label "Autres") |
97 | (elements |
98 | (list |
99 | (openbox-element-execute |
100 | (label "Pavucontrol") |
101 | (command (file-append pavucontrol "/bin/pavucontrol"))) |
102 | (openbox-element-execute |
103 | (label "Owncloud") |
104 | (command (file-append owncloud-client "/bin/owncloud"))) |
105 | (openbox-element-execute |
106 | (label "Keepass") |
107 | (command (file-append keepassxc "/bin/keepassxc"))) |
108 | (openbox-element-execute |
109 | (label "Claws-mail") |
110 | (command (file-append claws-mail "/bin/claws-mail --alternate-config-dir /data/tyreunom/.config/claws-mail"))) |
111 | (openbox-element-execute |
112 | (label "Hexchat") |
113 | (command (file-append hexchat "/bin/hexchat"))) |
114 | (openbox-element-execute |
115 | (label "JOSM") |
116 | (command (file-append josm "/bin/josm"))) |
117 | (openbox-element-execute |
118 | (label "Inkscape") |
119 | (command (file-append inkscape "/bin/inkscape")))))))) |
120 | (root-elements |
121 | (list |
122 | (openbox-element-menu (id "apps-game-menu")) |
123 | (openbox-element-menu (id "apps-other-menu")) |
124 | (openbox-element-execute |
125 | (label "Terminal") |
126 | (command (file-append xfce4-terminal "/bin/xfce4-terminal"))) |
127 | (openbox-element-execute |
128 | (label "Navigateur") |
129 | (command (file-append icecat "/bin/icecat -P --no-remote"))) |
130 | (openbox-element-execute |
131 | (label "Gestionnaire de fichiers") |
132 | (command (file-append pcmanfm "/bin/pcmanfm"))))))) |
133 | |
134 | |
135 | (define openbox-home |
136 | (user-home openbox-home-type |
137 | tyreunom-openbox-configuration)) |
138 |