diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-02 17:03:49 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-02 17:03:49 +0100 |
commit | 397c4fed757d201af627636822981e85e84ea572 (patch) | |
tree | d6733d4022bf04784be84581f6c16e96a1b229e8 /roles | |
download | Ansible-397c4fed757d201af627636822981e85e84ea572.tar.gz Ansible-397c4fed757d201af627636822981e85e84ea572.tar.zst Ansible-397c4fed757d201af627636822981e85e84ea572.zip |
Validation initiale
Diffstat (limited to 'roles')
57 files changed, 2807 insertions, 0 deletions
diff --git a/roles/contexts/fretlink/files/config_files/autostart/zeal.desktop b/roles/contexts/fretlink/files/config_files/autostart/zeal.desktop new file mode 100644 index 0000000..27f53b7 --- /dev/null +++ b/roles/contexts/fretlink/files/config_files/autostart/zeal.desktop | |||
@@ -0,0 +1,10 @@ | |||
1 | [Desktop Entry] | ||
2 | Version=1.0 | ||
3 | Name=Zeal | ||
4 | GenericName=Documentation Browser | ||
5 | Comment=Simple API documentation browser | ||
6 | Exec=/usr/bin/zeal | ||
7 | Icon=zeal | ||
8 | Terminal=false | ||
9 | Type=Application | ||
10 | Categories=Development; | ||
diff --git a/roles/contexts/fretlink/files/workdir/start b/roles/contexts/fretlink/files/workdir/start new file mode 100755 index 0000000..911c28d --- /dev/null +++ b/roles/contexts/fretlink/files/workdir/start | |||
@@ -0,0 +1,53 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | APP="$1" | ||
4 | |||
5 | if [ -z "$APP" ]; then | ||
6 | if [ $(dirname $(pwd)) = "$HOME/workdir" ]; then | ||
7 | APP=$(basename $(pwd)) | ||
8 | else | ||
9 | echo "need an app to start" | ||
10 | exit 1 | ||
11 | fi | ||
12 | fi | ||
13 | |||
14 | if [ "$APP" != "psql" ]; then | ||
15 | cd $HOME/workdir/$APP | ||
16 | source ../environment | ||
17 | else | ||
18 | source ../environment | ||
19 | APP=psql | ||
20 | fi | ||
21 | |||
22 | function start_stack() { | ||
23 | stack exec $1; | ||
24 | } | ||
25 | |||
26 | function start_app() { | ||
27 | trap 'make stop' EXIT | ||
28 | |||
29 | if ! docker top mongo_container 2>/dev/null; then | ||
30 | docker run -d --name mongo_container -p 27017:27017 --rm -v $(pwd)/appdata:/data/db mongo:3.6 | ||
31 | echo "Waiting until mongo is started" | ||
32 | sleep 10 | ||
33 | fi | ||
34 | |||
35 | make start | ||
36 | make --directory=frontend/ start | ||
37 | } | ||
38 | |||
39 | function start_psql() { | ||
40 | export PGPASSWORD=$POSTGRESQL_ADDON_PASSWORD | ||
41 | psql -h $POSTGRESQL_ADDON_HOST -p $POSTGRESQL_ADDON_PORT -U $POSTGRESQL_ADDON_USER -d $POSTGRESQL_ADDON_DB | ||
42 | } | ||
43 | |||
44 | case "$APP" in | ||
45 | "psql") start_psql;; | ||
46 | "app") start_app;; | ||
47 | "admin-root") start_stack server;; | ||
48 | "carrier-directory") start_stack server;; | ||
49 | "freight") start_stack freight-server;; | ||
50 | "notifier") start_stack notifier-exe;; | ||
51 | "pricer") start_stack pricer;; | ||
52 | "toolbox") start_stack toolbox-api;; | ||
53 | esac | ||
diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml new file mode 100644 index 0000000..e16d669 --- /dev/null +++ b/roles/contexts/fretlink/tasks/main.yml | |||
@@ -0,0 +1,36 @@ | |||
1 | --- | ||
2 | - name: Import roles | ||
3 | include_role: | ||
4 | name: "{{ item }}" | ||
5 | loop: | ||
6 | - programming/python | ||
7 | - programming/haskell | ||
8 | - programming/nodejs | ||
9 | - name: Config files | ||
10 | synchronize: | ||
11 | recursive: yes | ||
12 | archive: no | ||
13 | checksum: yes | ||
14 | src: config_files/ | ||
15 | dest: /$XDG_CONFIG_HOME/ | ||
16 | - name: Create pm2 config dir | ||
17 | file: | ||
18 | path: $XDG_CONFIG_HOME/pm2 | ||
19 | state: directory | ||
20 | - name: workdir scripts | ||
21 | synchronize: | ||
22 | recursive: yes | ||
23 | archive: no | ||
24 | checksum: yes | ||
25 | src: workdir/ | ||
26 | dest: /$HOME/workdir/ | ||
27 | - name: chmod workdir script | ||
28 | file: | ||
29 | path: $HOME/workdir/start | ||
30 | mode: 0755 | ||
31 | - name: enable remind service | ||
32 | systemd: | ||
33 | state: started | ||
34 | scope: user | ||
35 | name: remind@work.service | ||
36 | enabled: true | ||
diff --git a/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push b/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push new file mode 100755 index 0000000..19088c9 --- /dev/null +++ b/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | set -e | ||
4 | |||
5 | echo "[+] Running the linter" | ||
6 | make lint | ||
7 | |||
8 | exit 0 | ||
diff --git a/roles/git/files/config_files/tig/config b/roles/git/files/config_files/tig/config new file mode 100644 index 0000000..e9cdf17 --- /dev/null +++ b/roles/git/files/config_files/tig/config | |||
@@ -0,0 +1,19 @@ | |||
1 | set editor-line-number = yes | ||
2 | set mouse = yes | ||
3 | set mouse-scroll = 5 | ||
4 | set refresh-mode = auto | ||
5 | set line-graphics = utf-8 | ||
6 | |||
7 | set pager-view-line-number = yes,interval=10 | ||
8 | set blame-view-line-number = yes,interval=10 | ||
9 | set grep-view-line-number = yes,interval=10 | ||
10 | set diff-view-line-number = yes,interval=10 | ||
11 | set log-view-line-number = yes,interval=10 | ||
12 | set blob-view-line-number = yes,interval=10 | ||
13 | set stage-view-line-number = yes,interval=10 | ||
14 | |||
15 | set main-view-commit-title = graph=v1,refs=yes | ||
16 | set refs-view-commit-title = graph=v1,refs=yes | ||
17 | set stash-view-commit-title = graph=v1,refs=yes | ||
18 | |||
19 | set refs-view-ref = display=yes | ||
diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml new file mode 100644 index 0000000..440e178 --- /dev/null +++ b/roles/git/tasks/main.yml | |||
@@ -0,0 +1,21 @@ | |||
1 | --- | ||
2 | - name: Config files | ||
3 | synchronize: | ||
4 | recursive: yes | ||
5 | archive: no | ||
6 | checksum: yes | ||
7 | src: config_files/ | ||
8 | dest: /$XDG_CONFIG_HOME/ | ||
9 | - name: git config file | ||
10 | template: | ||
11 | src: config.j2 | ||
12 | dest: $XDG_CONFIG_HOME/git/config | ||
13 | - name: Create tig state dir | ||
14 | file: | ||
15 | path: $XDG_STATE_HOME/tig | ||
16 | state: directory | ||
17 | - name: Link tig state dir | ||
18 | file: | ||
19 | path: "$XDG_DATA_HOME/tig" | ||
20 | src: "$XDG_STATE_HOME/tig" | ||
21 | state: link | ||
diff --git a/roles/git/templates/config.j2 b/roles/git/templates/config.j2 new file mode 100644 index 0000000..7182626 --- /dev/null +++ b/roles/git/templates/config.j2 | |||
@@ -0,0 +1,23 @@ | |||
1 | [user] | ||
2 | signingkey = DC384748709D2619FF2867216D0CAFFDDB1CFE90 | ||
3 | {% if profile in role and role[profile] == "fretlink" %} | ||
4 | email = ismael.bouya@fretlink.com | ||
5 | {% else %} | ||
6 | email = ismael.bouya@normalesup.org | ||
7 | {% endif %} | ||
8 | name = Ismaël Bouya | ||
9 | [commit] | ||
10 | gpgsign = true | ||
11 | verbose = true | ||
12 | [push] | ||
13 | gpgSign = if-asked | ||
14 | {% if profile in role and role[profile] == "fretlink" %} | ||
15 | [fretlink] | ||
16 | remote-name = upstream | ||
17 | {% endif %} | ||
18 | [log] | ||
19 | showSignature = true | ||
20 | {% if profile in role %} | ||
21 | [init] | ||
22 | templateDir = ~/.config/git/templates_{{ role[profile] }} | ||
23 | {% endif %} | ||
diff --git a/roles/gnupg/files/gnupg/gpg-agent.conf b/roles/gnupg/files/gnupg/gpg-agent.conf new file mode 100644 index 0000000..3c4e379 --- /dev/null +++ b/roles/gnupg/files/gnupg/gpg-agent.conf | |||
@@ -0,0 +1,4 @@ | |||
1 | pinentry-program /usr/bin/pinentry | ||
2 | allow-loopback-pinentry | ||
3 | enable-ssh-support | ||
4 | allow-preset-passphrase | ||
diff --git a/roles/gnupg/files/gnupg/gpg.conf b/roles/gnupg/files/gnupg/gpg.conf new file mode 100644 index 0000000..17bc522 --- /dev/null +++ b/roles/gnupg/files/gnupg/gpg.conf | |||
@@ -0,0 +1,7 @@ | |||
1 | # Main signing key | ||
2 | default-key DB1CFE90 | ||
3 | |||
4 | default-recipient-self | ||
5 | encrypt-to 0326A611 | ||
6 | auto-key-retrieve | ||
7 | no-greeting | ||
diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml new file mode 100644 index 0000000..8adaf69 --- /dev/null +++ b/roles/gnupg/tasks/main.yml | |||
@@ -0,0 +1,34 @@ | |||
1 | --- | ||
2 | - name: Config files | ||
3 | synchronize: | ||
4 | recursive: yes | ||
5 | archive: no | ||
6 | checksum: yes | ||
7 | src: gnupg | ||
8 | dest: /$XDG_CONFIG_HOME/ | ||
9 | - name: Protect directory | ||
10 | file: | ||
11 | path: $XDG_CONFIG_HOME/gnupg | ||
12 | state: directory | ||
13 | mode: 0700 | ||
14 | - name: Get gnupg runtime folder name | ||
15 | shell: 'GNUPGHOME=$XDG_CONFIG_HOME/gnupg gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"' | ||
16 | register: gnupg_runtime_dir_cmd | ||
17 | - name: Add systemd overrides | ||
18 | template: | ||
19 | src: "systemd/{{ item }}.conf.j2" | ||
20 | dest: "$XDG_CONFIG_HOME/systemd/user/{{ item }}.socket.d/override.conf" | ||
21 | register: results | ||
22 | loop: | ||
23 | - dirmngr | ||
24 | - gpg-agent | ||
25 | - gpg-agent-browser | ||
26 | - gpg-agent-extra | ||
27 | - gpg-agent-ssh | ||
28 | - name: Restart systemd units | ||
29 | systemd: | ||
30 | daemon_reload: true | ||
31 | scope: user | ||
32 | state: restarted | ||
33 | name: "{{ item }}.socket" | ||
34 | loop: "{{ results.results|selectattr('changed')|map(attribute='item')|list }}" | ||
diff --git a/roles/gnupg/templates/systemd/dirmngr.conf.j2 b/roles/gnupg/templates/systemd/dirmngr.conf.j2 new file mode 100644 index 0000000..9083ab5 --- /dev/null +++ b/roles/gnupg/templates/systemd/dirmngr.conf.j2 | |||
@@ -0,0 +1,3 @@ | |||
1 | [Socket] | ||
2 | ListenStream= | ||
3 | ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.dirmngr | ||
diff --git a/roles/gnupg/templates/systemd/gpg-agent-browser.conf.j2 b/roles/gnupg/templates/systemd/gpg-agent-browser.conf.j2 new file mode 100644 index 0000000..61ddeb6 --- /dev/null +++ b/roles/gnupg/templates/systemd/gpg-agent-browser.conf.j2 | |||
@@ -0,0 +1,3 @@ | |||
1 | [Socket] | ||
2 | ListenStream= | ||
3 | ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.browser | ||
diff --git a/roles/gnupg/templates/systemd/gpg-agent-extra.conf.j2 b/roles/gnupg/templates/systemd/gpg-agent-extra.conf.j2 new file mode 100644 index 0000000..f34606c --- /dev/null +++ b/roles/gnupg/templates/systemd/gpg-agent-extra.conf.j2 | |||
@@ -0,0 +1,3 @@ | |||
1 | [Socket] | ||
2 | ListenStream= | ||
3 | ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.extra | ||
diff --git a/roles/gnupg/templates/systemd/gpg-agent-ssh.conf.j2 b/roles/gnupg/templates/systemd/gpg-agent-ssh.conf.j2 new file mode 100644 index 0000000..b7cd0c2 --- /dev/null +++ b/roles/gnupg/templates/systemd/gpg-agent-ssh.conf.j2 | |||
@@ -0,0 +1,3 @@ | |||
1 | [Socket] | ||
2 | ListenStream= | ||
3 | ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.ssh | ||
diff --git a/roles/gnupg/templates/systemd/gpg-agent.conf.j2 b/roles/gnupg/templates/systemd/gpg-agent.conf.j2 new file mode 100644 index 0000000..666c22e --- /dev/null +++ b/roles/gnupg/templates/systemd/gpg-agent.conf.j2 | |||
@@ -0,0 +1,3 @@ | |||
1 | [Socket] | ||
2 | ListenStream= | ||
3 | ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent | ||
diff --git a/roles/graphical/files/config_files/autostart/redshift-gtk.desktop b/roles/graphical/files/config_files/autostart/redshift-gtk.desktop new file mode 100644 index 0000000..3fc7814 --- /dev/null +++ b/roles/graphical/files/config_files/autostart/redshift-gtk.desktop | |||
@@ -0,0 +1,7 @@ | |||
1 | [Desktop Entry] | ||
2 | Name=Redshift | ||
3 | GenericName=Redshift | ||
4 | Exec=/usr/bin/redshift-gtk | ||
5 | Icon=redshift | ||
6 | Terminal=false | ||
7 | Type=Application | ||
diff --git a/roles/graphical/files/config_files/dunst/dunstrc b/roles/graphical/files/config_files/dunst/dunstrc new file mode 100644 index 0000000..c8e55b5 --- /dev/null +++ b/roles/graphical/files/config_files/dunst/dunstrc | |||
@@ -0,0 +1,368 @@ | |||
1 | [global] | ||
2 | ### Display ### | ||
3 | |||
4 | # Which monitor should the notifications be displayed on. | ||
5 | monitor = 0 | ||
6 | |||
7 | # Display notification on focused monitor. Possible modes are: | ||
8 | # mouse: follow mouse pointer | ||
9 | # keyboard: follow window with keyboard focus | ||
10 | # none: don't follow anything | ||
11 | # | ||
12 | # "keyboard" needs a window manager that exports the | ||
13 | # _NET_ACTIVE_WINDOW property. | ||
14 | # This should be the case for almost all modern window managers. | ||
15 | # | ||
16 | # If this option is set to mouse or keyboard, the monitor option | ||
17 | # will be ignored. | ||
18 | follow = mouse | ||
19 | |||
20 | # The geometry of the window: | ||
21 | # [{width}]x{height}[+/-{x}+/-{y}] | ||
22 | # The geometry of the message window. | ||
23 | # The height is measured in number of notifications everything else | ||
24 | # in pixels. If the width is omitted but the height is given | ||
25 | # ("-geometry x2"), the message window expands over the whole screen | ||
26 | # (dmenu-like). If width is 0, the window expands to the longest | ||
27 | # message displayed. A positive x is measured from the left, a | ||
28 | # negative from the right side of the screen. Y is measured from | ||
29 | # the top and down respectively. | ||
30 | # The width can be negative. In this case the actual width is the | ||
31 | # screen width minus the width defined in within the geometry option. | ||
32 | geometry = "300x5-30+20" | ||
33 | |||
34 | # Show how many messages are currently hidden (because of geometry). | ||
35 | indicate_hidden = yes | ||
36 | |||
37 | # Shrink window if it's smaller than the width. Will be ignored if | ||
38 | # width is 0. | ||
39 | shrink = no | ||
40 | |||
41 | # The transparency of the window. Range: [0; 100]. | ||
42 | # This option will only work if a compositing window manager is | ||
43 | # present (e.g. xcompmgr, compiz, etc.). | ||
44 | transparency = 0 | ||
45 | |||
46 | # The height of the entire notification. If the height is smaller | ||
47 | # than the font height and padding combined, it will be raised | ||
48 | # to the font height and padding. | ||
49 | notification_height = 0 | ||
50 | |||
51 | # Draw a line of "separator_height" pixel height between two | ||
52 | # notifications. | ||
53 | # Set to 0 to disable. | ||
54 | separator_height = 2 | ||
55 | |||
56 | # Padding between text and separator. | ||
57 | padding = 8 | ||
58 | |||
59 | # Horizontal padding. | ||
60 | horizontal_padding = 8 | ||
61 | |||
62 | # Defines width in pixels of frame around the notification window. | ||
63 | # Set to 0 to disable. | ||
64 | frame_width = 3 | ||
65 | |||
66 | # Defines color of the frame around the notification window. | ||
67 | frame_color = "#aaaaaa" | ||
68 | |||
69 | # Define a color for the separator. | ||
70 | # possible values are: | ||
71 | # * auto: dunst tries to find a color fitting to the background; | ||
72 | # * foreground: use the same color as the foreground; | ||
73 | # * frame: use the same color as the frame; | ||
74 | # * anything else will be interpreted as a X color. | ||
75 | separator_color = frame | ||
76 | |||
77 | # Sort messages by urgency. | ||
78 | sort = yes | ||
79 | |||
80 | # Don't remove messages, if the user is idle (no mouse or keyboard input) | ||
81 | # for longer than idle_threshold seconds. | ||
82 | # Set to 0 to disable. | ||
83 | # Transient notifications ignore this setting. | ||
84 | idle_threshold = 120 | ||
85 | |||
86 | ### Text ### | ||
87 | |||
88 | font = Monospace 8 | ||
89 | |||
90 | # The spacing between lines. If the height is smaller than the | ||
91 | # font height, it will get raised to the font height. | ||
92 | line_height = 0 | ||
93 | |||
94 | # Possible values are: | ||
95 | # full: Allow a small subset of html markup in notifications: | ||
96 | # <b>bold</b> | ||
97 | # <i>italic</i> | ||
98 | # <s>strikethrough</s> | ||
99 | # <u>underline</u> | ||
100 | # | ||
101 | # For a complete reference see | ||
102 | # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. | ||
103 | # | ||
104 | # strip: This setting is provided for compatibility with some broken | ||
105 | # clients that send markup even though it's not enabled on the | ||
106 | # server. Dunst will try to strip the markup but the parsing is | ||
107 | # simplistic so using this option outside of matching rules for | ||
108 | # specific applications *IS GREATLY DISCOURAGED*. | ||
109 | # | ||
110 | # no: Disable markup parsing, incoming notifications will be treated as | ||
111 | # plain text. Dunst will not advertise that it has the body-markup | ||
112 | # capability if this is set as a global setting. | ||
113 | # | ||
114 | # It's important to note that markup inside the format option will be parsed | ||
115 | # regardless of what this is set to. | ||
116 | markup = full | ||
117 | |||
118 | # The format of the message. Possible variables are: | ||
119 | # %a appname | ||
120 | # %s summary | ||
121 | # %b body | ||
122 | # %i iconname (including its path) | ||
123 | # %I iconname (without its path) | ||
124 | # %p progress value if set ([ 0%] to [100%]) or nothing | ||
125 | # %n progress value if set without any extra characters | ||
126 | # %% Literal % | ||
127 | # Markup is allowed | ||
128 | format = "<span size='small'>%a</span>\n<b>%s</b>\n%b\n%p" | ||
129 | |||
130 | # Alignment of message text. | ||
131 | # Possible values are "left", "center" and "right". | ||
132 | alignment = left | ||
133 | |||
134 | # Show age of message if message is older than show_age_threshold | ||
135 | # seconds. | ||
136 | # Set to -1 to disable. | ||
137 | show_age_threshold = 60 | ||
138 | |||
139 | # Split notifications into multiple lines if they don't fit into | ||
140 | # geometry. | ||
141 | word_wrap = yes | ||
142 | |||
143 | # When word_wrap is set to no, specify where to make an ellipsis in long lines. | ||
144 | # Possible values are "start", "middle" and "end". | ||
145 | ellipsize = middle | ||
146 | |||
147 | # Ignore newlines '\n' in notifications. | ||
148 | ignore_newline = no | ||
149 | |||
150 | # Merge multiple notifications with the same content | ||
151 | stack_duplicates = true | ||
152 | |||
153 | # Hide the count of merged notifications with the same content | ||
154 | hide_duplicate_count = false | ||
155 | |||
156 | # Display indicators for URLs (U) and actions (A). | ||
157 | show_indicators = yes | ||
158 | |||
159 | ### Icons ### | ||
160 | |||
161 | # Align icons left/right/off | ||
162 | icon_position = left | ||
163 | |||
164 | # Scale larger icons down to this size, set to 0 to disable | ||
165 | max_icon_size = 32 | ||
166 | |||
167 | # Paths to default icons. | ||
168 | icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ | ||
169 | |||
170 | ### History ### | ||
171 | |||
172 | # Should a notification popped up from history be sticky or timeout | ||
173 | # as if it would normally do. | ||
174 | sticky_history = yes | ||
175 | |||
176 | # Maximum amount of notifications kept in history | ||
177 | history_length = 20 | ||
178 | |||
179 | ### Misc/Advanced ### | ||
180 | |||
181 | # dmenu path. | ||
182 | dmenu = /usr/bin/dmenu -p dunst: | ||
183 | |||
184 | # Browser for opening urls in context menu. | ||
185 | browser = /usr/bin/firefox -new-tab | ||
186 | |||
187 | # Always run rule-defined scripts, even if the notification is suppressed | ||
188 | always_run_script = true | ||
189 | |||
190 | # Define the title of the windows spawned by dunst | ||
191 | title = Dunst | ||
192 | |||
193 | # Define the class of the windows spawned by dunst | ||
194 | class = Dunst | ||
195 | |||
196 | # Print a notification on startup. | ||
197 | # This is mainly for error detection, since dbus (re-)starts dunst | ||
198 | # automatically after a crash. | ||
199 | startup_notification = true | ||
200 | |||
201 | # Manage dunst's desire for talking | ||
202 | # Can be one of the following values: | ||
203 | # crit: Critical features. Dunst aborts | ||
204 | # warn: Only non-fatal warnings | ||
205 | # mesg: Important Messages | ||
206 | # info: all unimportant stuff | ||
207 | # debug: all less than unimportant stuff | ||
208 | verbosity = mesg | ||
209 | |||
210 | # Define the corner radius of the notification window | ||
211 | # in pixel size. If the radius is 0, you have no rounded | ||
212 | # corners. | ||
213 | # The radius will be automatically lowered if it exceeds half of the | ||
214 | # notification height to avoid clipping text and/or icons. | ||
215 | corner_radius = 0 | ||
216 | |||
217 | ### Legacy | ||
218 | |||
219 | # Use the Xinerama extension instead of RandR for multi-monitor support. | ||
220 | # This setting is provided for compatibility with older nVidia drivers that | ||
221 | # do not support RandR and using it on systems that support RandR is highly | ||
222 | # discouraged. | ||
223 | # | ||
224 | # By enabling this setting dunst will not be able to detect when a monitor | ||
225 | # is connected or disconnected which might break follow mode if the screen | ||
226 | # layout changes. | ||
227 | force_xinerama = false | ||
228 | |||
229 | # Experimental features that may or may not work correctly. Do not expect them | ||
230 | # to have a consistent behaviour across releases. | ||
231 | [experimental] | ||
232 | # Calculate the dpi to use on a per-monitor basis. | ||
233 | # If this setting is enabled the Xft.dpi value will be ignored and instead | ||
234 | # dunst will attempt to calculate an appropriate dpi value for each monitor | ||
235 | # using the resolution and physical size. This might be useful in setups | ||
236 | # where there are multiple screens with very different dpi values. | ||
237 | per_monitor_dpi = false | ||
238 | |||
239 | [shortcuts] | ||
240 | |||
241 | # Shortcuts are specified as [modifier+][modifier+]...key | ||
242 | # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", | ||
243 | # "mod3" and "mod4" (windows-key). | ||
244 | # Xev might be helpful to find names for keys. | ||
245 | |||
246 | # Close notification. | ||
247 | close = ctrl+space | ||
248 | |||
249 | # Close all notifications. | ||
250 | close_all = ctrl+mod1+space | ||
251 | |||
252 | # Redisplay last message(s). | ||
253 | # On the US keyboard layout "grave" is normally above TAB and left | ||
254 | # of "1". Make sure this key actually exists on your keyboard layout, | ||
255 | # e.g. check output of 'xmodmap -pke' | ||
256 | history = ctrl+shift+space | ||
257 | |||
258 | # Context menu. | ||
259 | context = shift+space | ||
260 | |||
261 | [urgency_low] | ||
262 | # IMPORTANT: colors have to be defined in quotation marks. | ||
263 | # Otherwise the "#" and following would be interpreted as a comment. | ||
264 | background = "#222222" | ||
265 | foreground = "#888888" | ||
266 | timeout = 10 | ||
267 | # Icon for notifications with low urgency, uncomment to enable | ||
268 | #icon = /path/to/icon | ||
269 | |||
270 | [urgency_normal] | ||
271 | background = "#285577" | ||
272 | foreground = "#ffffff" | ||
273 | timeout = 10 | ||
274 | # Icon for notifications with normal urgency, uncomment to enable | ||
275 | #icon = /path/to/icon | ||
276 | |||
277 | [urgency_critical] | ||
278 | background = "#900000" | ||
279 | foreground = "#ffffff" | ||
280 | frame_color = "#ff0000" | ||
281 | timeout = 0 | ||
282 | # Icon for notifications with critical urgency, uncomment to enable | ||
283 | #icon = /path/to/icon | ||
284 | |||
285 | # Every section that isn't one of the above is interpreted as a rules to | ||
286 | # override settings for certain messages. | ||
287 | # Messages can be matched by "appname", "summary", "body", "icon", "category", | ||
288 | # "msg_urgency" and you can override the "timeout", "urgency", "foreground", | ||
289 | # "background", "frame_color", "new_icon" and "format", "fullscreen". | ||
290 | # Shell-like globbing will get expanded. | ||
291 | # | ||
292 | # SCRIPTING | ||
293 | # You can specify a script that gets run when the rule matches by | ||
294 | # setting the "script" option. | ||
295 | # The script will be called as follows: | ||
296 | # script appname summary body icon urgency | ||
297 | # where urgency can be "LOW", "NORMAL" or "CRITICAL". | ||
298 | # | ||
299 | # NOTE: if you don't want a notification to be displayed, set the format | ||
300 | # to "". | ||
301 | # NOTE: It might be helpful to run dunst -print in a terminal in order | ||
302 | # to find fitting options for rules. | ||
303 | |||
304 | # fullscreen values | ||
305 | # show: show the notifications, regardless if there is a fullscreen window opened | ||
306 | # delay: displays the new notification, if there is no fullscreen window active | ||
307 | # If the notification is already drawn, it won't get undrawn. | ||
308 | # pushback: same as delay, but when switching into fullscreen, the notification will get | ||
309 | # withdrawn from screen again and will get delayed like a new notification | ||
310 | |||
311 | #[fullscreen_delay_everything] | ||
312 | # fullscreen = delay | ||
313 | #[fullscreen_show_critical] | ||
314 | # msg_urgency = critical | ||
315 | # fullscreen = show | ||
316 | |||
317 | [volume] | ||
318 | summary = "Volume" | ||
319 | appname = "Openbox-volume" | ||
320 | format = "Volume %p" | ||
321 | fullscreen = show | ||
322 | |||
323 | [volume-mute] | ||
324 | appname = "Openbox-mute" | ||
325 | format = "%s" | ||
326 | fullscreen = show | ||
327 | background = "#00ff00" | ||
328 | foreground = "#000000" | ||
329 | |||
330 | #[espeak] | ||
331 | # summary = "*" | ||
332 | # script = dunst_espeak.sh | ||
333 | |||
334 | #[script-test] | ||
335 | # summary = "*script*" | ||
336 | # script = dunst_test.sh | ||
337 | |||
338 | #[ignore] | ||
339 | # # This notification will not be displayed | ||
340 | # summary = "foobar" | ||
341 | # format = "" | ||
342 | |||
343 | #[history-ignore] | ||
344 | # # This notification will not be saved in history | ||
345 | # summary = "foobar" | ||
346 | # history_ignore = yes | ||
347 | |||
348 | #[signed_on] | ||
349 | # appname = Pidgin | ||
350 | # summary = "*signed on*" | ||
351 | # urgency = low | ||
352 | # | ||
353 | #[signed_off] | ||
354 | # appname = Pidgin | ||
355 | # summary = *signed off* | ||
356 | # urgency = low | ||
357 | # | ||
358 | #[says] | ||
359 | # appname = Pidgin | ||
360 | # summary = *says* | ||
361 | # urgency = critical | ||
362 | # | ||
363 | #[twitter] | ||
364 | # appname = Pidgin | ||
365 | # summary = *twitter.com* | ||
366 | # urgency = normal | ||
367 | # | ||
368 | # vim: ft=cfg | ||
diff --git a/roles/graphical/files/config_files/redshift.conf b/roles/graphical/files/config_files/redshift.conf new file mode 100644 index 0000000..da26fa2 --- /dev/null +++ b/roles/graphical/files/config_files/redshift.conf | |||
@@ -0,0 +1,8 @@ | |||
1 | [redshift] | ||
2 | temp-day=4500 | ||
3 | temp-night=4500 | ||
4 | location-provider=manual | ||
5 | |||
6 | [manual] | ||
7 | lat=48.8566 | ||
8 | lon=2.3522 | ||
diff --git a/roles/graphical/files/mimeapps.list b/roles/graphical/files/mimeapps.list new file mode 100644 index 0000000..1f35b04 --- /dev/null +++ b/roles/graphical/files/mimeapps.list | |||
@@ -0,0 +1,147 @@ | |||
1 | [Added Associations] | ||
2 | text/html=firefox.desktop | ||
3 | text/xml=firefox.desktop | ||
4 | application/xhtml+xml=firefox.desktop | ||
5 | application/vnd.mozilla.xul+xml=firefox.desktop | ||
6 | text/mml=firefox.desktop | ||
7 | x-scheme-handler/http=firefox.desktop | ||
8 | x-scheme-handler/https=firefox.desktop | ||
9 | inode/directory=pcmanfm.desktop | ||
10 | image/bmp=gpicview.desktop | ||
11 | image/gif=gpicview.desktop | ||
12 | image/jpeg=gpicview.desktop | ||
13 | image/jpg=gpicview.desktop | ||
14 | image/png=gpicview.desktop | ||
15 | image/tiff=org.gnome.Evince.desktop | ||
16 | image/x-bmp=gpicview.desktop | ||
17 | image/x-pcx=gpicview.desktop | ||
18 | image/x-tga=gpicview.desktop | ||
19 | image/x-portable-pixmap=gpicview.desktop | ||
20 | image/x-portable-bitmap=gpicview.desktop | ||
21 | image/x-targa=gpicview.desktop | ||
22 | image/x-portable-greymap=gpicview.desktop | ||
23 | application/pcx=gpicview.desktop | ||
24 | image/svg+xml=gpicview.desktop | ||
25 | image/svg-xml=gpicview.desktop | ||
26 | text/english=vim.desktop | ||
27 | text/plain=vim.desktop | ||
28 | text/x-makefile=vim.desktop | ||
29 | text/x-c++hdr=vim.desktop | ||
30 | text/x-c++src=vim.desktop | ||
31 | text/x-chdr=vim.desktop | ||
32 | text/x-csrc=vim.desktop | ||
33 | text/x-java=vim.desktop | ||
34 | text/x-moc=vim.desktop | ||
35 | text/x-pascal=vim.desktop | ||
36 | text/x-tcl=vim.desktop | ||
37 | text/x-tex=vim.desktop | ||
38 | application/x-shellscript=vim.desktop | ||
39 | text/x-c=vim.desktop | ||
40 | text/x-c++=vim.desktop | ||
41 | application/pdf=org.gnome.Evince.desktop | ||
42 | application/x-bzpdf=org.gnome.Evince.desktop | ||
43 | application/x-gzpdf=org.gnome.Evince.desktop | ||
44 | application/x-xzpdf=org.gnome.Evince.desktop | ||
45 | application/x-ext-pdf=org.gnome.Evince.desktop | ||
46 | application/postscript=org.gnome.Evince.desktop | ||
47 | application/x-bzpostscript=org.gnome.Evince.desktop | ||
48 | application/x-gzpostscript=org.gnome.Evince.desktop | ||
49 | image/x-eps=org.gnome.Evince.desktop | ||
50 | image/x-bzeps=org.gnome.Evince.desktop | ||
51 | image/x-gzeps=org.gnome.Evince.desktop | ||
52 | application/x-ext-ps=org.gnome.Evince.desktop | ||
53 | application/x-ext-eps=org.gnome.Evince.desktop | ||
54 | application/illustrator=org.gnome.Evince.desktop | ||
55 | application/x-dvi=org.gnome.Evince.desktop | ||
56 | application/x-bzdvi=org.gnome.Evince.desktop | ||
57 | application/x-gzdvi=org.gnome.Evince.desktop | ||
58 | application/x-ext-dvi=org.gnome.Evince.desktop | ||
59 | image/vnd.djvu+multipage=org.gnome.Evince.desktop | ||
60 | application/x-ext-djv=org.gnome.Evince.desktop | ||
61 | application/x-ext-djvu=org.gnome.Evince.desktop | ||
62 | application/x-cbr=org.gnome.Evince.desktop | ||
63 | application/x-cbz=org.gnome.Evince.desktop | ||
64 | application/x-cb7=org.gnome.Evince.desktop | ||
65 | application/x-cbt=org.gnome.Evince.desktop | ||
66 | application/x-ext-cbr=org.gnome.Evince.desktop | ||
67 | application/x-ext-cbz=org.gnome.Evince.desktop | ||
68 | application/x-ext-cb7=org.gnome.Evince.desktop | ||
69 | application/x-ext-cbt=org.gnome.Evince.desktop | ||
70 | application/vnd.comicbook+zip=org.gnome.Evince.desktop | ||
71 | application/vnd.comicbook-rar=org.gnome.Evince.desktop | ||
72 | application/oxps=org.gnome.Evince.desktop | ||
73 | application/vnd.ms-xpsdocument=org.gnome.Evince.desktop | ||
74 | |||
75 | [Default Applications] | ||
76 | text/html=firefox.desktop | ||
77 | text/xml=firefox.desktop | ||
78 | application/xhtml+xml=firefox.desktop | ||
79 | application/vnd.mozilla.xul+xml=firefox.desktop | ||
80 | text/mml=firefox.desktop | ||
81 | x-scheme-handler/http=firefox.desktop | ||
82 | x-scheme-handler/https=firefox.desktop | ||
83 | inode/directory=pcmanfm.desktop | ||
84 | image/bmp=gpicview.desktop | ||
85 | image/gif=gpicview.desktop | ||
86 | image/jpeg=gpicview.desktop | ||
87 | image/jpg=gpicview.desktop | ||
88 | image/png=gpicview.desktop | ||
89 | image/tiff=org.gnome.Evince.desktop | ||
90 | image/x-bmp=gpicview.desktop | ||
91 | image/x-pcx=gpicview.desktop | ||
92 | image/x-tga=gpicview.desktop | ||
93 | image/x-portable-pixmap=gpicview.desktop | ||
94 | image/x-portable-bitmap=gpicview.desktop | ||
95 | image/x-targa=gpicview.desktop | ||
96 | image/x-portable-greymap=gpicview.desktop | ||
97 | application/pcx=gpicview.desktop | ||
98 | image/svg+xml=gpicview.desktop | ||
99 | image/svg-xml=gpicview.desktop | ||
100 | text/english=vim.desktop | ||
101 | text/plain=vim.desktop | ||
102 | text/x-makefile=vim.desktop | ||
103 | text/x-c++hdr=vim.desktop | ||
104 | text/x-c++src=vim.desktop | ||
105 | text/x-chdr=vim.desktop | ||
106 | text/x-csrc=vim.desktop | ||
107 | text/x-java=vim.desktop | ||
108 | text/x-moc=vim.desktop | ||
109 | text/x-pascal=vim.desktop | ||
110 | text/x-tcl=vim.desktop | ||
111 | text/x-tex=vim.desktop | ||
112 | application/x-shellscript=vim.desktop | ||
113 | text/x-c=vim.desktop | ||
114 | text/x-c++=vim.desktop | ||
115 | application/pdf=org.gnome.Evince.desktop | ||
116 | application/x-bzpdf=org.gnome.Evince.desktop | ||
117 | application/x-gzpdf=org.gnome.Evince.desktop | ||
118 | application/x-xzpdf=org.gnome.Evince.desktop | ||
119 | application/x-ext-pdf=org.gnome.Evince.desktop | ||
120 | application/postscript=org.gnome.Evince.desktop | ||
121 | application/x-bzpostscript=org.gnome.Evince.desktop | ||
122 | application/x-gzpostscript=org.gnome.Evince.desktop | ||
123 | image/x-eps=org.gnome.Evince.desktop | ||
124 | image/x-bzeps=org.gnome.Evince.desktop | ||
125 | image/x-gzeps=org.gnome.Evince.desktop | ||
126 | application/x-ext-ps=org.gnome.Evince.desktop | ||
127 | application/x-ext-eps=org.gnome.Evince.desktop | ||
128 | application/illustrator=org.gnome.Evince.desktop | ||
129 | application/x-dvi=org.gnome.Evince.desktop | ||
130 | application/x-bzdvi=org.gnome.Evince.desktop | ||
131 | application/x-gzdvi=org.gnome.Evince.desktop | ||
132 | application/x-ext-dvi=org.gnome.Evince.desktop | ||
133 | image/vnd.djvu+multipage=org.gnome.Evince.desktop | ||
134 | application/x-ext-djv=org.gnome.Evince.desktop | ||
135 | application/x-ext-djvu=org.gnome.Evince.desktop | ||
136 | application/x-cbr=org.gnome.Evince.desktop | ||
137 | application/x-cbz=org.gnome.Evince.desktop | ||
138 | application/x-cb7=org.gnome.Evince.desktop | ||
139 | application/x-cbt=org.gnome.Evince.desktop | ||
140 | application/x-ext-cbr=org.gnome.Evince.desktop | ||
141 | application/x-ext-cbz=org.gnome.Evince.desktop | ||
142 | application/x-ext-cb7=org.gnome.Evince.desktop | ||
143 | application/x-ext-cbt=org.gnome.Evince.desktop | ||
144 | application/vnd.comicbook+zip=org.gnome.Evince.desktop | ||
145 | application/vnd.comicbook-rar=org.gnome.Evince.desktop | ||
146 | application/oxps=org.gnome.Evince.desktop | ||
147 | application/vnd.ms-xpsdocument=org.gnome.Evince.desktop | ||
diff --git a/roles/graphical/tasks/main.yml b/roles/graphical/tasks/main.yml new file mode 100644 index 0000000..96c70b9 --- /dev/null +++ b/roles/graphical/tasks/main.yml | |||
@@ -0,0 +1,21 @@ | |||
1 | --- | ||
2 | - name: Config files | ||
3 | synchronize: | ||
4 | recursive: yes | ||
5 | archive: no | ||
6 | checksum: yes | ||
7 | src: config_files/ | ||
8 | dest: /$XDG_CONFIG_HOME/ | ||
9 | - name: mimeapps file | ||
10 | copy: | ||
11 | src: mimeapps.list | ||
12 | dest: $XDG_DATA_HOME/applications/ | ||
13 | - name: Create xorg state dir | ||
14 | file: | ||
15 | path: $XDG_STATE_HOME/xorg | ||
16 | state: directory | ||
17 | - name: Link Xorg state dir | ||
18 | file: | ||
19 | path: "$XDG_DATA_HOME/xorg" | ||
20 | src: "$XDG_STATE_HOME/xorg" | ||
21 | state: link | ||
diff --git a/roles/init/tasks/main.yml b/roles/init/tasks/main.yml new file mode 100644 index 0000000..d3f0f6b --- /dev/null +++ b/roles/init/tasks/main.yml | |||
@@ -0,0 +1,24 @@ | |||
1 | --- | ||
2 | - name: Get gnupg runtime folder name | ||
3 | shell: 'GNUPGHOME=$XDG_CONFIG_HOME/gnupg gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"' | ||
4 | register: gnupg_runtime_dir_cmd | ||
5 | - name: Add pam_environment | ||
6 | register: pam_environment | ||
7 | template: | ||
8 | src: pam_environment.j2 | ||
9 | dest: $XDG_CONFIG_HOME/pam_environment | ||
10 | - name: Signal the change | ||
11 | when: pam_environment.changed | ||
12 | debug: | ||
13 | msg: "\u26A0\uFE0F \u26A0\uFE0F You need to log out and back in to update your environment \u26A0\uFE0F \u26A0\uFE0F" | ||
14 | - name: Create XDG dirs | ||
15 | file: | ||
16 | path: "{{ item }}" | ||
17 | state: directory | ||
18 | loop: | ||
19 | - "$XDG_CONFIG_HOME" | ||
20 | - "$XDG_STATE_HOME" | ||
21 | - "$XDG_DATA_HOME" | ||
22 | - "$XDG_CACHE_HOME" | ||
23 | - "$HOME/Desktop" | ||
24 | - "$HOME/Downloads" | ||
diff --git a/roles/init/templates/pam_environment.j2 b/roles/init/templates/pam_environment.j2 new file mode 100644 index 0000000..4327eeb --- /dev/null +++ b/roles/init/templates/pam_environment.j2 | |||
@@ -0,0 +1,82 @@ | |||
1 | # This wil be set correctly in systemd service since the service manager | ||
2 | # itself goes through /etc/pam.d/system-login (as systemd-user) and | ||
3 | # takes its environment from pam_env | ||
4 | # HOME doesn’t even exist when arriving here, but the user’s home is | ||
5 | # available via @{HOME}. But pam_systemd still sets XDG_RUNTIME_DIR (and | ||
6 | # only that one in the case of systemd-user) | ||
7 | |||
8 | # Those are already defined in /etc/security/pam_env.conf | ||
9 | XDG_CONFIG_HOME DEFAULT="@{HOME}/.config" | ||
10 | XDG_CACHE_HOME DEFAULT="@{HOME}/.cache" | ||
11 | XDG_DATA_HOME DEFAULT="@{HOME}/.local/share" | ||
12 | XDG_STATE_HOME DEFAULT="@{HOME}/.local/state" | ||
13 | |||
14 | EDITOR DEFAULT="vim" | ||
15 | VISUAL DEFAULT="vim" | ||
16 | PAGER DEFAULT="less" | ||
17 | BROWSER DEFAULT="firefox" | ||
18 | |||
19 | # Ansible | ||
20 | ANSIBLE_CONFIG DEFAULT="${XDG_CONFIG_HOME}/ansible/ansible.cfg" | ||
21 | |||
22 | # Python | ||
23 | IPYTHONDIR DEFAULT="${XDG_CONFIG_HOME}/ipython" | ||
24 | JUPYTER_CONFIG_DIR DEFAULT="${XDG_CONFIG_HOME}/jupyter" | ||
25 | PYTHONSTARTUP DEFAULT="${XDG_CONFIG_HOME}/python/startup_script.py" | ||
26 | |||
27 | # VIM | ||
28 | VIMINIT DEFAULT=":source ${XDG_CONFIG_HOME}/vim/vimrc" | ||
29 | |||
30 | # Mplayer | ||
31 | MPLAYER_HOME DEFAULT="${XDG_CONFIG_HOME}/mplayer" | ||
32 | |||
33 | # X11 | ||
34 | XAUTHORITY DEFAULT="${XDG_RUNTIME_DIR}/Xauthority" | ||
35 | |||
36 | # GPG | ||
37 | GNUPGHOME DEFAULT="${XDG_CONFIG_HOME}/gnupg" | ||
38 | |||
39 | # SSH | ||
40 | SSH_AGENT_PID DEFAULT= | ||
41 | SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.ssh" | ||
42 | |||
43 | # Less | ||
44 | LESSHISTFILE DEFAULT="${XDG_STATE_HOME}/less/history" | ||
45 | |||
46 | # Pass | ||
47 | PASSWORD_STORE_DIR DEFAULT="${XDG_DATA_HOME}/pass" | ||
48 | |||
49 | # Postgresql | ||
50 | PSQLRC DEFAULT="${XDG_CONFIG_HOME}/psql/psqlrc" | ||
51 | PSQL_HISTORY DEFAULT="${XDG_STATE_HOME}/psql/psql_history" | ||
52 | PGPASSFILE DEFAULT="${XDG_CONFIG_HOME}/psql/pgpass" | ||
53 | PGSERVICEFILE DEFAULT="${XDG_CONFIG_HOME}/psql/pg_service.conf" | ||
54 | |||
55 | # Sqlite | ||
56 | SQLITE_HISTORY DEFAULT="${XDG_STATE_HOME}/sqlite_history" | ||
57 | |||
58 | # Stack | ||
59 | STACK_ROOT DEFAULT="${XDG_DATA_HOME}/stack" | ||
60 | |||
61 | # Nodejs | ||
62 | NVM_DIR DEFAULT="${XDG_DATA_HOME}/nvm" | ||
63 | NPM_CONFIG_USERCONFIG DEFAULT="${XDG_CONFIG_HOME}/npm/npmrc" | ||
64 | |||
65 | # TMUX | ||
66 | TMUX_TMPDIR DEFAULT="${XDG_RUNTIME_DIR}" | ||
67 | |||
68 | # node_modules/pm2/paths.js | ||
69 | PM2_HOME DEFAULT="${XDG_DATA_HOME}/pm2" | ||
70 | PM2_CONF_FILE DEFAULT="${XDG_CONFIG_HOME}/pm2/conf.js" | ||
71 | PM2_MODULE_CONF_FILE DEFAULT="${XDG_CONFIG_HOME}/pm2/module_conf.js" | ||
72 | PM2_LOG_FILE_PATH DEFAULT="${XDG_STATE_HOME}/pm2/pm2.log" | ||
73 | PM2_PID_FILE_PATH DEFAULT="${XDG_RUNTIME_DIR}/pm2/pm2.pid" | ||
74 | PM2_RELOAD_LOCKFILE DEFAULT="${XDG_RUNTIME_DIR}/pm2/reload.lock" | ||
75 | PM2_DEFAULT_PID_PATH DEFAULT="${XDG_RUNTIME_DIR}/pm2/pids" | ||
76 | PM2_DEFAULT_LOG_PATH DEFAULT="${XDG_STATE_HOME}/pm2/logs" | ||
77 | PM2_DAEMON_RPC_PORT DEFAULT="${XDG_RUNTIME_DIR}/pm2/rpc.sock" | ||
78 | PM2_DAEMON_PUB_PORT DEFAULT="${XDG_RUNTIME_DIR}/pm2/pub.sock" | ||
79 | PM2_INTERACTOR_RPC_PORT DEFAULT="${XDG_RUNTIME_DIR}/pm2/interactor.sock" | ||
80 | PM2_INTERACTOR_LOG_FILE_PATH DEFAULT="${XDG_STATE_HOME}/pm2/agent.log" | ||
81 | PM2_INTERACTOR_PID_PATH DEFAULT="${XDG_RUNTIME_DIR}/pm2/agent.pid" | ||
82 | PM2_INTERACTION_CONF DEFAULT="${XDG_CONFIG_HOME}/pm2/agent.json5" | ||
diff --git a/roles/lxde/files/config_files/libfm/libfm.conf b/roles/lxde/files/config_files/libfm/libfm.conf new file mode 100644 index 0000000..0d79919 --- /dev/null +++ b/roles/lxde/files/config_files/libfm/libfm.conf | |||
@@ -0,0 +1,44 @@ | |||
1 | # Configuration file for the libfm version 1.3.0.2. | ||
2 | # Autogenerated file, don't edit, your changes will be overwritten. | ||
3 | |||
4 | [config] | ||
5 | single_click=0 | ||
6 | use_trash=1 | ||
7 | confirm_del=1 | ||
8 | confirm_trash=1 | ||
9 | advanced_mode=0 | ||
10 | si_unit=0 | ||
11 | force_startup_notify=1 | ||
12 | backup_as_hidden=1 | ||
13 | no_usb_trash=1 | ||
14 | no_child_non_expandable=0 | ||
15 | show_full_names=1 | ||
16 | only_user_templates=0 | ||
17 | template_run_app=0 | ||
18 | template_type_once=0 | ||
19 | auto_selection_delay=600 | ||
20 | drop_default_action=auto | ||
21 | defer_content_test=0 | ||
22 | quick_exec=0 | ||
23 | terminal=lxterminal | ||
24 | thumbnail_local=1 | ||
25 | thumbnail_max=2048 | ||
26 | smart_desktop_autodrop=1 | ||
27 | |||
28 | [ui] | ||
29 | big_icon_size=48 | ||
30 | small_icon_size=24 | ||
31 | pane_icon_size=24 | ||
32 | thumbnail_size=128 | ||
33 | show_thumbnail=1 | ||
34 | shadow_hidden=1 | ||
35 | |||
36 | [places] | ||
37 | places_home=1 | ||
38 | places_desktop=1 | ||
39 | places_root=1 | ||
40 | places_computer=1 | ||
41 | places_trash=1 | ||
42 | places_applications=1 | ||
43 | places_network=1 | ||
44 | places_unmounted=1 | ||
diff --git a/roles/lxde/files/config_files/lxpanel/LXDE/config b/roles/lxde/files/config_files/lxpanel/LXDE/config new file mode 100644 index 0000000..76228e2 --- /dev/null +++ b/roles/lxde/files/config_files/lxpanel/LXDE/config | |||
@@ -0,0 +1,2 @@ | |||
1 | [Command] | ||
2 | Logout=lxde-logout | ||
diff --git a/roles/lxde/files/config_files/lxpanel/LXDE/panels/panel b/roles/lxde/files/config_files/lxpanel/LXDE/panels/panel new file mode 100644 index 0000000..34c978d --- /dev/null +++ b/roles/lxde/files/config_files/lxpanel/LXDE/panels/panel | |||
@@ -0,0 +1,165 @@ | |||
1 | # lxpanel <profile> config file. Manually editing is not recommended. | ||
2 | # Use preference dialog in lxpanel to adjust config when you can. | ||
3 | |||
4 | Global { | ||
5 | edge=bottom | ||
6 | align=left | ||
7 | margin=0 | ||
8 | widthtype=percent | ||
9 | width=100 | ||
10 | height=26 | ||
11 | transparent=0 | ||
12 | tintcolor=#000000 | ||
13 | alpha=0 | ||
14 | setdocktype=1 | ||
15 | setpartialstrut=1 | ||
16 | autohide=0 | ||
17 | heightwhenhidden=0 | ||
18 | usefontcolor=1 | ||
19 | fontcolor=#ffffff | ||
20 | background=1 | ||
21 | backgroundfile=/usr/share/lxpanel/images/background.png | ||
22 | } | ||
23 | Plugin { | ||
24 | type=space | ||
25 | Config { | ||
26 | Size=2 | ||
27 | } | ||
28 | } | ||
29 | Plugin { | ||
30 | type=menu | ||
31 | Config { | ||
32 | image=/usr/share/lxde/images/lxde-icon.png | ||
33 | system { | ||
34 | } | ||
35 | separator { | ||
36 | } | ||
37 | item { | ||
38 | command=run | ||
39 | } | ||
40 | separator { | ||
41 | } | ||
42 | item { | ||
43 | image=gnome-logout | ||
44 | command=logout | ||
45 | } | ||
46 | } | ||
47 | } | ||
48 | Plugin { | ||
49 | type=launchbar | ||
50 | Config { | ||
51 | Button { | ||
52 | id=pcmanfm.desktop | ||
53 | } | ||
54 | Button { | ||
55 | id=firefox.desktop | ||
56 | } | ||
57 | } | ||
58 | } | ||
59 | Plugin { | ||
60 | type=space | ||
61 | Config { | ||
62 | Size=4 | ||
63 | } | ||
64 | } | ||
65 | Plugin { | ||
66 | type=wincmd | ||
67 | Config { | ||
68 | Button1=iconify | ||
69 | Button2=shade | ||
70 | } | ||
71 | } | ||
72 | Plugin { | ||
73 | type=space | ||
74 | Config { | ||
75 | Size=4 | ||
76 | } | ||
77 | } | ||
78 | Plugin { | ||
79 | type=pager | ||
80 | Config { | ||
81 | } | ||
82 | } | ||
83 | Plugin { | ||
84 | type=space | ||
85 | Config { | ||
86 | Size=4 | ||
87 | } | ||
88 | } | ||
89 | Plugin { | ||
90 | type=taskbar | ||
91 | expand=1 | ||
92 | Config { | ||
93 | tooltips=1 | ||
94 | IconsOnly=0 | ||
95 | AcceptSkipPager=1 | ||
96 | ShowIconified=1 | ||
97 | ShowMapped=1 | ||
98 | ShowAllDesks=0 | ||
99 | UseMouseWheel=1 | ||
100 | UseUrgencyHint=1 | ||
101 | FlatButton=0 | ||
102 | MaxTaskWidth=150 | ||
103 | spacing=1 | ||
104 | } | ||
105 | } | ||
106 | Plugin { | ||
107 | type=monitors | ||
108 | Config { | ||
109 | DisplayCPU=1 | ||
110 | DisplayRAM=1 | ||
111 | CPUColor=#0000FF | ||
112 | RAMColor=#FF0000 | ||
113 | } | ||
114 | } | ||
115 | Plugin { | ||
116 | type=volume | ||
117 | Config { | ||
118 | } | ||
119 | } | ||
120 | Plugin { | ||
121 | type=tray | ||
122 | Config { | ||
123 | } | ||
124 | } | ||
125 | Plugin { | ||
126 | type=dclock | ||
127 | Config { | ||
128 | ClockFmt=%F %R | ||
129 | TooltipFmt=%A %x | ||
130 | BoldFont=0 | ||
131 | IconOnly=0 | ||
132 | CenterText=0 | ||
133 | } | ||
134 | } | ||
135 | Plugin { | ||
136 | type=netstatus | ||
137 | Config { | ||
138 | iface=enp0s31f6 | ||
139 | configtool=nm-connection-editor | ||
140 | } | ||
141 | } | ||
142 | Plugin { | ||
143 | type=netstatus | ||
144 | Config { | ||
145 | iface=wlp2s0 | ||
146 | configtool=nm-connection-editor | ||
147 | } | ||
148 | } | ||
149 | Plugin { | ||
150 | type=batt | ||
151 | Config { | ||
152 | BackgroundColor=black | ||
153 | ChargingColor1=#28f200 | ||
154 | ChargingColor2=#22cc00 | ||
155 | DischargingColor1=#ffee00 | ||
156 | DischargingColor2=#d9ca00 | ||
157 | HideIfNoBattery=0 | ||
158 | AlarmCommand=notify-send "Batterie faible" --icon=battery-caution | ||
159 | AlarmTime=5 | ||
160 | BorderWidth=0 | ||
161 | Size=1 | ||
162 | ShowExtendedInformation=0 | ||
163 | BatteryNumber=0 | ||
164 | } | ||
165 | } | ||
diff --git a/roles/lxde/files/config_files/lxpanel/launchtaskbar.cfg b/roles/lxde/files/config_files/lxpanel/launchtaskbar.cfg new file mode 100644 index 0000000..a3d0e52 --- /dev/null +++ b/roles/lxde/files/config_files/lxpanel/launchtaskbar.cfg | |||
@@ -0,0 +1,4 @@ | |||
1 | [special_cases] | ||
2 | synaptic=synaptic-pkexec | ||
3 | soffice.bin=libreoffice | ||
4 | x-terminal-emulator=lxterminal | ||
diff --git a/roles/lxde/files/config_files/lxsession-default-apps/settings.conf b/roles/lxde/files/config_files/lxsession-default-apps/settings.conf new file mode 100644 index 0000000..62314cf --- /dev/null +++ b/roles/lxde/files/config_files/lxsession-default-apps/settings.conf | |||
@@ -0,0 +1,45 @@ | |||
1 | [Mime] | ||
2 | webbrowser/available= | ||
3 | email/available= | ||
4 | file_manager/available= | ||
5 | screensaver/available= | ||
6 | composite_manager/available= | ||
7 | desktop_manager/available= | ||
8 | power_manager/available= | ||
9 | polkit/available= | ||
10 | im/available= | ||
11 | widget/available= | ||
12 | terminal_manager/available= | ||
13 | audio_player/available= | ||
14 | video_player/available= | ||
15 | pdf_reader/available= | ||
16 | image_display/available= | ||
17 | text_editor/available= | ||
18 | archive/available= | ||
19 | spreadsheet/available= | ||
20 | bittorent/available= | ||
21 | document/available= | ||
22 | burn/available= | ||
23 | tasks/available= | ||
24 | webbrowser/installed=Firefox,/usr/lib/firefox/firefox,firefox,/usr/share/applications/firefox.desktop,; | ||
25 | email/installed= | ||
26 | file_manager/installed=Gestionnaire de fichiers PCManFM,pcmanfm,system-file-manager,/usr/share/applications/pcmanfm.desktop,; | ||
27 | screensaver/installed= | ||
28 | composite_manager/installed= | ||
29 | desktop_manager/installed=Personnaliser l'apparence,lxappearance,preferences-desktop-theme,/usr/share/applications/lxappearance.desktop,;Paramètres de la session de bureau,lxsession-edit,preferences-desktop,/usr/share/applications/lxsession-edit.desktop,;Applications préférées,libfm-pref-apps,preferences-desktop,/usr/share/applications/libfm-pref-apps.desktop,;Setup Hot Keys,lxhotkey,preferences-desktop-keyboard,/usr/share/applications/lxhotkey-gtk.desktop,;Préférences du bureau,pcmanfm,user-desktop,/usr/share/applications/pcmanfm-desktop-pref.desktop,;Applications par défaut pour LXSession,lxsession-default-apps,preferences-desktop,/usr/share/applications/lxsession-default-apps.desktop,; | ||
30 | power_manager/installed= | ||
31 | polkit/installed= | ||
32 | im/installed= | ||
33 | widget/installed= | ||
34 | terminal_manager/installed=LXTerminal,lxterminal,lxterminal,/usr/share/applications/lxterminal.desktop,; | ||
35 | audio_player/installed=Lecteur multimédia VLC,/usr/bin/vlc,vlc,/usr/share/applications/vlc.desktop,;LXMusic simple music player,lxmusic,lxmusic,/usr/share/applications/lxmusic.desktop,;Qt V4L2 test Utility,qv4l2,qv4l2,/usr/share/applications/qv4l2.desktop,;MPlayer Media Player,mplayer,mplayer,/usr/share/applications/mplayer.desktop,;Contrôle du volume PulseAudio,pavucontrol,multimedia-volume-control,/usr/share/applications/pavucontrol.desktop,;GTK Youtube Viewer,gtk-youtube-viewer,gtk-youtube-viewer,/usr/share/applications/gtk-youtube-viewer.desktop,; | ||
36 | video_player/installed=Lecteur multimédia VLC,/usr/bin/vlc,vlc,/usr/share/applications/vlc.desktop,;LXMusic simple music player,lxmusic,lxmusic,/usr/share/applications/lxmusic.desktop,;Qt V4L2 test Utility,qv4l2,qv4l2,/usr/share/applications/qv4l2.desktop,;MPlayer Media Player,mplayer,mplayer,/usr/share/applications/mplayer.desktop,;Contrôle du volume PulseAudio,pavucontrol,multimedia-volume-control,/usr/share/applications/pavucontrol.desktop,;GTK Youtube Viewer,gtk-youtube-viewer,gtk-youtube-viewer,/usr/share/applications/gtk-youtube-viewer.desktop,; | ||
37 | pdf_reader/installed=Visionneur d'images,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;Visionneur de documents,evince,org.gnome.Evince,/usr/share/applications/org.gnome.Evince.desktop,;Aperçu avant impression,evince-previewer,document-print-preview,/usr/share/applications/org.gnome.Evince-previewer.desktop,; | ||
38 | image_display/installed=Visionneur d'images,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;Visionneur de documents,evince,org.gnome.Evince,/usr/share/applications/org.gnome.Evince.desktop,;Aperçu avant impression,evince-previewer,document-print-preview,/usr/share/applications/org.gnome.Evince-previewer.desktop,; | ||
39 | text_editor/installed=Vim,vim,gvim,/usr/share/applications/vim.desktop,; | ||
40 | archive/installed= | ||
41 | spreadsheet/installed= | ||
42 | bittorent/installed= | ||
43 | document/installed= | ||
44 | burn/installed= | ||
45 | tasks/installed=Gestionnaire des tâches,lxtask,utilities-system-monitor,/usr/share/applications/lxtask.desktop,; | ||
diff --git a/roles/lxde/files/config_files/lxsession/LXDE/autostart b/roles/lxde/files/config_files/lxsession/LXDE/autostart new file mode 100755 index 0000000..d8f2e23 --- /dev/null +++ b/roles/lxde/files/config_files/lxsession/LXDE/autostart | |||
@@ -0,0 +1,3 @@ | |||
1 | @lxpanel --profile LXDE | ||
2 | @pcmanfm --desktop --profile LXDE | ||
3 | @xscreensaver -no-splash | ||
diff --git a/roles/lxde/files/config_files/lxsession/LXDE/desktop.conf b/roles/lxde/files/config_files/lxsession/LXDE/desktop.conf new file mode 100644 index 0000000..171f6b4 --- /dev/null +++ b/roles/lxde/files/config_files/lxsession/LXDE/desktop.conf | |||
@@ -0,0 +1,54 @@ | |||
1 | [Session] | ||
2 | window_manager=openbox-lxde | ||
3 | disable_autostart=no | ||
4 | polkit/command=lxpolkit | ||
5 | clipboard/command=lxclipboard | ||
6 | xsettings_manager/command=build-in | ||
7 | proxy_manager/command=build-in | ||
8 | keyring/command= | ||
9 | quit_manager/command=lxsession-logout | ||
10 | lock_manager/command=lxlock | ||
11 | terminal_manager/command=lxterminal | ||
12 | quit_manager/image=/usr/share/lxde/images/logout-banner.png | ||
13 | quit_manager/layout=top | ||
14 | webbrowser/command=/usr/lib/firefox/firefox | ||
15 | tasks/command=lxtask | ||
16 | pdf_reader/command=evince | ||
17 | text_editor/command=vim | ||
18 | |||
19 | [GTK] | ||
20 | sNet/ThemeName=Adwaita | ||
21 | sNet/IconThemeName=nuoveXT2 | ||
22 | sGtk/FontName=Sans 10 | ||
23 | iGtk/ToolbarStyle=3 | ||
24 | iGtk/ButtonImages=1 | ||
25 | iGtk/MenuImages=1 | ||
26 | iGtk/CursorThemeSize=18 | ||
27 | iXft/Antialias=1 | ||
28 | iXft/Hinting=1 | ||
29 | sXft/HintStyle=hintslight | ||
30 | sXft/RGBA=rgb | ||
31 | iNet/EnableEventSounds=1 | ||
32 | iNet/EnableInputFeedbackSounds=1 | ||
33 | sGtk/ColorScheme= | ||
34 | iGtk/ToolbarIconSize=3 | ||
35 | sGtk/CursorThemeName=DMZ-White | ||
36 | |||
37 | [Mouse] | ||
38 | AccFactor=20 | ||
39 | AccThreshold=10 | ||
40 | LeftHanded=0 | ||
41 | |||
42 | [Keyboard] | ||
43 | Delay=500 | ||
44 | Interval=30 | ||
45 | Beep=1 | ||
46 | |||
47 | [State] | ||
48 | guess_default=true | ||
49 | |||
50 | [Dbus] | ||
51 | lxde=true | ||
52 | |||
53 | [Environment] | ||
54 | menu_prefix=lxde- | ||
diff --git a/roles/lxde/files/config_files/lxterminal/lxterminal.conf b/roles/lxde/files/config_files/lxterminal/lxterminal.conf new file mode 100644 index 0000000..e572e20 --- /dev/null +++ b/roles/lxde/files/config_files/lxterminal/lxterminal.conf | |||
@@ -0,0 +1,53 @@ | |||
1 | [general] | ||
2 | fontname=Monospace 10 | ||
3 | selchars=-A-Za-z0-9,./?%&#:_ | ||
4 | scrollback=1000 | ||
5 | bgcolor=rgb(0,0,0) | ||
6 | fgcolor=rgb(170,170,170) | ||
7 | palette_color_0=rgb(0,0,0) | ||
8 | palette_color_1=rgb(170,0,0) | ||
9 | palette_color_2=rgb(0,170,0) | ||
10 | palette_color_3=rgb(170,85,0) | ||
11 | palette_color_4=rgb(0,0,170) | ||
12 | palette_color_5=rgb(170,0,170) | ||
13 | palette_color_6=rgb(0,170,170) | ||
14 | palette_color_7=rgb(170,170,170) | ||
15 | palette_color_8=rgb(85,85,85) | ||
16 | palette_color_9=rgb(255,85,85) | ||
17 | palette_color_10=rgb(85,255,85) | ||
18 | palette_color_11=rgb(255,255,85) | ||
19 | palette_color_12=rgb(85,85,255) | ||
20 | palette_color_13=rgb(255,85,255) | ||
21 | palette_color_14=rgb(85,255,255) | ||
22 | palette_color_15=rgb(255,255,255) | ||
23 | color_preset=VGA | ||
24 | disallowbold=false | ||
25 | cursorblinks=false | ||
26 | cursorunderline=false | ||
27 | audiblebell=false | ||
28 | tabpos=top | ||
29 | geometry_columns=80 | ||
30 | geometry_rows=24 | ||
31 | hidescrollbar=true | ||
32 | hidemenubar=false | ||
33 | hideclosebutton=false | ||
34 | hidepointer=false | ||
35 | disablef10=true | ||
36 | disablealt=true | ||
37 | disableconfirm=false | ||
38 | |||
39 | [shortcut] | ||
40 | new_window_accel=<Primary><Shift>n | ||
41 | new_tab_accel=<Primary><Shift>t | ||
42 | close_tab_accel=<Primary><Shift>w | ||
43 | close_window_accel=<Primary><Shift>q | ||
44 | copy_accel=<Primary><Shift>c | ||
45 | paste_accel=<Primary><Shift>v | ||
46 | name_tab_accel=<Primary><Shift>i | ||
47 | previous_tab_accel=<Primary>Page_Up | ||
48 | next_tab_accel=<Primary>Page_Down | ||
49 | move_tab_left_accel=<Primary><Shift>Page_Up | ||
50 | move_tab_right_accel=<Primary><Shift>Page_Down | ||
51 | zoom_in_accel=<Primary><Shift>plus | ||
52 | zoom_out_accel=<Primary><Shift>underscore | ||
53 | zoom_reset_accel=<Primary><Shift>parenright | ||
diff --git a/roles/lxde/files/config_files/openbox/lxde-rc.xml b/roles/lxde/files/config_files/openbox/lxde-rc.xml new file mode 100644 index 0000000..5003f15 --- /dev/null +++ b/roles/lxde/files/config_files/openbox/lxde-rc.xml | |||
@@ -0,0 +1,696 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!-- Do not edit this file, it will be overwritten on install. | ||
3 | Copy the file to $HOME/.config/openbox/ instead. --> | ||
4 | <openbox_config xmlns='http://openbox.org/3.4/rc'> | ||
5 | <resistance> | ||
6 | <strength>10</strength> | ||
7 | <screen_edge_strength>20</screen_edge_strength> | ||
8 | </resistance> | ||
9 | <focus> | ||
10 | <focusNew>yes</focusNew> | ||
11 | <!-- always try to focus new windows when they appear. other rules do | ||
12 | apply --> | ||
13 | <followMouse>no</followMouse> | ||
14 | <!-- move focus to a window when you move the mouse into it --> | ||
15 | <focusLast>yes</focusLast> | ||
16 | <!-- focus the last used window when changing desktops, instead of the one | ||
17 | under the mouse pointer. when followMouse is enabled --> | ||
18 | <underMouse>no</underMouse> | ||
19 | <!-- move focus under the mouse, even when the mouse is not moving --> | ||
20 | <focusDelay>200</focusDelay> | ||
21 | <!-- when followMouse is enabled, the mouse must be inside the window for | ||
22 | this many milliseconds (1000 = 1 sec) before moving focus to it --> | ||
23 | <raiseOnFocus>no</raiseOnFocus> | ||
24 | </focus> | ||
25 | <!-- when followMouse is enabled, and a window is given focus by moving the | ||
26 | mouse into it, also raise the window --> | ||
27 | <placement> | ||
28 | <policy>Smart</policy> | ||
29 | <!-- 'Smart' or 'UnderMouse' --> | ||
30 | <center>yes</center> | ||
31 | <!-- whether to place windows in the center of the free area found or | ||
32 | the top left corner --> | ||
33 | <monitor>Any</monitor> | ||
34 | </placement> | ||
35 | <!-- with Smart placement on a multi-monitor system, try to place new windows | ||
36 | on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where | ||
37 | the active window is --> | ||
38 | <theme> | ||
39 | <name>Onyx</name> | ||
40 | <titleLayout>NLIMC</titleLayout> | ||
41 | <!-- available characters are NDSLIMC, each can occur at most once. | ||
42 | N: window icon | ||
43 | L: window label (AKA title). | ||
44 | I: iconify | ||
45 | M: maximize | ||
46 | C: close | ||
47 | S: shade (roll up/down) | ||
48 | D: omnipresent (on all desktops). | ||
49 | --> | ||
50 | <keepBorder>yes</keepBorder> | ||
51 | <animateIconify>yes</animateIconify> | ||
52 | <font place='ActiveWindow'> | ||
53 | <name>sans</name> | ||
54 | <size>10</size> | ||
55 | <!-- font size in points --> | ||
56 | <weight>bold</weight> | ||
57 | <!-- 'bold' or 'normal' --> | ||
58 | <slant>normal</slant> | ||
59 | </font> | ||
60 | <!-- 'italic' or 'normal' --> | ||
61 | <font place='InactiveWindow'> | ||
62 | <name>sans</name> | ||
63 | <size>10</size> | ||
64 | <!-- font size in points --> | ||
65 | <weight>bold</weight> | ||
66 | <!-- 'bold' or 'normal' --> | ||
67 | <slant>normal</slant> | ||
68 | </font> | ||
69 | <!-- 'italic' or 'normal' --> | ||
70 | <font place='MenuHeader'> | ||
71 | <name>sans</name> | ||
72 | <size>10</size> | ||
73 | <!-- font size in points --> | ||
74 | <weight>normal</weight> | ||
75 | <!-- 'bold' or 'normal' --> | ||
76 | <slant>normal</slant> | ||
77 | </font> | ||
78 | <!-- 'italic' or 'normal' --> | ||
79 | <font place='MenuItem'> | ||
80 | <name>sans</name> | ||
81 | <size>10</size> | ||
82 | <!-- font size in points --> | ||
83 | <weight>normal</weight> | ||
84 | <!-- 'bold' or 'normal' --> | ||
85 | <slant>normal</slant> | ||
86 | </font> | ||
87 | <!-- 'italic' or 'normal' --> | ||
88 | <font place='OnScreenDisplay'> | ||
89 | <name>sans</name> | ||
90 | <size>10</size> | ||
91 | <!-- font size in points --> | ||
92 | <weight>bold</weight> | ||
93 | <!-- 'bold' or 'normal' --> | ||
94 | <slant>normal</slant> | ||
95 | </font> | ||
96 | </theme> | ||
97 | <!-- 'italic' or 'normal' --> | ||
98 | <desktops> | ||
99 | <!-- this stuff is only used at startup, pagers allow you to change them | ||
100 | during a session | ||
101 | |||
102 | these are default values to use when other ones are not already set | ||
103 | by other applications, or saved in your session | ||
104 | |||
105 | use obconf if you want to change these without having to log out | ||
106 | and back in --> | ||
107 | <number>2</number> | ||
108 | <firstdesk>1</firstdesk> | ||
109 | <names/> | ||
110 | <!-- set names up here if you want to, like this: | ||
111 | <name>desktop 1</name> | ||
112 | <name>desktop 2</name> | ||
113 | --> | ||
114 | <popupTime>875</popupTime> | ||
115 | </desktops> | ||
116 | <!-- The number of milliseconds to show the popup for when switching | ||
117 | desktops. Set this to 0 to disable the popup. --> | ||
118 | <resize> | ||
119 | <drawContents>yes</drawContents> | ||
120 | <popupShow>Nonpixel</popupShow> | ||
121 | <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) --> | ||
122 | <popupPosition>Center</popupPosition> | ||
123 | <!-- 'Center', 'Top', or 'Fixed' --> | ||
124 | <popupFixedPosition> | ||
125 | <!-- these are used if popupPosition is set to 'Fixed' --> | ||
126 | <x>10</x> | ||
127 | <!-- positive number for distance from left edge, negative number for | ||
128 | distance from right edge, or 'Center' --> | ||
129 | <y>10</y> | ||
130 | </popupFixedPosition> | ||
131 | </resize> | ||
132 | <!-- You can reserve a portion of your screen where windows will not cover when | ||
133 | they are maximized, or when they are initially placed. | ||
134 | Many programs reserve space automatically, but you can use this in other | ||
135 | cases. --> | ||
136 | <margins> | ||
137 | <top>0</top> | ||
138 | <bottom>0</bottom> | ||
139 | <left>0</left> | ||
140 | <right>0</right> | ||
141 | </margins> | ||
142 | <dock> | ||
143 | <position>TopLeft</position> | ||
144 | <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating --> | ||
145 | <floatingX>0</floatingX> | ||
146 | <floatingY>0</floatingY> | ||
147 | <noStrut>no</noStrut> | ||
148 | <stacking>Above</stacking> | ||
149 | <!-- 'Above', 'Normal', or 'Below' --> | ||
150 | <direction>Vertical</direction> | ||
151 | <!-- 'Vertical' or 'Horizontal' --> | ||
152 | <autoHide>no</autoHide> | ||
153 | <hideDelay>300</hideDelay> | ||
154 | <!-- in milliseconds (1000 = 1 second) --> | ||
155 | <showDelay>300</showDelay> | ||
156 | <!-- in milliseconds (1000 = 1 second) --> | ||
157 | <moveButton>Middle</moveButton> | ||
158 | </dock> | ||
159 | <!-- 'Left', 'Middle', 'Right' --> | ||
160 | <keyboard> | ||
161 | <chainQuitKey>C-g</chainQuitKey> | ||
162 | <!-- Keybindings for desktop switching --> | ||
163 | <keybind key='C-A-Left'> | ||
164 | <action name='DesktopLeft'> | ||
165 | <dialog>no</dialog> | ||
166 | <wrap>no</wrap> | ||
167 | </action> | ||
168 | </keybind> | ||
169 | <keybind key='C-A-Right'> | ||
170 | <action name='DesktopRight'> | ||
171 | <dialog>no</dialog> | ||
172 | <wrap>no</wrap> | ||
173 | </action> | ||
174 | </keybind> | ||
175 | <keybind key='C-A-Up'> | ||
176 | <action name='DesktopUp'> | ||
177 | <dialog>no</dialog> | ||
178 | <wrap>no</wrap> | ||
179 | </action> | ||
180 | </keybind> | ||
181 | <keybind key='C-A-Down'> | ||
182 | <action name='DesktopDown'> | ||
183 | <dialog>no</dialog> | ||
184 | <wrap>no</wrap> | ||
185 | </action> | ||
186 | </keybind> | ||
187 | <keybind key='S-A-Left'> | ||
188 | <action name='SendToDesktopLeft'> | ||
189 | <dialog>no</dialog> | ||
190 | <wrap>no</wrap> | ||
191 | </action> | ||
192 | </keybind> | ||
193 | <keybind key='S-A-Right'> | ||
194 | <action name='SendToDesktopRight'> | ||
195 | <dialog>no</dialog> | ||
196 | <wrap>no</wrap> | ||
197 | </action> | ||
198 | </keybind> | ||
199 | <keybind key='S-A-Up'> | ||
200 | <action name='SendToDesktopUp'> | ||
201 | <dialog>no</dialog> | ||
202 | <wrap>no</wrap> | ||
203 | </action> | ||
204 | </keybind> | ||
205 | <keybind key='S-A-Down'> | ||
206 | <action name='SendToDesktopDown'> | ||
207 | <dialog>no</dialog> | ||
208 | <wrap>no</wrap> | ||
209 | </action> | ||
210 | </keybind> | ||
211 | <keybind key='W-F1'> | ||
212 | <action name='Desktop'> | ||
213 | <desktop>1</desktop> | ||
214 | </action> | ||
215 | </keybind> | ||
216 | <keybind key='W-F2'> | ||
217 | <action name='Desktop'> | ||
218 | <desktop>2</desktop> | ||
219 | </action> | ||
220 | </keybind> | ||
221 | <keybind key='W-F3'> | ||
222 | <action name='Desktop'> | ||
223 | <desktop>3</desktop> | ||
224 | </action> | ||
225 | </keybind> | ||
226 | <keybind key='W-F4'> | ||
227 | <action name='Desktop'> | ||
228 | <desktop>4</desktop> | ||
229 | </action> | ||
230 | </keybind> | ||
231 | <keybind key='W-d'> | ||
232 | <action name='ToggleShowDesktop'/> | ||
233 | </keybind> | ||
234 | <keybind key='C-A-d'> | ||
235 | <action name='ToggleShowDesktop'/> | ||
236 | </keybind> | ||
237 | <!-- Keybindings for windows --> | ||
238 | <keybind key='A-F4'> | ||
239 | <action name='Close'/> | ||
240 | </keybind> | ||
241 | <keybind key='A-Escape'> | ||
242 | <action name='Lower'/> | ||
243 | <action name='FocusToBottom'/> | ||
244 | <action name='Unfocus'/> | ||
245 | </keybind> | ||
246 | <keybind key='A-space'> | ||
247 | <action name='ShowMenu'> | ||
248 | <menu>client-menu</menu> | ||
249 | </action> | ||
250 | </keybind> | ||
251 | <!-- Keybindings for window switching --> | ||
252 | <keybind key='A-Tab'> | ||
253 | <action name='NextWindow'/> | ||
254 | </keybind> | ||
255 | <keybind key='A-S-Tab'> | ||
256 | <action name='PreviousWindow'/> | ||
257 | </keybind> | ||
258 | <keybind key='C-A-Tab'> | ||
259 | <action name='NextWindow'> | ||
260 | <panels>yes</panels> | ||
261 | <desktop>yes</desktop> | ||
262 | </action> | ||
263 | </keybind> | ||
264 | <!-- Keybindings for running applications --> | ||
265 | <keybind key='W-e'> | ||
266 | <action name='Execute'> | ||
267 | <startupnotify> | ||
268 | <enabled>true</enabled> | ||
269 | <name>PCManFM</name> | ||
270 | </startupnotify> | ||
271 | <command>pcmanfm</command> | ||
272 | </action> | ||
273 | </keybind> | ||
274 | <!-- Keybindings for finding files --> | ||
275 | <keybind key='W-f'> | ||
276 | <action name='Execute'> | ||
277 | <command>pcmanfm --find-files</command> | ||
278 | </action> | ||
279 | </keybind> | ||
280 | <!-- eybindings for LXPanel --> | ||
281 | <keybind key='W-p'> | ||
282 | <action name='Execute'> | ||
283 | <command>lxpanelctl run</command> | ||
284 | </action> | ||
285 | </keybind> | ||
286 | <keybind key='A-F11'> | ||
287 | <action name='ToggleFullscreen'/> | ||
288 | </keybind> | ||
289 | <!-- Launch Task Manager with Ctrl+Alt+Del --> | ||
290 | <keybind key='A-C-Delete'> | ||
291 | <action name='Execute'> | ||
292 | <command>lxtask</command> | ||
293 | </action> | ||
294 | </keybind> | ||
295 | <!-- Launch LXRandR when Fn+Screen is pressed --> | ||
296 | <keybind key='XF86Display'> | ||
297 | <action name='Execute'> | ||
298 | <command>lxrandr</command> | ||
299 | </action> | ||
300 | </keybind> | ||
301 | <keybind key='XF86MonBrightnessUp'> | ||
302 | <action name='Execute'> | ||
303 | <command>xbacklight -inc 10</command> | ||
304 | </action> | ||
305 | </keybind> | ||
306 | <keybind key='XF86MonBrightnessDown'> | ||
307 | <action name='Execute'> | ||
308 | <command>xbacklight -dec 10</command> | ||
309 | </action> | ||
310 | </keybind> | ||
311 | <keybind key='A-C-l'> | ||
312 | <action name='Execute'> | ||
313 | <command>slock</command> | ||
314 | </action> | ||
315 | </keybind> | ||
316 | <keybind key='XF86Tools'> | ||
317 | <action name='Execute'> | ||
318 | <command>xset dpms force off</command> | ||
319 | </action> | ||
320 | </keybind> | ||
321 | <keybind key='XF86AudioRaiseVolume'> | ||
322 | <action name='Execute'> | ||
323 | <command>bash -c "pamixer --allow-boost -u -i 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] && echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i ' ' -a Openbox-volume -t 1000 -u $color > $v"</command> | ||
324 | </action> | ||
325 | </keybind> | ||
326 | <keybind key='XF86AudioLowerVolume'> | ||
327 | <action name='Execute'> | ||
328 | <command>bash -c "pamixer --allow-boost -u -d 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] && echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i ' ' -a Openbox-volume -t 1000 -u $color > $v"</command> | ||
329 | </action> | ||
330 | </keybind> | ||
331 | <keybind key='XF86AudioMute'> | ||
332 | <action name='Execute'> | ||
333 | <command>bash -c "v=$HOME/.cache/dunstify_volume; vol=$([ `pamixer -t ; pamixer --get-mute` = \"false\" ] && echo on || echo off); dunstify -r $(($(cat $v))) -p 'Volume '$vol -i ' ' -a Openbox-mute -t 1000 > $v"</command> | ||
334 | </action> | ||
335 | </keybind> | ||
336 | <keybind key='W-Print'> | ||
337 | <action name='Execute'> | ||
338 | <command>scrot "%Y-%m-%d_%H_%M_%S.png" -e 'mv $f ~'</command> | ||
339 | </action> | ||
340 | </keybind> | ||
341 | <keybind key='S-Print'> | ||
342 | <action name='Execute'> | ||
343 | <command>scrot -s "%Y-%m-%d_%H_%M_%S.png" -e 'mv $f ~'</command> | ||
344 | </action> | ||
345 | </keybind> | ||
346 | </keyboard> | ||
347 | <mouse> | ||
348 | <dragThreshold>8</dragThreshold> | ||
349 | <!-- number of pixels the mouse must move before a drag begins --> | ||
350 | <doubleClickTime>200</doubleClickTime> | ||
351 | <!-- in milliseconds (1000 = 1 second) --> | ||
352 | <screenEdgeWarpTime>400</screenEdgeWarpTime> | ||
353 | <!-- Time before changing desktops when the pointer touches the edge of the | ||
354 | screen while moving a window, in milliseconds (1000 = 1 second). | ||
355 | Set this to 0 to disable warping --> | ||
356 | <context name='Frame'> | ||
357 | <mousebind button='A-Left' action='Press'> | ||
358 | <action name='Focus'/> | ||
359 | <action name='Raise'/> | ||
360 | </mousebind> | ||
361 | <mousebind button='A-Left' action='Click'> | ||
362 | <action name='Unshade'/> | ||
363 | </mousebind> | ||
364 | <mousebind button='A-Left' action='Drag'> | ||
365 | <action name='Move'/> | ||
366 | </mousebind> | ||
367 | <mousebind button='A-Right' action='Press'> | ||
368 | <action name='Focus'/> | ||
369 | <action name='Raise'/> | ||
370 | <action name='Unshade'/> | ||
371 | </mousebind> | ||
372 | <mousebind button='A-Right' action='Drag'> | ||
373 | <action name='Resize'/> | ||
374 | </mousebind> | ||
375 | <mousebind button='A-Middle' action='Press'> | ||
376 | <action name='Lower'/> | ||
377 | <action name='FocusToBottom'/> | ||
378 | <action name='Unfocus'/> | ||
379 | </mousebind> | ||
380 | <mousebind button='A-Up' action='Click'> | ||
381 | <action name='DesktopPrevious'/> | ||
382 | </mousebind> | ||
383 | <mousebind button='A-Down' action='Click'> | ||
384 | <action name='DesktopNext'/> | ||
385 | </mousebind> | ||
386 | <mousebind button='C-A-Up' action='Click'> | ||
387 | <action name='DesktopPrevious'/> | ||
388 | </mousebind> | ||
389 | <mousebind button='C-A-Down' action='Click'> | ||
390 | <action name='DesktopNext'/> | ||
391 | </mousebind> | ||
392 | <mousebind button='A-S-Up' action='Click'> | ||
393 | <action name='SendToDesktopPrevious'/> | ||
394 | </mousebind> | ||
395 | <mousebind button='A-S-Down' action='Click'> | ||
396 | <action name='SendToDesktopNext'/> | ||
397 | </mousebind> | ||
398 | </context> | ||
399 | <context name='Titlebar'> | ||
400 | <mousebind button='Left' action='Press'> | ||
401 | <action name='Focus'/> | ||
402 | <action name='Raise'/> | ||
403 | </mousebind> | ||
404 | <mousebind button='Left' action='Drag'> | ||
405 | <action name='Move'/> | ||
406 | </mousebind> | ||
407 | <mousebind button='Left' action='DoubleClick'> | ||
408 | <action name='ToggleMaximizeFull'/> | ||
409 | </mousebind> | ||
410 | <mousebind button='Middle' action='Press'> | ||
411 | <action name='Lower'/> | ||
412 | <action name='FocusToBottom'/> | ||
413 | <action name='Unfocus'/> | ||
414 | </mousebind> | ||
415 | <mousebind button='Up' action='Click'> | ||
416 | <action name='Shade'/> | ||
417 | <action name='FocusToBottom'/> | ||
418 | <action name='Unfocus'/> | ||
419 | <action name='Lower'/> | ||
420 | </mousebind> | ||
421 | <mousebind button='Down' action='Click'> | ||
422 | <action name='Unshade'/> | ||
423 | <action name='Raise'/> | ||
424 | </mousebind> | ||
425 | <mousebind button='Right' action='Press'> | ||
426 | <action name='Focus'/> | ||
427 | <action name='Raise'/> | ||
428 | <action name='ShowMenu'> | ||
429 | <menu>client-menu</menu> | ||
430 | </action> | ||
431 | </mousebind> | ||
432 | </context> | ||
433 | <context name='Top'> | ||
434 | <mousebind button='Left' action='Press'> | ||
435 | <action name='Focus'/> | ||
436 | <action name='Raise'/> | ||
437 | <action name='Unshade'/> | ||
438 | </mousebind> | ||
439 | <mousebind button='Left' action='Drag'> | ||
440 | <action name='Resize'> | ||
441 | <edge>top</edge> | ||
442 | </action> | ||
443 | </mousebind> | ||
444 | </context> | ||
445 | <context name='Left'> | ||
446 | <mousebind button='Left' action='Press'> | ||
447 | <action name='Focus'/> | ||
448 | <action name='Raise'/> | ||
449 | </mousebind> | ||
450 | <mousebind button='Left' action='Drag'> | ||
451 | <action name='Resize'> | ||
452 | <edge>left</edge> | ||
453 | </action> | ||
454 | </mousebind> | ||
455 | </context> | ||
456 | <context name='Right'> | ||
457 | <mousebind button='Left' action='Press'> | ||
458 | <action name='Focus'/> | ||
459 | <action name='Raise'/> | ||
460 | </mousebind> | ||
461 | <mousebind button='Left' action='Drag'> | ||
462 | <action name='Resize'> | ||
463 | <edge>right</edge> | ||
464 | </action> | ||
465 | </mousebind> | ||
466 | </context> | ||
467 | <context name='Bottom'> | ||
468 | <mousebind button='Left' action='Press'> | ||
469 | <action name='Focus'/> | ||
470 | <action name='Raise'/> | ||
471 | </mousebind> | ||
472 | <mousebind button='Left' action='Drag'> | ||
473 | <action name='Resize'> | ||
474 | <edge>bottom</edge> | ||
475 | </action> | ||
476 | </mousebind> | ||
477 | <mousebind button='Middle' action='Press'> | ||
478 | <action name='Lower'/> | ||
479 | <action name='FocusToBottom'/> | ||
480 | <action name='Unfocus'/> | ||
481 | </mousebind> | ||
482 | <mousebind button='Right' action='Press'> | ||
483 | <action name='Focus'/> | ||
484 | <action name='Raise'/> | ||
485 | <action name='ShowMenu'> | ||
486 | <menu>client-menu</menu> | ||
487 | </action> | ||
488 | </mousebind> | ||
489 | </context> | ||
490 | <context name='BLCorner'> | ||
491 | <mousebind button='Left' action='Press'> | ||
492 | <action name='Focus'/> | ||
493 | <action name='Raise'/> | ||
494 | </mousebind> | ||
495 | <mousebind button='Left' action='Drag'> | ||
496 | <action name='Resize'/> | ||
497 | </mousebind> | ||
498 | </context> | ||
499 | <context name='BRCorner'> | ||
500 | <mousebind button='Left' action='Press'> | ||
501 | <action name='Focus'/> | ||
502 | <action name='Raise'/> | ||
503 | </mousebind> | ||
504 | <mousebind button='Left' action='Drag'> | ||
505 | <action name='Resize'/> | ||
506 | </mousebind> | ||
507 | </context> | ||
508 | <context name='TLCorner'> | ||
509 | <mousebind button='Left' action='Press'> | ||
510 | <action name='Focus'/> | ||
511 | <action name='Raise'/> | ||
512 | <action name='Unshade'/> | ||
513 | </mousebind> | ||
514 | <mousebind button='Left' action='Drag'> | ||
515 | <action name='Resize'/> | ||
516 | </mousebind> | ||
517 | </context> | ||
518 | <context name='TRCorner'> | ||
519 | <mousebind button='Left' action='Press'> | ||
520 | <action name='Focus'/> | ||
521 | <action name='Raise'/> | ||
522 | <action name='Unshade'/> | ||
523 | </mousebind> | ||
524 | <mousebind button='Left' action='Drag'> | ||
525 | <action name='Resize'/> | ||
526 | </mousebind> | ||
527 | </context> | ||
528 | <context name='Client'> | ||
529 | <mousebind button='Left' action='Press'> | ||
530 | <action name='Focus'/> | ||
531 | <action name='Raise'/> | ||
532 | </mousebind> | ||
533 | <mousebind button='Middle' action='Press'> | ||
534 | <action name='Focus'/> | ||
535 | <action name='Raise'/> | ||
536 | </mousebind> | ||
537 | <mousebind button='Right' action='Press'> | ||
538 | <action name='Focus'/> | ||
539 | <action name='Raise'/> | ||
540 | </mousebind> | ||
541 | </context> | ||
542 | <context name='Icon'> | ||
543 | <mousebind button='Left' action='Press'> | ||
544 | <action name='Focus'/> | ||
545 | <action name='Raise'/> | ||
546 | <action name='Unshade'/> | ||
547 | <action name='ShowMenu'> | ||
548 | <menu>client-menu</menu> | ||
549 | </action> | ||
550 | </mousebind> | ||
551 | <mousebind button='Right' action='Press'> | ||
552 | <action name='Focus'/> | ||
553 | <action name='Raise'/> | ||
554 | <action name='ShowMenu'> | ||
555 | <menu>client-menu</menu> | ||
556 | </action> | ||
557 | </mousebind> | ||
558 | </context> | ||
559 | <context name='AllDesktops'> | ||
560 | <mousebind button='Left' action='Press'> | ||
561 | <action name='Focus'/> | ||
562 | <action name='Raise'/> | ||
563 | <action name='Unshade'/> | ||
564 | </mousebind> | ||
565 | <mousebind button='Left' action='Click'> | ||
566 | <action name='ToggleOmnipresent'/> | ||
567 | </mousebind> | ||
568 | </context> | ||
569 | <context name='Shade'> | ||
570 | <mousebind button='Left' action='Press'> | ||
571 | <action name='Focus'/> | ||
572 | <action name='Raise'/> | ||
573 | </mousebind> | ||
574 | <mousebind button='Left' action='Click'> | ||
575 | <action name='ToggleShade'/> | ||
576 | </mousebind> | ||
577 | </context> | ||
578 | <context name='Iconify'> | ||
579 | <mousebind button='Left' action='Press'> | ||
580 | <action name='Focus'/> | ||
581 | <action name='Raise'/> | ||
582 | </mousebind> | ||
583 | <mousebind button='Left' action='Click'> | ||
584 | <action name='Iconify'/> | ||
585 | </mousebind> | ||
586 | </context> | ||
587 | <context name='Maximize'> | ||
588 | <mousebind button='Left' action='Press'> | ||
589 | <action name='Focus'/> | ||
590 | <action name='Raise'/> | ||
591 | <action name='Unshade'/> | ||
592 | </mousebind> | ||
593 | <mousebind button='Middle' action='Press'> | ||
594 | <action name='Focus'/> | ||
595 | <action name='Raise'/> | ||
596 | <action name='Unshade'/> | ||
597 | </mousebind> | ||
598 | <mousebind button='Right' action='Press'> | ||
599 | <action name='Focus'/> | ||
600 | <action name='Raise'/> | ||
601 | <action name='Unshade'/> | ||
602 | </mousebind> | ||
603 | <mousebind button='Left' action='Click'> | ||
604 | <action name='ToggleMaximizeFull'/> | ||
605 | </mousebind> | ||
606 | <mousebind button='Middle' action='Click'> | ||
607 | <action name='ToggleMaximizeVert'/> | ||
608 | </mousebind> | ||
609 | <mousebind button='Right' action='Click'> | ||
610 | <action name='ToggleMaximizeHorz'/> | ||
611 | </mousebind> | ||
612 | </context> | ||
613 | <context name='Close'> | ||
614 | <mousebind button='Left' action='Press'> | ||
615 | <action name='Focus'/> | ||
616 | <action name='Raise'/> | ||
617 | <action name='Unshade'/> | ||
618 | </mousebind> | ||
619 | <mousebind button='Left' action='Click'> | ||
620 | <action name='Close'/> | ||
621 | </mousebind> | ||
622 | </context> | ||
623 | <context name='Desktop'> | ||
624 | <mousebind button='Up' action='Click'> | ||
625 | <action name='DesktopPrevious'/> | ||
626 | </mousebind> | ||
627 | <mousebind button='Down' action='Click'> | ||
628 | <action name='DesktopNext'/> | ||
629 | </mousebind> | ||
630 | <mousebind button='A-Up' action='Click'> | ||
631 | <action name='DesktopPrevious'/> | ||
632 | </mousebind> | ||
633 | <mousebind button='A-Down' action='Click'> | ||
634 | <action name='DesktopNext'/> | ||
635 | </mousebind> | ||
636 | <mousebind button='C-A-Up' action='Click'> | ||
637 | <action name='DesktopPrevious'/> | ||
638 | </mousebind> | ||
639 | <mousebind button='C-A-Down' action='Click'> | ||
640 | <action name='DesktopNext'/> | ||
641 | </mousebind> | ||
642 | <mousebind button='Left' action='Press'> | ||
643 | <action name='Focus'/> | ||
644 | <action name='Raise'/> | ||
645 | </mousebind> | ||
646 | <mousebind button='Right' action='Press'> | ||
647 | <action name='Focus'/> | ||
648 | <action name='Raise'/> | ||
649 | </mousebind> | ||
650 | </context> | ||
651 | <context name='Root'> | ||
652 | <!-- Menus --> | ||
653 | <mousebind button='Middle' action='Press'> | ||
654 | <action name='ShowMenu'> | ||
655 | <menu>client-list-combined-menu</menu> | ||
656 | </action> | ||
657 | </mousebind> | ||
658 | <mousebind button='Right' action='Press'> | ||
659 | <action name='ShowMenu'> | ||
660 | <menu>root-menu</menu> | ||
661 | </action> | ||
662 | </mousebind> | ||
663 | </context> | ||
664 | <context name='MoveResize'> | ||
665 | <mousebind button='Up' action='Click'> | ||
666 | <action name='DesktopPrevious'/> | ||
667 | </mousebind> | ||
668 | <mousebind button='Down' action='Click'> | ||
669 | <action name='DesktopNext'/> | ||
670 | </mousebind> | ||
671 | <mousebind button='A-Up' action='Click'> | ||
672 | <action name='DesktopPrevious'/> | ||
673 | </mousebind> | ||
674 | <mousebind button='A-Down' action='Click'> | ||
675 | <action name='DesktopNext'/> | ||
676 | </mousebind> | ||
677 | </context> | ||
678 | </mouse> | ||
679 | <menu> | ||
680 | <!-- default menu file (or custom one in $HOME/.config/openbox/) --> | ||
681 | <file>/usr/share/lxde/openbox/menu.xml</file> | ||
682 | <hideDelay>200</hideDelay> | ||
683 | <!-- if a press-release lasts longer than this setting (in milliseconds), the | ||
684 | menu is hidden again --> | ||
685 | <middle>no</middle> | ||
686 | <!-- center submenus vertically about the parent entry --> | ||
687 | <submenuShowDelay>100</submenuShowDelay> | ||
688 | <!-- this one is easy, time to delay before showing a submenu after hovering | ||
689 | over the parent entry --> | ||
690 | <applicationIcons>yes</applicationIcons> | ||
691 | <!-- controls if icons appear in the client-list-(combined-)menu --> | ||
692 | <manageDesktops>yes</manageDesktops> | ||
693 | </menu> | ||
694 | <!-- show the manage desktops section in the client-list-(combined-)menu --> | ||
695 | <applications/> | ||
696 | </openbox_config> \ No newline at end of file | ||
diff --git a/roles/lxde/files/config_files/pcmanfm/LXDE/desktop-items-0.conf b/roles/lxde/files/config_files/pcmanfm/LXDE/desktop-items-0.conf new file mode 100644 index 0000000..088cce4 --- /dev/null +++ b/roles/lxde/files/config_files/pcmanfm/LXDE/desktop-items-0.conf | |||
@@ -0,0 +1,15 @@ | |||
1 | [*] | ||
2 | wallpaper_mode=crop | ||
3 | wallpaper_common=1 | ||
4 | wallpaper=/usr/share/lxde/wallpapers/lxde_blue.jpg | ||
5 | desktop_bg=#000000 | ||
6 | desktop_fg=#ffffff | ||
7 | desktop_shadow=#000000 | ||
8 | desktop_font=Sans 12 | ||
9 | folder= | ||
10 | show_wm_menu=0 | ||
11 | sort=mtime;ascending; | ||
12 | show_documents=0 | ||
13 | show_trash=1 | ||
14 | show_mounts=0 | ||
15 | |||
diff --git a/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf b/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf new file mode 100644 index 0000000..facaa64 --- /dev/null +++ b/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf | |||
@@ -0,0 +1,27 @@ | |||
1 | [config] | ||
2 | bm_open_method=0 | ||
3 | |||
4 | [volume] | ||
5 | mount_on_startup=1 | ||
6 | mount_removable=1 | ||
7 | autorun=1 | ||
8 | |||
9 | [ui] | ||
10 | always_show_tabs=0 | ||
11 | max_tab_chars=32 | ||
12 | win_width=640 | ||
13 | win_height=480 | ||
14 | maximized=1 | ||
15 | splitter_pos=275 | ||
16 | media_in_new_tab=1 | ||
17 | desktop_folder_new_win=0 | ||
18 | change_tab_on_drop=1 | ||
19 | close_on_unmount=0 | ||
20 | focus_previous=0 | ||
21 | side_pane_mode=places | ||
22 | view_mode=list | ||
23 | show_hidden=1 | ||
24 | sort=name;ascending; | ||
25 | toolbar=newtab;navigation;home; | ||
26 | show_statusbar=1 | ||
27 | pathbar_mode_buttons=0 | ||
diff --git a/roles/lxde/files/config_files/xinitrc b/roles/lxde/files/config_files/xinitrc new file mode 100644 index 0000000..2e77554 --- /dev/null +++ b/roles/lxde/files/config_files/xinitrc | |||
@@ -0,0 +1,15 @@ | |||
1 | ### replace /etc/X11/xinit/xinitrc and /etc/X11/xinit/xinitrc.d/* | ||
2 | dbus-update-activation-environment DISPLAY XAUTHORITY | ||
3 | ### | ||
4 | |||
5 | setxkbmap -layout fr -variant oss -model pc104 -option compose:menu -option compose:paus -option nbsp:level3 -option shift:breaks_caps -option terminate:ctrl_alt_bksp | ||
6 | |||
7 | #### The rest replaces a `exec startlxde` (To avoid the dbus-update-activation-environment) | ||
8 | # Enable GTK+2 integration for OpenOffice.org, if available. | ||
9 | export SAL_USE_VCLPLUGIN=gtk | ||
10 | |||
11 | export XDG_MENU_PREFIX="lxde-" | ||
12 | export XDG_CURRENT_DESKTOP="LXDE" | ||
13 | |||
14 | # Start the LXDE session | ||
15 | exec /usr/bin/lxsession -s LXDE -e LXDE | ||
diff --git a/roles/lxde/tasks/main.yml b/roles/lxde/tasks/main.yml new file mode 100644 index 0000000..b48b5e5 --- /dev/null +++ b/roles/lxde/tasks/main.yml | |||
@@ -0,0 +1,11 @@ | |||
1 | --- | ||
2 | - name: Import graphical | ||
3 | include_role: | ||
4 | name: graphical | ||
5 | - name: Config files | ||
6 | synchronize: | ||
7 | recursive: yes | ||
8 | archive: no | ||
9 | checksum: yes | ||
10 | src: config_files/ | ||
11 | dest: /$XDG_CONFIG_HOME/ | ||
diff --git a/roles/programming/haskell/files/ghci.conf b/roles/programming/haskell/files/ghci.conf new file mode 100644 index 0000000..1de7ca1 --- /dev/null +++ b/roles/programming/haskell/files/ghci.conf | |||
@@ -0,0 +1,2 @@ | |||
1 | :set prompt "λ " | ||
2 | :set -XOverloadedStrings | ||
diff --git a/roles/programming/haskell/files/stack/config.yaml b/roles/programming/haskell/files/stack/config.yaml new file mode 100644 index 0000000..3bf2f91 --- /dev/null +++ b/roles/programming/haskell/files/stack/config.yaml | |||
@@ -0,0 +1,14 @@ | |||
1 | # This file contains default non-project-specific settings for 'stack', used | ||
2 | # in all projects. For more information about stack's configuration, see | ||
3 | # http://docs.haskellstack.org/en/stable/yaml_configuration/ | ||
4 | |||
5 | # The following parameters are used by "stack new" to automatically fill fields | ||
6 | # in the cabal config. We recommend uncommenting them and filling them out if | ||
7 | # you intend to use 'stack new'. | ||
8 | # See https://docs.haskellstack.org/en/stable/yaml_configuration/#templates | ||
9 | templates: | ||
10 | scm-init: git | ||
11 | params: | ||
12 | author-name: Ismaël Bouya | ||
13 | author-email: ismael.bouya@fretlink.com | ||
14 | github-username: ismaelbouyaf | ||
diff --git a/roles/programming/haskell/files/stack/global-project/README.txt b/roles/programming/haskell/files/stack/global-project/README.txt new file mode 100644 index 0000000..646fa5f --- /dev/null +++ b/roles/programming/haskell/files/stack/global-project/README.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | This is the implicit global project, which is used only when 'stack' is run | ||
2 | outside of a real project. | ||
diff --git a/roles/programming/haskell/files/stack/global-project/stack.yaml b/roles/programming/haskell/files/stack/global-project/stack.yaml new file mode 100644 index 0000000..e034f58 --- /dev/null +++ b/roles/programming/haskell/files/stack/global-project/stack.yaml | |||
@@ -0,0 +1,10 @@ | |||
1 | # This is the implicit global project's config file, which is only used when | ||
2 | # 'stack' is run outside of a real project. Settings here do _not_ act as | ||
3 | # defaults for all projects. To change stack's default settings, edit | ||
4 | # '/home/ismael/.local/share/stack/config.yaml' instead. | ||
5 | # | ||
6 | # For more information about stack's configuration, see | ||
7 | # http://docs.haskellstack.org/en/stable/yaml_configuration/ | ||
8 | # | ||
9 | packages: [] | ||
10 | resolver: lts-11.15 | ||
diff --git a/roles/programming/haskell/tasks/main.yml b/roles/programming/haskell/tasks/main.yml new file mode 100644 index 0000000..cd6654b --- /dev/null +++ b/roles/programming/haskell/tasks/main.yml | |||
@@ -0,0 +1,13 @@ | |||
1 | --- | ||
2 | - name: GHC config file | ||
3 | copy: | ||
4 | src: ghci.conf | ||
5 | dest: $HOME/.ghc/ | ||
6 | - name: Stack config files | ||
7 | synchronize: | ||
8 | recursive: yes | ||
9 | archive: no | ||
10 | checksum: yes | ||
11 | src: stack/ | ||
12 | dest: /$XDG_DATA_HOME/stack/ | ||
13 | |||
diff --git a/roles/programming/nodejs/files/npmrc b/roles/programming/nodejs/files/npmrc new file mode 100644 index 0000000..5dc76c3 --- /dev/null +++ b/roles/programming/nodejs/files/npmrc | |||
@@ -0,0 +1,3 @@ | |||
1 | cache=${XDG_CACHE_HOME}/npm | ||
2 | tmp=${XDG_RUNTIME_DIR}/npm | ||
3 | init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js | ||
diff --git a/roles/programming/nodejs/tasks/main.yml b/roles/programming/nodejs/tasks/main.yml new file mode 100644 index 0000000..fcf7421 --- /dev/null +++ b/roles/programming/nodejs/tasks/main.yml | |||
@@ -0,0 +1,5 @@ | |||
1 | --- | ||
2 | - name: config file | ||
3 | copy: | ||
4 | src: npmrc | ||
5 | dest: $XDG_CONFIG_HOME/npm/ | ||
diff --git a/roles/programming/python/files/startup_script.py b/roles/programming/python/files/startup_script.py new file mode 100644 index 0000000..403afe5 --- /dev/null +++ b/roles/programming/python/files/startup_script.py | |||
@@ -0,0 +1,52 @@ | |||
1 | import sys as sys_ | ||
2 | |||
3 | # Adapted from /usr/lib/python3.7/site.py # enablerlcompleter | ||
4 | def register_readline(): | ||
5 | import os | ||
6 | import atexit | ||
7 | try: | ||
8 | import readline | ||
9 | import rlcompleter | ||
10 | except ImportError: | ||
11 | return | ||
12 | |||
13 | # Reading the initialization (config) file may not be enough to set a | ||
14 | # completion key, so we set one first and then read the file. | ||
15 | readline_doc = getattr(readline, '__doc__', '') | ||
16 | if readline_doc is not None and 'libedit' in readline_doc: | ||
17 | readline.parse_and_bind('bind ^I rl_complete') | ||
18 | else: | ||
19 | readline.parse_and_bind('tab: complete') | ||
20 | |||
21 | try: | ||
22 | readline.read_init_file() | ||
23 | except OSError: | ||
24 | # An OSError here could have many causes, but the most likely one | ||
25 | # is that there's no .inputrc file (or .editrc file in the case of | ||
26 | # Mac OS X + libedit) in the expected location. In that case, we | ||
27 | # want to ignore the exception. | ||
28 | pass | ||
29 | |||
30 | if readline.get_current_history_length() == 0: | ||
31 | # If no history was loaded, default to .python_history. | ||
32 | # The guard is necessary to avoid doubling history size at | ||
33 | # each interpreter exit when readline was already configured | ||
34 | # through a PYTHONSTARTUP hook, see: | ||
35 | # http://bugs.python.org/issue5845#msg198636 | ||
36 | environ = os.environ.get("XDG_STATE_HOME") or os.environ.get("XDG_DATA_HOME") | ||
37 | if environ is not None: | ||
38 | if not os.path.exists(os.path.join(environ, "python")): | ||
39 | os.mkdir(os.path.join(environ, "python")) | ||
40 | history = os.path.join(environ, "python", "history") | ||
41 | else: | ||
42 | history = os.path.join(os.path.expanduser('~'), | ||
43 | '.python_history') | ||
44 | try: | ||
45 | readline.read_history_file(history) | ||
46 | except OSError: | ||
47 | pass | ||
48 | atexit.register(readline.write_history_file, history) | ||
49 | |||
50 | sys_.__interactivehook__ = register_readline | ||
51 | |||
52 | del sys_ | ||
diff --git a/roles/programming/python/tasks/main.yml b/roles/programming/python/tasks/main.yml new file mode 100644 index 0000000..db67584 --- /dev/null +++ b/roles/programming/python/tasks/main.yml | |||
@@ -0,0 +1,5 @@ | |||
1 | --- | ||
2 | - name: Config file | ||
3 | copy: | ||
4 | src: startup_script.py | ||
5 | dest: $XDG_CONFIG_HOME/python/ | ||
diff --git a/roles/shell/bash/files/bashrc b/roles/shell/bash/files/bashrc new file mode 100644 index 0000000..28d0af9 --- /dev/null +++ b/roles/shell/bash/files/bashrc | |||
@@ -0,0 +1 @@ | |||
coucou | |||
diff --git a/roles/shell/bash/tasks/main.yml b/roles/shell/bash/tasks/main.yml new file mode 100644 index 0000000..d74421a --- /dev/null +++ b/roles/shell/bash/tasks/main.yml | |||
@@ -0,0 +1,17 @@ | |||
1 | --- | ||
2 | - name: Add bashrc config | ||
3 | template: | ||
4 | src: bashrc.j2 | ||
5 | dest: $HOME/.bashrc | ||
6 | - name: Add bash_profile config | ||
7 | template: | ||
8 | src: bash_profile.j2 | ||
9 | dest: $HOME/.bash_profile | ||
10 | - name: Create bash state dir | ||
11 | file: | ||
12 | path: $XDG_STATE_HOME/bash | ||
13 | state: directory | ||
14 | - name: Create less state dir | ||
15 | file: | ||
16 | path: $XDG_STATE_HOME/less | ||
17 | state: directory | ||
diff --git a/roles/shell/bash/templates/bash_profile.j2 b/roles/shell/bash/templates/bash_profile.j2 new file mode 100644 index 0000000..06210fa --- /dev/null +++ b/roles/shell/bash/templates/bash_profile.j2 | |||
@@ -0,0 +1,9 @@ | |||
1 | # Some variables are loaded via pam (see .config/pam_environment) | ||
2 | |||
3 | [[ -f ~/.bashrc ]] && . ~/.bashrc | ||
4 | {% if "graphical_vt" in features.get(profile, []) %} | ||
5 | |||
6 | if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then | ||
7 | exec startx $XDG_CONFIG_HOME/xinitrc > $XDG_STATE_HOME/xsession_errors 2>&1 | ||
8 | fi | ||
9 | {% endif %} | ||
diff --git a/roles/shell/bash/templates/bashrc.j2 b/roles/shell/bash/templates/bashrc.j2 new file mode 100644 index 0000000..2285d2b --- /dev/null +++ b/roles/shell/bash/templates/bashrc.j2 | |||
@@ -0,0 +1,95 @@ | |||
1 | # | ||
2 | # ~/.bashrc | ||
3 | # | ||
4 | |||
5 | if [ -n "$HOME/.local/bin" ]; then | ||
6 | PATH="$HOME/.local/bin:$PATH" | ||
7 | fi | ||
8 | |||
9 | # If not running interactively, don't do anything | ||
10 | [[ $- != *i* ]] && return | ||
11 | |||
12 | export GPG_TTY=$(tty) | ||
13 | export HISTFILE="$XDG_STATE_HOME/bash/history" | ||
14 | |||
15 | alias vi=vim | ||
16 | alias ls='ls --color=auto -F -T 0' | ||
17 | alias tmux='tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf' | ||
18 | |||
19 | alias grep='grep --color=auto' | ||
20 | alias fgrep='fgrep --color=auto' | ||
21 | alias egrep='egrep --color=auto' | ||
22 | |||
23 | alias sudo="sudo " | ||
24 | alias mv="mv -i" | ||
25 | alias cp="cp -i" | ||
26 | alias rm="rm -i" | ||
27 | alias psp="pstree -aUp $USER" | ||
28 | alias dotdrop="dotdrop --cfg $XDG_CONFIG_HOME/dotdrop/config.yaml" | ||
29 | |||
30 | {% if role.get(profile) == "fretlink" %} | ||
31 | ##### Some Fretlink aliases | ||
32 | alias getDump='s3cmd -c <(pass show Travail/Fretlink/S3) get ' | ||
33 | |||
34 | function vpn() { | ||
35 | TMPFILE=$(mktemp /tmp/openvpn.XXXXXX) | ||
36 | pass show Travail/Fretlink/OpenVPN >> $TMPFILE | ||
37 | sudo openvpn $TMPFILE | ||
38 | rm -f $TMPFILE | ||
39 | } | ||
40 | |||
41 | function dev_prompt() { | ||
42 | if [ -n "$FRETLINK_ENV" ]; then | ||
43 | echo "{$FRETLINK_ENV} " | ||
44 | fi | ||
45 | } | ||
46 | ##### /Fretlink | ||
47 | {% endif %} | ||
48 | |||
49 | # Non-printable chars need to be wrapped by \[ ... \] otherwise bash | ||
50 | # will wrongly count the size of the prompt and glitch when going | ||
51 | # through history | ||
52 | function git_prompt_color() { | ||
53 | git diff --quiet 2>/dev/null && git diff --cached --quiet 2>/dev/null | ||
54 | gitstatus=$? | ||
55 | if [ "$gitstatus" -gt 0 ]; then | ||
56 | av=$'\033[01;31m' | ||
57 | else | ||
58 | av=$'\033[01;34m' | ||
59 | fi | ||
60 | echo "$av" | ||
61 | } | ||
62 | |||
63 | function git_prompt() { | ||
64 | gitinfo=$(git branch 2>/dev/null | grep "^*" | cut -c3-); | ||
65 | git diff --quiet 2>/dev/null && git diff --cached --quiet 2>/dev/null | ||
66 | gitstatus=$? | ||
67 | gitlsfiles=$(git ls-files . 2>/dev/null | wc -l); | ||
68 | if [ "$gitinfo" -a "$gitlsfiles" -gt 0 ]; then | ||
69 | echo -e "($gitinfo) " | ||
70 | fi | ||
71 | } | ||
72 | |||
73 | function error_code() { | ||
74 | ret=$? | ||
75 | if [[ $ret != 0 ]]; then | ||
76 | echo "$ret " | ||
77 | fi | ||
78 | } | ||
79 | |||
80 | function running_jobs() { | ||
81 | ret=$(jobs | wc -l) | ||
82 | if [[ $ret != 0 ]]; then | ||
83 | echo "[$ret] " | ||
84 | fi | ||
85 | } | ||
86 | |||
87 | {% if role.get(profile) == "fretlink" %} | ||
88 | PS1='\[\033[01;31m\]$(error_code)\[\033[00;00m\]$(running_jobs)\[\033[01;32m\]$(dev_prompt)\[$(git_prompt_color)\]$(git_prompt)\[\033[00;32m\]\u@\h\[\033[94m\] \w \$\[\033[00m\] ' | ||
89 | {% else %} | ||
90 | PS1='\[\033[01;31m\]$(error_code)\[\033[00;00m\]$(running_jobs)\[$(git_prompt_color)\]$(git_prompt)\[\033[00;32m\]\u@\h\[\033[94m\] \w \$\[\033[00m\] ' | ||
91 | {% endif %} | ||
92 | |||
93 | {% if "nodejs" in features.get(profile, []) %} | ||
94 | source /usr/share/nvm/init-nvm.sh | ||
95 | {% endif %} | ||
diff --git a/roles/tools/files/mplayer b/roles/tools/files/mplayer new file mode 100644 index 0000000..21cf775 --- /dev/null +++ b/roles/tools/files/mplayer | |||
@@ -0,0 +1,3 @@ | |||
1 | # Write your default config options here! | ||
2 | |||
3 | |||
diff --git a/roles/tools/files/psqlrc b/roles/tools/files/psqlrc new file mode 100644 index 0000000..c51f46e --- /dev/null +++ b/roles/tools/files/psqlrc | |||
@@ -0,0 +1,5 @@ | |||
1 | \pset null ¤ | ||
2 | \set COMP_KEYWORD_CASE upper | ||
3 | \x auto | ||
4 | \set HISTSIZ -1 | ||
5 | \set ECHO_HIDDEN on | ||
diff --git a/roles/tools/files/remind/commands/work b/roles/tools/files/remind/commands/work new file mode 100644 index 0000000..edc937d --- /dev/null +++ b/roles/tools/files/remind/commands/work | |||
@@ -0,0 +1 @@ | |||
REM Mon Tue Wed Thu Fri AT 09:00 MSG Ne pas oublier de démarrer le time tracking ! | |||
diff --git a/roles/tools/files/remind/remind@.service b/roles/tools/files/remind/remind@.service new file mode 100644 index 0000000..3fc221d --- /dev/null +++ b/roles/tools/files/remind/remind@.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Remind daemon | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=simple | ||
7 | ExecStart=/usr/bin/remind -z60 -k'/usr/bin/dunstify -t 0 -a Tracking %%s' %h/.config/remind/%i | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=default.target | ||
diff --git a/roles/tools/files/vimrc b/roles/tools/files/vimrc new file mode 100644 index 0000000..6de0f1c --- /dev/null +++ b/roles/tools/files/vimrc | |||
@@ -0,0 +1,309 @@ | |||
1 | " ---------- Init, config, backup --------------- | ||
2 | " Respect XDG directories (more below for cache) | ||
3 | set viminfo+='1000,n$XDG_STATE_HOME/vim/viminfo | ||
4 | set runtimepath=$XDG_DATA_HOME/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$XDG_DATA_HOME/vim/after | ||
5 | |||
6 | " Run :PlugInstall after adding plugins there | ||
7 | call plug#begin(expand($XDG_DATA_HOME) . '/vim/plugged') | ||
8 | |||
9 | Plug 'vim-scripts/cecutil' | ||
10 | Plug 'vim-scripts/LargeFile' | ||
11 | Plug 'vim-scripts/Align' | ||
12 | Plug 'vim-scripts/AutoAlign' | ||
13 | Plug 'jamessan/vim-gnupg' | ||
14 | Plug 'vim-scripts/taglist.vim' | ||
15 | Plug 'chrisbra/csv.vim' | ||
16 | Plug 'mustache/vim-mustache-handlebars' | ||
17 | Plug 'cakebaker/scss-syntax.vim' | ||
18 | Plug 'tpope/vim-bundler' | ||
19 | Plug 'tpope/vim-rails' | ||
20 | Plug 'ledger/vim-ledger' | ||
21 | Plug 'beyondwords/vim-twig' | ||
22 | Plug 'scrooloose/nerdtree' | ||
23 | Plug 'kien/ctrlp.vim' | ||
24 | Plug 'rodjek/vim-puppet' | ||
25 | Plug 'szw/vim-tags' | ||
26 | Plug 'neomutt/neomutt.vim' | ||
27 | Plug 'kchmck/vim-coffee-script' | ||
28 | Plug 'digitaltoad/vim-pug' | ||
29 | Plug 'vim-scripts/slapd.vim' | ||
30 | Plug 'vimwiki/vimwiki', { 'branch': 'dev' } | ||
31 | Plug 'vim-vdebug/vdebug' | ||
32 | Plug 'tpope/vim-fugitive' | ||
33 | Plug 'tomlion/vim-solidity' | ||
34 | Plug 'chrisbra/SudoEdit.vim' | ||
35 | Plug 'Chiel92/vim-autoformat' | ||
36 | Plug 'pearofducks/ansible-vim' | ||
37 | Plug 'juliosueiras/vim-terraform-completion' | ||
38 | |||
39 | call plug#end() | ||
40 | |||
41 | " Charge automatiquement les ftplugins/*.vim selon le type de fichier | ||
42 | filetype plugin on | ||
43 | " Charge automatiquement les indent/*.vim selon le type de fichier | ||
44 | filetype indent on | ||
45 | |||
46 | " Pour que vim garde une copie de sauvegarde des fichiers modifiés. | ||
47 | set backup | ||
48 | """ Copied from /usr/share/vim/vimfiles/archlinux.vim | ||
49 | " Move temporary files to a secure location to protect against CVE-2017-1000382 | ||
50 | if exists('$XDG_CACHE_HOME') | ||
51 | let &g:directory=$XDG_CACHE_HOME | ||
52 | else | ||
53 | let &g:directory=$HOME . '/.cache' | ||
54 | endif | ||
55 | let g:ctrlp_cache_dir=&g:directory . '/vim/ctrlp//' | ||
56 | let &g:undodir=&g:directory . '/vim/undo//' | ||
57 | let &g:backupdir=&g:directory . '/vim/backup//' | ||
58 | let g:vim_tags_cache_dir = &g:directory . '/vim/ctags//' | ||
59 | let &g:directory.='/vim/swap//' | ||
60 | " Create directories if they doesn't exist | ||
61 | if ! isdirectory($XDG_STATE_HOME . '/vim') | ||
62 | silent! call mkdir($XDG_STATE_HOME . '/vim') | ||
63 | endif | ||
64 | if ! isdirectory(expand(&g:directory)) | ||
65 | silent! call mkdir(expand(&g:directory), 'p', 0700) | ||
66 | endif | ||
67 | if ! isdirectory(expand(&g:backupdir)) | ||
68 | silent! call mkdir(expand(&g:backupdir), 'p', 0700) | ||
69 | endif | ||
70 | if ! isdirectory(expand(&g:undodir)) | ||
71 | silent! call mkdir(expand(&g:undodir), 'p', 0700) | ||
72 | endif | ||
73 | if ! isdirectory(expand(g:vim_tags_cache_dir)) | ||
74 | silent! call mkdir(expand(g:vim_tags_cache_dir), 'p', 0700) | ||
75 | endif | ||
76 | """ /Copied from /usr/share/vim/vimfiles/archlinux.vim | ||
77 | |||
78 | |||
79 | " Ne pas sauver un backup spécial pour les fichiers réseau | ||
80 | let g:netrw_dirhistmax = 0 | ||
81 | |||
82 | " ---------- Mappings --------------------------- | ||
83 | " map : Normal, Visual, Select, Operator-pending | ||
84 | " map! : Insert and Command-line | ||
85 | |||
86 | " Le BackSpace fonctionne aussi en mode normal. | ||
87 | map <BS> X | ||
88 | |||
89 | " Les Control-flèches | ||
90 | map <ESC>[1;5A <C-Up> | ||
91 | map! <ESC>[1;5A <C-Up> | ||
92 | map <ESC>[1;5B <C-Down> | ||
93 | map! <ESC>[1;5B <C-Down> | ||
94 | map <ESC>[1;5C <C-Right> | ||
95 | map! <ESC>[1;5C <C-Right> | ||
96 | map <ESC>[1;5D <C-Left> | ||
97 | map! <ESC>[1;5D <C-Left> | ||
98 | |||
99 | map <S-Up> { | ||
100 | map! <S-Up> <C-O>{ | ||
101 | map <S-Down> } | ||
102 | map! <S-Down> <C-O>} | ||
103 | |||
104 | |||
105 | " ---------- Comportement à la frappe ----------- | ||
106 | " <BS> passe à travers l'indentation, les fins de ligne et le début du "insert" | ||
107 | set backspace=indent,eol,start | ||
108 | |||
109 | " '<BS>e écrit un é (sinon : ctrl+K ' e) | ||
110 | " set digraph | ||
111 | |||
112 | " La taille d'une ligne, pour la frappe au kilomètre. | ||
113 | " Permet 4 niveaux de 'citation' pour les mails/forum | ||
114 | set textwidth=72 | ||
115 | " set textwidth=80 | ||
116 | |||
117 | " Les touches qui font passer à la ligne suivante/précédente. backspace (b), | ||
118 | " espace (s), flèches (<,>,[,]). | ||
119 | set whichwrap=b,s,<,>,[,] | ||
120 | |||
121 | " Ne pas mettre deux espaces après la ponctuation quand on "join" deux lignes | ||
122 | set nojoinspaces | ||
123 | |||
124 | " Quand on tape un ), vim montre furtivement le ( correspondant. | ||
125 | set showmatch | ||
126 | |||
127 | " Les options de formatage. | ||
128 | set formatoptions=tcq2 | ||
129 | |||
130 | |||
131 | " ---------- Recherche -------------------------- | ||
132 | " Pour voir tous les matchs d'une recherche | ||
133 | set hlsearch | ||
134 | |||
135 | " Pour que les matchs soient affichés pendant que vous tapez le mot recherché | ||
136 | set incsearch | ||
137 | |||
138 | " On ignore la casse des caractères dans les recherches de chaînes en | ||
139 | " minuscules; par contre, dès qu'une lettre est en majuscule, on tient compte | ||
140 | " de la casse de toute la chaîne. | ||
141 | " Pendant la recherche : \c pour ignorer quand même, \C pour case-sensitive | ||
142 | set ignorecase | ||
143 | set smartcase | ||
144 | |||
145 | |||
146 | " ---------- Fichiers --------------------------- | ||
147 | " Pour une complétion automatique des noms de fichiers | ||
148 | set wildmenu | ||
149 | |||
150 | " La façon dont la complétion présente les choix. | ||
151 | set wildmode=longest,list:longest,full | ||
152 | |||
153 | " La complétion automatique ignore les fichiers suivants. | ||
154 | set suffixes=.bak.o.aux.dvi.log.toc.tof | ||
155 | |||
156 | |||
157 | " ---------- Buffers ---------------------------- | ||
158 | " On veut pouvoir rendre invisible un buffer | ||
159 | set hidden | ||
160 | |||
161 | " Pour éviter de trop ralentir en faisant défiler le texte pendant l'exécution | ||
162 | " des macros. | ||
163 | set lazyredraw | ||
164 | |||
165 | |||
166 | " ----------- Interactions ---------------------- | ||
167 | " On affiche en permanence les numéros de ligne et de colonne. | ||
168 | set ruler | ||
169 | |||
170 | " Pour ne pas se faire bipper tout le temps. | ||
171 | set noerrorbells | ||
172 | set visualbell t_vb= | ||
173 | |||
174 | " Pour avoir des messages de vim qui tiennent sur une seule ligne, ce | ||
175 | " qui évite d'avoir à presser «Enter» pour voir les messages suivants. | ||
176 | set shortmess=filnrxoOt | ||
177 | |||
178 | " Quand on tape une commande complexe en mode normal, vim affiche ce que l'on | ||
179 | " a déjà tapé | ||
180 | set showcmd | ||
181 | |||
182 | |||
183 | " ------------ Indentations --------------------- | ||
184 | " Conserve l'indentation | ||
185 | set autoindent | ||
186 | |||
187 | " Remplace les <Tab> par des espaces | ||
188 | set expandtab | ||
189 | |||
190 | " Nombre d'espaces | ||
191 | set shiftwidth=2 | ||
192 | set softtabstop=2 | ||
193 | |||
194 | " Pour que l'indentation ajuste sur un multiple de 'shiftwidth'. | ||
195 | set shiftround | ||
196 | |||
197 | " ------------ Folding -------------------------- | ||
198 | set foldmethod=indent | ||
199 | set foldnestmax=10 | ||
200 | set nofoldenable | ||
201 | set foldlevel=0 | ||
202 | set foldlevelstart=0 | ||
203 | |||
204 | |||
205 | " ------------ Auto-commandes ------------------- | ||
206 | " On commence par enlever toutes les autocommandes avant de les définir | ||
207 | " (pour le cas où ce fichier serait lu plusieurs fois.) | ||
208 | autocmd! | ||
209 | |||
210 | autocmd BufRead,BufNewFile mutt*[0-9] set nobackup nowritebackup | ||
211 | autocmd BufRead,BufNewFile .article.* set filetype=mail nobackup | ||
212 | |||
213 | " ledger | ||
214 | " Don't load ftplugin for ledger | ||
215 | " autocmd BufReadPre,BufNewFile *ledger* let b:did_ftplugin = 1 | ||
216 | autocmd FileType ledger set textwidth=0 | ||
217 | let g:ledger_main = '~/.ledger/perso' | ||
218 | |||
219 | autocmd FileType puppet set textwidth=0 | ||
220 | |||
221 | " ----------- Coloration syntaxique ------------- | ||
222 | syntax enable | ||
223 | |||
224 | highlight Comment term=none ctermfg=darkCyan cterm=none | ||
225 | highlight Constant term=underline ctermfg=Blue cterm=none | ||
226 | highlight Error term=reverse ctermfg=White ctermbg=Red cterm=none | ||
227 | highlight Identifier term=none ctermfg=Green cterm=none | ||
228 | highlight IncSearch term=reverse ctermfg=Blue ctermbg=White | ||
229 | highlight Operator term=none ctermfg=darkGray cterm=bold | ||
230 | highlight PreProc term=underline ctermfg=Magenta cterm=none | ||
231 | highlight Search term=reverse cterm=reverse | ||
232 | highlight Special term=bold ctermfg=Blue cterm=bold | ||
233 | highlight Statement term=bold ctermfg=Red cterm=none | ||
234 | highlight Todo term=standout ctermfg=White ctermbg=Green cterm=bold | ||
235 | highlight Type term=bold ctermfg=Brown cterm=none | ||
236 | |||
237 | highlight link Delimiter Operator | ||
238 | highlight link SpecialChar Special | ||
239 | |||
240 | " lignes "foldées" | ||
241 | highlight Folded term=standout ctermfg=White ctermbg=Blue cterm=bold | ||
242 | |||
243 | " Pour les diffs (commande vimdiff). | ||
244 | highlight DiffAdd term=bold ctermfg=Green ctermbg=none cterm=bold | ||
245 | highlight DiffChange term=bold ctermfg=Cyan ctermbg=none | ||
246 | highlight DiffDelete term=bold ctermfg=Red ctermbg=none cterm=bold | ||
247 | highlight DiffText term=standout ctermfg=White ctermbg=Cyan cterm=bold | ||
248 | |||
249 | " ------------- Fonctions, commandes, macros ---- | ||
250 | " Identer les fichiers (json, xml) | ||
251 | function PRangeFunc(command_line, syntax) range | ||
252 | if a:firstline==1 && a:lastline==line('$') | ||
253 | execute 'set filetype=' . a:syntax | ||
254 | execute 'syntax on' | ||
255 | endif | ||
256 | execute a:firstline . "," . a:lastline . '!' . a:command_line | ||
257 | endfunction | ||
258 | |||
259 | command -range=% Pjson normal <Esc>`>a<CR><Esc>mb`<i<CR><Esc>ma:'a,'b-1 call PRangeFunc('python -m json.tool', 'json')<CR> | ||
260 | command -range=% Pxml normal <Esc>`>a<CR><Esc>mb`<i<CR><Esc>ma:'a,'b-1 call PRangeFunc('xmllint --format --encode UTF8 -', 'xml')<CR> | ||
261 | command -range=% Pdeflate normal <Esc>`>a<CR><Esc>mb`<i<CR><Esc>ma:'a,'b-1 call PRangeFunc('python -c "import zlib; import sys; sys.stdout.buffer.write(zlib.decompress(sys.stdin.buffer.read()))"', '')<CR> | ||
262 | command -range=% Pinflate normal <Esc>`>a<CR><Esc>mb`<i<CR><Esc>ma:'a,'b-1 call PRangeFunc('python -c "import zlib; import sys; sys.stdout.buffer.write(zlib.compress(sys.stdin.buffer.read()))"', '')<CR> | ||
263 | command! -range=% Pastebin execute <line1> . "," . <line2> . "w !curl -F 'c=@-' https://ptpb.pw" | ||
264 | |||
265 | noremap <F3> :Autoformat<CR> | ||
266 | vmap <F8> :Pxml<CR> | ||
267 | vmap <F9> :Pjson<CR> | ||
268 | |||
269 | " gpg-encryptes files | ||
270 | let g:GPGPreferArmor=1 | ||
271 | let g:GPGDefaultRecipients=["ismael.bouya@normalesup.org"] | ||
272 | let g:GPGUsesPipes=1 | ||
273 | |||
274 | command Decrypt 1,$!gpg -d -q | ||
275 | command Encrypt 1,$!gpg -e -q --armor -r ismael.bouya@normalesup.org | ||
276 | command -range=% Runhash s/:\([_a-zA-Z0-9]\+\)\( \+\)=> \( *\)/\1:\2\3/ | ||
277 | |||
278 | function! s:DiffWithSaved() | ||
279 | let filetype=&ft | ||
280 | diffthis | ||
281 | vnew | r # | normal! 1Gdd | ||
282 | diffthis | ||
283 | exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype | ||
284 | endfunction | ||
285 | command! DiffSaved call s:DiffWithSaved() | ||
286 | |||
287 | " Load NERDTree on startup if no file were specified | ||
288 | " autocmd StdinReadPre * let s:std_in=1 | ||
289 | " autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | ||
290 | " Load NERDTree on startup | ||
291 | "autocmd VimEnter * NERDTree | wincmd p | ||
292 | let g:vim_tags_auto_generate = 1 | ||
293 | let g:vim_tags_project_tags_command = "ctags -R {OPTIONS} {DIRECTORY} 2>/dev/null" | ||
294 | map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR> | ||
295 | map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> | ||
296 | |||
297 | let g:ctrlp_extensions = ['tag', 'buffertag', 'dir', 'undo', 'line'] | ||
298 | set modeline | ||
299 | |||
300 | set grepprg=grep\ -rn\ $*\ /dev/null | ||
301 | let c_comment_strings=1 | ||
302 | if !exists(":DiffOrig") | ||
303 | command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | ||
304 | \ | wincmd p | diffthis | ||
305 | endif | ||
306 | |||
307 | set list | ||
308 | set listchars=tab:>-,trail:- | ||
309 | |||
diff --git a/roles/tools/handlers/main.yml b/roles/tools/handlers/main.yml new file mode 100644 index 0000000..a282512 --- /dev/null +++ b/roles/tools/handlers/main.yml | |||
@@ -0,0 +1,5 @@ | |||
1 | --- | ||
2 | - name: reload systemd | ||
3 | systemd: | ||
4 | daemon_reload: true | ||
5 | scope: user | ||
diff --git a/roles/tools/tasks/main.yml b/roles/tools/tasks/main.yml new file mode 100644 index 0000000..aa61aab --- /dev/null +++ b/roles/tools/tasks/main.yml | |||
@@ -0,0 +1,48 @@ | |||
1 | --- | ||
2 | - name: Import other tools | ||
3 | include_role: | ||
4 | name: "{{ item }}" | ||
5 | loop: | ||
6 | - git | ||
7 | - gnupg | ||
8 | - name: mplayer config file | ||
9 | copy: | ||
10 | src: mplayer | ||
11 | dest: $XDG_CONFIG_HOME/mplayer/config | ||
12 | - name: psql config file | ||
13 | copy: | ||
14 | src: psqlrc | ||
15 | dest: $XDG_CONFIG_HOME/psql/psqlrc | ||
16 | - name: psql history directory | ||
17 | file: | ||
18 | path: $XDG_STATE_HOME/psql | ||
19 | state: directory | ||
20 | - name: vim config file | ||
21 | register: vim_result | ||
22 | copy: | ||
23 | src: vimrc | ||
24 | dest: $XDG_CONFIG_HOME/vim/vimrc | ||
25 | - name: run PlugInstall | ||
26 | shell: vim -c PlugInstall -c qa | ||
27 | when: vim_result.changed | ||
28 | - name: tmux config file | ||
29 | template: | ||
30 | src: tmux.conf.j2 | ||
31 | dest: $XDG_CONFIG_HOME/tmux/tmux.conf | ||
32 | - name: youtube viewer config file | ||
33 | template: | ||
34 | src: youtube-viewer.conf.j2 | ||
35 | dest: $XDG_CONFIG_HOME/youtube-viewer/youtube-viewer.conf | ||
36 | - name: remind config file | ||
37 | synchronize: | ||
38 | recursive: yes | ||
39 | archive: no | ||
40 | checksum: yes | ||
41 | src: remind/commands/ | ||
42 | dest: /$XDG_CONFIG_HOME/remind/ | ||
43 | - name: remind service file | ||
44 | copy: | ||
45 | src: remind/remind@.service | ||
46 | dest: $XDG_CONFIG_HOME/systemd/user/ | ||
47 | notify: | ||
48 | - reload systemd | ||
diff --git a/roles/tools/templates/tmux.conf.j2 b/roles/tools/templates/tmux.conf.j2 new file mode 100644 index 0000000..8aad615 --- /dev/null +++ b/roles/tools/templates/tmux.conf.j2 | |||
@@ -0,0 +1,88 @@ | |||
1 | # Pour les nostalgiques de screen | ||
2 | # comme les raccourcis ne sont pas les mêmes, j'évite | ||
3 | set-option -g prefix C-a | ||
4 | unbind-key C-b | ||
5 | bind-key a send-prefix | ||
6 | |||
7 | bind-key C-d detach | ||
8 | unbind-key C-z | ||
9 | bind-key C-z resize-pane -Z | ||
10 | bind-key h switch-client -t remote | ||
11 | |||
12 | unbind-key ) | ||
13 | unbind-key ( | ||
14 | bind-key -r ( switch-client -p | ||
15 | bind-key -r ) switch-client -n | ||
16 | |||
17 | bind-key -n M-Left previous-window | ||
18 | bind-key -n M-Right next-window | ||
19 | bind-key -n M-PageDown switch-client -n | ||
20 | bind-key -n M-PageUp switch-client -p | ||
21 | |||
22 | bind-key M set-window-option monitor-activity | ||
23 | bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer; rm -f /tmp/tmux-buffer"' | ||
24 | |||
25 | bind-key C-c run-shell -b "tmux save-buffer - | xclip -i -sel clipboard" | ||
26 | bind-key C-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" | ||
27 | |||
28 | bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary" | ||
29 | bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary" | ||
30 | bind-key -T root MouseUp2Pane run-shell "tmux set-buffer \"$(xclip -o -selection primary)\"; tmux paste-buffer" | ||
31 | |||
32 | # même hack que sur screen lorsqu'on veut profiter du scroll du terminal | ||
33 | # (xterm ...) | ||
34 | set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc' | ||
35 | |||
36 | # Renumeroter les fenetres quand on en ferme une | ||
37 | set-option -g renumber-windows on | ||
38 | |||
39 | #Pour les ctrl+arrow | ||
40 | set-option -g xterm-keys on | ||
41 | |||
42 | # c'est un minimum (defaut 2000) | ||
43 | set-option -g history-limit 10000 | ||
44 | |||
45 | # lorsque j'ai encore un tmux ailleurs seule | ||
46 | # sa fenetre active réduit la taille de ma fenetre locale | ||
47 | set-window-option -g aggressive-resize on | ||
48 | |||
49 | # Pour etre alerté sur une alerte dans une autre fenêtre | ||
50 | set-option -g visual-activity off | ||
51 | set-option -g visual-bell off | ||
52 | |||
53 | # numéroter a partir de 1, pratique pour l'accès direct | ||
54 | set-option -g base-index 1 | ||
55 | |||
56 | # repercuter le contenu de la fenetre dans la barre de titre | ||
57 | # reference des string : man tmux (status-left) | ||
58 | set-option -g set-titles on | ||
59 | set-option -g set-titles-string '#H #W #T' # host window command | ||
60 | |||
61 | set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY XDG_VTNR" | ||
62 | |||
63 | set-window-option -g window-status-bell-style fg=yellow,bold,underscore | ||
64 | |||
65 | set -g default-terminal screen-256color | ||
66 | |||
67 | set -g mouse on | ||
68 | |||
69 | {% if role.get(profile) == "fretlink" %} | ||
70 | new-session -A -c "$HOME/workdir/admin-root" -s admin-root | ||
71 | send-keys "../start" C-m | ||
72 | rename-window "running" | ||
73 | new-window | ||
74 | new-session -A -c "$HOME/workdir/carrier-directory" -s carrier-directory | ||
75 | send-keys "../start" C-m | ||
76 | rename-window "running" | ||
77 | new-window | ||
78 | new-session -A -c "$HOME/workdir/notifier" -s notifier | ||
79 | send-keys "../start" C-m | ||
80 | rename-window "running" | ||
81 | new-window | ||
82 | new-session -A -c "$HOME/workdir/geodata" -s geodata | ||
83 | new-session -A -c "$HOME/workdir/app" -s app | ||
84 | send-keys "../start" C-m | ||
85 | rename-window "running" | ||
86 | new-window | ||
87 | select-window -t 1 | ||
88 | {% endif %} | ||
diff --git a/roles/tools/templates/youtube-viewer.conf.j2 b/roles/tools/templates/youtube-viewer.conf.j2 new file mode 100644 index 0000000..3107584 --- /dev/null +++ b/roles/tools/templates/youtube-viewer.conf.j2 | |||
@@ -0,0 +1,89 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | # Youtube Viewer 3.3.4 - configuration file | ||
4 | |||
5 | our $CONFIG = { | ||
6 | auto_captions => 0, | ||
7 | autohide_watched => 0, | ||
8 | cache_dir => "{{ lookup('env', 'XDG_CACHE_HOME') }}/youtube-viewer", | ||
9 | captions_dir => "/tmp", | ||
10 | clobber => 0, | ||
11 | colors => 1, | ||
12 | combine_multiple_videos => 0, | ||
13 | confirm => 0, | ||
14 | convert_cmd => "ffmpeg -i *IN* *OUT*", | ||
15 | convert_to => undef, | ||
16 | copy_caption => 0, | ||
17 | dash_mp4_audio => 1, | ||
18 | dash_support => 1, | ||
19 | debug => 0, | ||
20 | download_and_play => 0, | ||
21 | download_in_parallel => 0, | ||
22 | download_with_wget => 0, | ||
23 | downloads_dir => ".", | ||
24 | env_proxy => 1, | ||
25 | fat32safe => 0, | ||
26 | fullscreen => 0, | ||
27 | get_captions => 1, | ||
28 | get_term_width => 1, | ||
29 | highlight_color => "bold", | ||
30 | highlight_watched => 0, | ||
31 | history => 0, | ||
32 | history_file => "{{ lookup('env', 'XDG_STATE_HOME') }}/youtube-viewer/history.txt", | ||
33 | history_limit => 10000, | ||
34 | hl => "en_US", | ||
35 | http_proxy => undef, | ||
36 | interactive => 1, | ||
37 | keep_original_video => 0, | ||
38 | maxResults => 20, | ||
39 | order => undef, | ||
40 | page => 1, | ||
41 | publishedAfter => undef, | ||
42 | publishedBefore => undef, | ||
43 | regionCode => undef, | ||
44 | remove_played_file => 0, | ||
45 | resolution => "original", | ||
46 | results_fixed_width => 0, | ||
47 | results_with_colors => 0, | ||
48 | results_with_details => 0, | ||
49 | safeSearch => undef, | ||
50 | skip_if_exists => 0, | ||
51 | srt_languages => ["en", "fr"], | ||
52 | subscriptions_order => "relevance", | ||
53 | thousand_separator => ",", | ||
54 | video_filename_format => "*FTITLE*.*FORMAT*", | ||
55 | video_player_selected => "mplayer", | ||
56 | video_players => { | ||
57 | mplayer => { | ||
58 | arg => "-prefer-ipv4 -really-quiet -title *TITLE*", | ||
59 | audio => "-audiofile *AUDIO*", | ||
60 | cmd => "/usr/bin/mplayer", | ||
61 | fs => "-fs", | ||
62 | novideo => "-novideo", | ||
63 | srt => "-sub *SUB*", | ||
64 | }, | ||
65 | mpv => { | ||
66 | arg => "--really-quiet --title *TITLE* --no-ytdl", | ||
67 | audio => "--audio-file *AUDIO*", | ||
68 | cmd => "mpv", | ||
69 | fs => "--fullscreen", | ||
70 | novideo => "--no-video", | ||
71 | srt => "--sub-file *SUB*", | ||
72 | }, | ||
73 | vlc => { | ||
74 | arg => "--quiet --play-and-exit --no-video-title-show --input-title-format *TITLE*", | ||
75 | audio => "--input-slave *AUDIO*", | ||
76 | cmd => "vlc", | ||
77 | fs => "--fullscreen", | ||
78 | novideo => "--intf dummy --novideo", | ||
79 | srt => "--sub-file *SUB*", | ||
80 | }, | ||
81 | }, | ||
82 | videoCaption => undef, | ||
83 | videoDefinition => undef, | ||
84 | videoDimension => undef, | ||
85 | videoDuration => undef, | ||
86 | videoLicense => undef, | ||
87 | videoSyndicated => undef, | ||
88 | youtube_video_url => "https://www.youtube.com/watch?v=%s", | ||
89 | } | ||