]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Validation initiale
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Fri, 2 Nov 2018 16:03:49 +0000 (17:03 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Fri, 2 Nov 2018 16:03:49 +0000 (17:03 +0100)
60 files changed:
ansible.cfg [new file with mode: 0644]
hosts [new file with mode: 0644]
roles/contexts/fretlink/files/config_files/autostart/zeal.desktop [new file with mode: 0644]
roles/contexts/fretlink/files/workdir/start [new file with mode: 0755]
roles/contexts/fretlink/tasks/main.yml [new file with mode: 0644]
roles/git/files/config_files/git/templates_fretlink/hooks/pre-push [new file with mode: 0755]
roles/git/files/config_files/tig/config [new file with mode: 0644]
roles/git/tasks/main.yml [new file with mode: 0644]
roles/git/templates/config.j2 [new file with mode: 0644]
roles/gnupg/files/gnupg/gpg-agent.conf [new file with mode: 0644]
roles/gnupg/files/gnupg/gpg.conf [new file with mode: 0644]
roles/gnupg/tasks/main.yml [new file with mode: 0644]
roles/gnupg/templates/systemd/dirmngr.conf.j2 [new file with mode: 0644]
roles/gnupg/templates/systemd/gpg-agent-browser.conf.j2 [new file with mode: 0644]
roles/gnupg/templates/systemd/gpg-agent-extra.conf.j2 [new file with mode: 0644]
roles/gnupg/templates/systemd/gpg-agent-ssh.conf.j2 [new file with mode: 0644]
roles/gnupg/templates/systemd/gpg-agent.conf.j2 [new file with mode: 0644]
roles/graphical/files/config_files/autostart/redshift-gtk.desktop [new file with mode: 0644]
roles/graphical/files/config_files/dunst/dunstrc [new file with mode: 0644]
roles/graphical/files/config_files/redshift.conf [new file with mode: 0644]
roles/graphical/files/mimeapps.list [new file with mode: 0644]
roles/graphical/tasks/main.yml [new file with mode: 0644]
roles/init/tasks/main.yml [new file with mode: 0644]
roles/init/templates/pam_environment.j2 [new file with mode: 0644]
roles/lxde/files/config_files/libfm/libfm.conf [new file with mode: 0644]
roles/lxde/files/config_files/lxpanel/LXDE/config [new file with mode: 0644]
roles/lxde/files/config_files/lxpanel/LXDE/panels/panel [new file with mode: 0644]
roles/lxde/files/config_files/lxpanel/launchtaskbar.cfg [new file with mode: 0644]
roles/lxde/files/config_files/lxsession-default-apps/settings.conf [new file with mode: 0644]
roles/lxde/files/config_files/lxsession/LXDE/autostart [new file with mode: 0755]
roles/lxde/files/config_files/lxsession/LXDE/desktop.conf [new file with mode: 0644]
roles/lxde/files/config_files/lxterminal/lxterminal.conf [new file with mode: 0644]
roles/lxde/files/config_files/openbox/lxde-rc.xml [new file with mode: 0644]
roles/lxde/files/config_files/pcmanfm/LXDE/desktop-items-0.conf [new file with mode: 0644]
roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf [new file with mode: 0644]
roles/lxde/files/config_files/xinitrc [new file with mode: 0644]
roles/lxde/tasks/main.yml [new file with mode: 0644]
roles/programming/haskell/files/ghci.conf [new file with mode: 0644]
roles/programming/haskell/files/stack/config.yaml [new file with mode: 0644]
roles/programming/haskell/files/stack/global-project/README.txt [new file with mode: 0644]
roles/programming/haskell/files/stack/global-project/stack.yaml [new file with mode: 0644]
roles/programming/haskell/tasks/main.yml [new file with mode: 0644]
roles/programming/nodejs/files/npmrc [new file with mode: 0644]
roles/programming/nodejs/tasks/main.yml [new file with mode: 0644]
roles/programming/python/files/startup_script.py [new file with mode: 0644]
roles/programming/python/tasks/main.yml [new file with mode: 0644]
roles/shell/bash/files/bashrc [new file with mode: 0644]
roles/shell/bash/tasks/main.yml [new file with mode: 0644]
roles/shell/bash/templates/bash_profile.j2 [new file with mode: 0644]
roles/shell/bash/templates/bashrc.j2 [new file with mode: 0644]
roles/tools/files/mplayer [new file with mode: 0644]
roles/tools/files/psqlrc [new file with mode: 0644]
roles/tools/files/remind/commands/work [new file with mode: 0644]
roles/tools/files/remind/remind@.service [new file with mode: 0644]
roles/tools/files/vimrc [new file with mode: 0644]
roles/tools/handlers/main.yml [new file with mode: 0644]
roles/tools/tasks/main.yml [new file with mode: 0644]
roles/tools/templates/tmux.conf.j2 [new file with mode: 0644]
roles/tools/templates/youtube-viewer.conf.j2 [new file with mode: 0644]
site.yml [new file with mode: 0644]

diff --git a/ansible.cfg b/ansible.cfg
new file mode 100644 (file)
index 0000000..6824be9
--- /dev/null
@@ -0,0 +1,5 @@
+[defaults]
+inventory = ./hosts
+remote_tmp = $XDG_CACHE_HOME/ansible
+local_tmp = $XDG_CACHE_HOME/ansible
+retry_files_save_path = $XDG_CACHE_HOME/ansible
diff --git a/hosts b/hosts
new file mode 100644 (file)
index 0000000..9247795
--- /dev/null
+++ b/hosts
@@ -0,0 +1,2 @@
+[home]
+localhost ansible_connection=local
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 (file)
index 0000000..27f53b7
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Zeal
+GenericName=Documentation Browser
+Comment=Simple API documentation browser
+Exec=/usr/bin/zeal
+Icon=zeal
+Terminal=false
+Type=Application
+Categories=Development;
diff --git a/roles/contexts/fretlink/files/workdir/start b/roles/contexts/fretlink/files/workdir/start
new file mode 100755 (executable)
index 0000000..911c28d
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+APP="$1"
+
+if [ -z "$APP" ]; then
+  if [ $(dirname $(pwd)) = "$HOME/workdir" ]; then
+    APP=$(basename $(pwd))
+  else
+    echo "need an app to start"
+    exit 1
+  fi
+fi
+
+if [ "$APP" != "psql" ]; then
+  cd $HOME/workdir/$APP
+  source ../environment
+else
+  source ../environment
+  APP=psql
+fi
+
+function start_stack() {
+  stack exec $1;
+}
+
+function start_app() {
+  trap 'make stop' EXIT
+
+  if ! docker top mongo_container 2>/dev/null; then
+    docker run -d --name mongo_container -p 27017:27017 --rm -v $(pwd)/appdata:/data/db mongo:3.6
+    echo "Waiting until mongo is started"
+    sleep 10
+  fi
+
+  make start
+  make --directory=frontend/ start
+}
+
+function start_psql() {
+  export PGPASSWORD=$POSTGRESQL_ADDON_PASSWORD
+  psql -h $POSTGRESQL_ADDON_HOST -p $POSTGRESQL_ADDON_PORT -U $POSTGRESQL_ADDON_USER -d $POSTGRESQL_ADDON_DB
+}
+
+case "$APP" in
+  "psql") start_psql;;
+  "app") start_app;;
+  "admin-root") start_stack server;;
+  "carrier-directory") start_stack server;;
+  "freight") start_stack freight-server;;
+  "notifier") start_stack notifier-exe;;
+  "pricer") start_stack pricer;;
+  "toolbox") start_stack toolbox-api;;
+esac
diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml
new file mode 100644 (file)
index 0000000..e16d669
--- /dev/null
@@ -0,0 +1,36 @@
+---
+- name: Import roles
+  include_role:
+    name: "{{ item }}"
+  loop:
+    - programming/python
+    - programming/haskell
+    - programming/nodejs
+- name: Config files
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: config_files/
+    dest: /$XDG_CONFIG_HOME/
+- name: Create pm2 config dir
+  file:
+    path: $XDG_CONFIG_HOME/pm2
+    state: directory
+- name: workdir scripts
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: workdir/
+    dest: /$HOME/workdir/
+- name: chmod workdir script
+  file:
+    path: $HOME/workdir/start
+    mode: 0755
+- name: enable remind service
+  systemd:
+    state: started
+    scope: user
+    name: remind@work.service
+    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 (executable)
index 0000000..19088c9
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+set -e
+
+echo "[+] Running the linter"
+make lint
+
+exit 0
diff --git a/roles/git/files/config_files/tig/config b/roles/git/files/config_files/tig/config
new file mode 100644 (file)
index 0000000..e9cdf17
--- /dev/null
@@ -0,0 +1,19 @@
+set editor-line-number = yes
+set mouse = yes
+set mouse-scroll = 5
+set refresh-mode = auto
+set line-graphics = utf-8
+
+set pager-view-line-number = yes,interval=10
+set blame-view-line-number = yes,interval=10
+set grep-view-line-number = yes,interval=10
+set diff-view-line-number = yes,interval=10
+set log-view-line-number = yes,interval=10
+set blob-view-line-number = yes,interval=10
+set stage-view-line-number = yes,interval=10
+
+set main-view-commit-title = graph=v1,refs=yes
+set refs-view-commit-title = graph=v1,refs=yes
+set stash-view-commit-title = graph=v1,refs=yes
+
+set refs-view-ref = display=yes
diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml
new file mode 100644 (file)
index 0000000..440e178
--- /dev/null
@@ -0,0 +1,21 @@
+---
+- name: Config files
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: config_files/
+    dest: /$XDG_CONFIG_HOME/
+- name: git config file
+  template:
+    src: config.j2
+    dest: $XDG_CONFIG_HOME/git/config
+- name: Create tig state dir
+  file:
+    path: $XDG_STATE_HOME/tig
+    state: directory
+- name: Link tig state dir
+  file:
+    path: "$XDG_DATA_HOME/tig"
+    src: "$XDG_STATE_HOME/tig"
+    state: link
diff --git a/roles/git/templates/config.j2 b/roles/git/templates/config.j2
new file mode 100644 (file)
index 0000000..7182626
--- /dev/null
@@ -0,0 +1,23 @@
+[user]
+       signingkey = DC384748709D2619FF2867216D0CAFFDDB1CFE90
+{% if profile in role and role[profile] == "fretlink" %}
+       email = ismael.bouya@fretlink.com
+{% else %}
+       email = ismael.bouya@normalesup.org
+{% endif %}
+       name = Ismaël Bouya
+[commit]
+       gpgsign = true
+       verbose = true
+[push]
+       gpgSign = if-asked
+{% if profile in role and role[profile] == "fretlink" %}
+[fretlink]
+       remote-name = upstream
+{% endif %}
+[log]
+       showSignature = true
+{% if profile in role %}
+[init]
+       templateDir = ~/.config/git/templates_{{ role[profile] }}
+{% endif %}
diff --git a/roles/gnupg/files/gnupg/gpg-agent.conf b/roles/gnupg/files/gnupg/gpg-agent.conf
new file mode 100644 (file)
index 0000000..3c4e379
--- /dev/null
@@ -0,0 +1,4 @@
+pinentry-program /usr/bin/pinentry
+allow-loopback-pinentry
+enable-ssh-support
+allow-preset-passphrase
diff --git a/roles/gnupg/files/gnupg/gpg.conf b/roles/gnupg/files/gnupg/gpg.conf
new file mode 100644 (file)
index 0000000..17bc522
--- /dev/null
@@ -0,0 +1,7 @@
+# Main signing key
+default-key  DB1CFE90
+
+default-recipient-self
+encrypt-to 0326A611
+auto-key-retrieve
+no-greeting
diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml
new file mode 100644 (file)
index 0000000..8adaf69
--- /dev/null
@@ -0,0 +1,34 @@
+---
+- name: Config files
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: gnupg
+    dest: /$XDG_CONFIG_HOME/
+- name: Protect directory
+  file:
+    path: $XDG_CONFIG_HOME/gnupg
+    state: directory
+    mode: 0700
+- name: Get gnupg runtime folder name
+  shell: 'GNUPGHOME=$XDG_CONFIG_HOME/gnupg gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"'
+  register: gnupg_runtime_dir_cmd
+- name: Add systemd overrides
+  template:
+    src: "systemd/{{ item }}.conf.j2"
+    dest: "$XDG_CONFIG_HOME/systemd/user/{{ item }}.socket.d/override.conf"
+  register: results
+  loop:
+    - dirmngr
+    - gpg-agent
+    - gpg-agent-browser
+    - gpg-agent-extra
+    - gpg-agent-ssh
+- name: Restart systemd units
+  systemd:
+    daemon_reload: true
+    scope: user
+    state: restarted
+    name: "{{ item }}.socket"
+  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 (file)
index 0000000..9083ab5
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+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 (file)
index 0000000..61ddeb6
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+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 (file)
index 0000000..f34606c
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+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 (file)
index 0000000..b7cd0c2
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+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 (file)
index 0000000..666c22e
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+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 (file)
index 0000000..3fc7814
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Redshift
+GenericName=Redshift
+Exec=/usr/bin/redshift-gtk
+Icon=redshift
+Terminal=false
+Type=Application
diff --git a/roles/graphical/files/config_files/dunst/dunstrc b/roles/graphical/files/config_files/dunst/dunstrc
new file mode 100644 (file)
index 0000000..c8e55b5
--- /dev/null
@@ -0,0 +1,368 @@
+[global]
+    ### Display ###
+
+    # Which monitor should the notifications be displayed on.
+    monitor = 0
+
+    # Display notification on focused monitor.  Possible modes are:
+    #   mouse: follow mouse pointer
+    #   keyboard: follow window with keyboard focus
+    #   none: don't follow anything
+    #
+    # "keyboard" needs a window manager that exports the
+    # _NET_ACTIVE_WINDOW property.
+    # This should be the case for almost all modern window managers.
+    #
+    # If this option is set to mouse or keyboard, the monitor option
+    # will be ignored.
+    follow = mouse
+
+    # The geometry of the window:
+    #   [{width}]x{height}[+/-{x}+/-{y}]
+    # The geometry of the message window.
+    # The height is measured in number of notifications everything else
+    # in pixels.  If the width is omitted but the height is given
+    # ("-geometry x2"), the message window expands over the whole screen
+    # (dmenu-like).  If width is 0, the window expands to the longest
+    # message displayed.  A positive x is measured from the left, a
+    # negative from the right side of the screen.  Y is measured from
+    # the top and down respectively.
+    # The width can be negative.  In this case the actual width is the
+    # screen width minus the width defined in within the geometry option.
+    geometry = "300x5-30+20"
+
+    # Show how many messages are currently hidden (because of geometry).
+    indicate_hidden = yes
+
+    # Shrink window if it's smaller than the width.  Will be ignored if
+    # width is 0.
+    shrink = no
+
+    # The transparency of the window.  Range: [0; 100].
+    # This option will only work if a compositing window manager is
+    # present (e.g. xcompmgr, compiz, etc.).
+    transparency = 0
+
+    # The height of the entire notification.  If the height is smaller
+    # than the font height and padding combined, it will be raised
+    # to the font height and padding.
+    notification_height = 0
+
+    # Draw a line of "separator_height" pixel height between two
+    # notifications.
+    # Set to 0 to disable.
+    separator_height = 2
+
+    # Padding between text and separator.
+    padding = 8
+
+    # Horizontal padding.
+    horizontal_padding = 8
+
+    # Defines width in pixels of frame around the notification window.
+    # Set to 0 to disable.
+    frame_width = 3
+
+    # Defines color of the frame around the notification window.
+    frame_color = "#aaaaaa"
+
+    # Define a color for the separator.
+    # possible values are:
+    #  * auto: dunst tries to find a color fitting to the background;
+    #  * foreground: use the same color as the foreground;
+    #  * frame: use the same color as the frame;
+    #  * anything else will be interpreted as a X color.
+    separator_color = frame
+
+    # Sort messages by urgency.
+    sort = yes
+
+    # Don't remove messages, if the user is idle (no mouse or keyboard input)
+    # for longer than idle_threshold seconds.
+    # Set to 0 to disable.
+    # Transient notifications ignore this setting.
+    idle_threshold = 120
+
+    ### Text ###
+
+    font = Monospace 8
+
+    # The spacing between lines.  If the height is smaller than the
+    # font height, it will get raised to the font height.
+    line_height = 0
+
+    # Possible values are:
+    # full: Allow a small subset of html markup in notifications:
+    #        <b>bold</b>
+    #        <i>italic</i>
+    #        <s>strikethrough</s>
+    #        <u>underline</u>
+    #
+    #        For a complete reference see
+    #        <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
+    #
+    # strip: This setting is provided for compatibility with some broken
+    #        clients that send markup even though it's not enabled on the
+    #        server. Dunst will try to strip the markup but the parsing is
+    #        simplistic so using this option outside of matching rules for
+    #        specific applications *IS GREATLY DISCOURAGED*.
+    #
+    # no:    Disable markup parsing, incoming notifications will be treated as
+    #        plain text. Dunst will not advertise that it has the body-markup
+    #        capability if this is set as a global setting.
+    #
+    # It's important to note that markup inside the format option will be parsed
+    # regardless of what this is set to.
+    markup = full
+
+    # The format of the message.  Possible variables are:
+    #   %a  appname
+    #   %s  summary
+    #   %b  body
+    #   %i  iconname (including its path)
+    #   %I  iconname (without its path)
+    #   %p  progress value if set ([  0%] to [100%]) or nothing
+    #   %n  progress value if set without any extra characters
+    #   %%  Literal %
+    # Markup is allowed
+    format = "<span size='small'>%a</span>\n<b>%s</b>\n%b\n%p"
+
+    # Alignment of message text.
+    # Possible values are "left", "center" and "right".
+    alignment = left
+
+    # Show age of message if message is older than show_age_threshold
+    # seconds.
+    # Set to -1 to disable.
+    show_age_threshold = 60
+
+    # Split notifications into multiple lines if they don't fit into
+    # geometry.
+    word_wrap = yes
+
+    # When word_wrap is set to no, specify where to make an ellipsis in long lines.
+    # Possible values are "start", "middle" and "end".
+    ellipsize = middle
+
+    # Ignore newlines '\n' in notifications.
+    ignore_newline = no
+
+    # Merge multiple notifications with the same content
+    stack_duplicates = true
+
+    # Hide the count of merged notifications with the same content
+    hide_duplicate_count = false
+
+    # Display indicators for URLs (U) and actions (A).
+    show_indicators = yes
+
+    ### Icons ###
+
+    # Align icons left/right/off
+    icon_position = left
+
+    # Scale larger icons down to this size, set to 0 to disable
+    max_icon_size = 32
+
+    # Paths to default icons.
+    icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
+
+    ### History ###
+
+    # Should a notification popped up from history be sticky or timeout
+    # as if it would normally do.
+    sticky_history = yes
+
+    # Maximum amount of notifications kept in history
+    history_length = 20
+
+    ### Misc/Advanced ###
+
+    # dmenu path.
+    dmenu = /usr/bin/dmenu -p dunst:
+
+    # Browser for opening urls in context menu.
+    browser = /usr/bin/firefox -new-tab
+
+    # Always run rule-defined scripts, even if the notification is suppressed
+    always_run_script = true
+
+    # Define the title of the windows spawned by dunst
+    title = Dunst
+
+    # Define the class of the windows spawned by dunst
+    class = Dunst
+
+    # Print a notification on startup.
+    # This is mainly for error detection, since dbus (re-)starts dunst
+    # automatically after a crash.
+    startup_notification = true
+
+    # Manage dunst's desire for talking
+    # Can be one of the following values:
+    #  crit: Critical features. Dunst aborts
+    #  warn: Only non-fatal warnings
+    #  mesg: Important Messages
+    #  info: all unimportant stuff
+    # debug: all less than unimportant stuff
+    verbosity = mesg
+
+    # Define the corner radius of the notification window
+    # in pixel size. If the radius is 0, you have no rounded
+    # corners.
+    # The radius will be automatically lowered if it exceeds half of the
+    # notification height to avoid clipping text and/or icons.
+    corner_radius = 0
+
+    ### Legacy
+
+    # Use the Xinerama extension instead of RandR for multi-monitor support.
+    # This setting is provided for compatibility with older nVidia drivers that
+    # do not support RandR and using it on systems that support RandR is highly
+    # discouraged.
+    #
+    # By enabling this setting dunst will not be able to detect when a monitor
+    # is connected or disconnected which might break follow mode if the screen
+    # layout changes.
+    force_xinerama = false
+
+# Experimental features that may or may not work correctly. Do not expect them
+# to have a consistent behaviour across releases.
+[experimental]
+    # Calculate the dpi to use on a per-monitor basis.
+    # If this setting is enabled the Xft.dpi value will be ignored and instead
+    # dunst will attempt to calculate an appropriate dpi value for each monitor
+    # using the resolution and physical size. This might be useful in setups
+    # where there are multiple screens with very different dpi values.
+    per_monitor_dpi = false
+
+[shortcuts]
+
+    # Shortcuts are specified as [modifier+][modifier+]...key
+    # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
+    # "mod3" and "mod4" (windows-key).
+    # Xev might be helpful to find names for keys.
+
+    # Close notification.
+    close = ctrl+space
+
+    # Close all notifications.
+    close_all = ctrl+mod1+space
+
+    # Redisplay last message(s).
+    # On the US keyboard layout "grave" is normally above TAB and left
+    # of "1". Make sure this key actually exists on your keyboard layout,
+    # e.g. check output of 'xmodmap -pke'
+    history = ctrl+shift+space
+
+    # Context menu.
+    context = shift+space
+
+[urgency_low]
+    # IMPORTANT: colors have to be defined in quotation marks.
+    # Otherwise the "#" and following would be interpreted as a comment.
+    background = "#222222"
+    foreground = "#888888"
+    timeout = 10
+    # Icon for notifications with low urgency, uncomment to enable
+    #icon = /path/to/icon
+
+[urgency_normal]
+    background = "#285577"
+    foreground = "#ffffff"
+    timeout = 10
+    # Icon for notifications with normal urgency, uncomment to enable
+    #icon = /path/to/icon
+
+[urgency_critical]
+    background = "#900000"
+    foreground = "#ffffff"
+    frame_color = "#ff0000"
+    timeout = 0
+    # Icon for notifications with critical urgency, uncomment to enable
+    #icon = /path/to/icon
+
+# Every section that isn't one of the above is interpreted as a rules to
+# override settings for certain messages.
+# Messages can be matched by "appname", "summary", "body", "icon", "category",
+# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
+# "background", "frame_color", "new_icon" and "format", "fullscreen".
+# Shell-like globbing will get expanded.
+#
+# SCRIPTING
+# You can specify a script that gets run when the rule matches by
+# setting the "script" option.
+# The script will be called as follows:
+#   script appname summary body icon urgency
+# where urgency can be "LOW", "NORMAL" or "CRITICAL".
+#
+# NOTE: if you don't want a notification to be displayed, set the format
+# to "".
+# NOTE: It might be helpful to run dunst -print in a terminal in order
+# to find fitting options for rules.
+
+# fullscreen values
+# show: show the notifications, regardless if there is a fullscreen window opened
+# delay: displays the new notification, if there is no fullscreen window active
+#        If the notification is already drawn, it won't get undrawn.
+# pushback: same as delay, but when switching into fullscreen, the notification will get
+#           withdrawn from screen again and will get delayed like a new notification
+
+#[fullscreen_delay_everything]
+#    fullscreen = delay
+#[fullscreen_show_critical]
+#    msg_urgency = critical
+#    fullscreen = show
+
+[volume]
+    summary = "Volume"
+    appname = "Openbox-volume"
+    format  = "Volume %p"
+    fullscreen = show
+
+[volume-mute]
+    appname = "Openbox-mute"
+    format  = "%s"
+    fullscreen = show
+    background = "#00ff00"
+    foreground = "#000000"
+
+#[espeak]
+#    summary = "*"
+#    script = dunst_espeak.sh
+
+#[script-test]
+#    summary = "*script*"
+#    script = dunst_test.sh
+
+#[ignore]
+#    # This notification will not be displayed
+#    summary = "foobar"
+#    format = ""
+
+#[history-ignore]
+#    # This notification will not be saved in history
+#    summary = "foobar"
+#    history_ignore = yes
+
+#[signed_on]
+#    appname = Pidgin
+#    summary = "*signed on*"
+#    urgency = low
+#
+#[signed_off]
+#    appname = Pidgin
+#    summary = *signed off*
+#    urgency = low
+#
+#[says]
+#    appname = Pidgin
+#    summary = *says*
+#    urgency = critical
+#
+#[twitter]
+#    appname = Pidgin
+#    summary = *twitter.com*
+#    urgency = normal
+#
+# 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 (file)
index 0000000..da26fa2
--- /dev/null
@@ -0,0 +1,8 @@
+[redshift]
+temp-day=4500
+temp-night=4500
+location-provider=manual
+
+[manual]
+lat=48.8566
+lon=2.3522
diff --git a/roles/graphical/files/mimeapps.list b/roles/graphical/files/mimeapps.list
new file mode 100644 (file)
index 0000000..1f35b04
--- /dev/null
@@ -0,0 +1,147 @@
+[Added Associations]
+text/html=firefox.desktop
+text/xml=firefox.desktop
+application/xhtml+xml=firefox.desktop
+application/vnd.mozilla.xul+xml=firefox.desktop
+text/mml=firefox.desktop
+x-scheme-handler/http=firefox.desktop
+x-scheme-handler/https=firefox.desktop
+inode/directory=pcmanfm.desktop
+image/bmp=gpicview.desktop
+image/gif=gpicview.desktop
+image/jpeg=gpicview.desktop
+image/jpg=gpicview.desktop
+image/png=gpicview.desktop
+image/tiff=org.gnome.Evince.desktop
+image/x-bmp=gpicview.desktop
+image/x-pcx=gpicview.desktop
+image/x-tga=gpicview.desktop
+image/x-portable-pixmap=gpicview.desktop
+image/x-portable-bitmap=gpicview.desktop
+image/x-targa=gpicview.desktop
+image/x-portable-greymap=gpicview.desktop
+application/pcx=gpicview.desktop
+image/svg+xml=gpicview.desktop
+image/svg-xml=gpicview.desktop
+text/english=vim.desktop
+text/plain=vim.desktop
+text/x-makefile=vim.desktop
+text/x-c++hdr=vim.desktop
+text/x-c++src=vim.desktop
+text/x-chdr=vim.desktop
+text/x-csrc=vim.desktop
+text/x-java=vim.desktop
+text/x-moc=vim.desktop
+text/x-pascal=vim.desktop
+text/x-tcl=vim.desktop
+text/x-tex=vim.desktop
+application/x-shellscript=vim.desktop
+text/x-c=vim.desktop
+text/x-c++=vim.desktop
+application/pdf=org.gnome.Evince.desktop
+application/x-bzpdf=org.gnome.Evince.desktop
+application/x-gzpdf=org.gnome.Evince.desktop
+application/x-xzpdf=org.gnome.Evince.desktop
+application/x-ext-pdf=org.gnome.Evince.desktop
+application/postscript=org.gnome.Evince.desktop
+application/x-bzpostscript=org.gnome.Evince.desktop
+application/x-gzpostscript=org.gnome.Evince.desktop
+image/x-eps=org.gnome.Evince.desktop
+image/x-bzeps=org.gnome.Evince.desktop
+image/x-gzeps=org.gnome.Evince.desktop
+application/x-ext-ps=org.gnome.Evince.desktop
+application/x-ext-eps=org.gnome.Evince.desktop
+application/illustrator=org.gnome.Evince.desktop
+application/x-dvi=org.gnome.Evince.desktop
+application/x-bzdvi=org.gnome.Evince.desktop
+application/x-gzdvi=org.gnome.Evince.desktop
+application/x-ext-dvi=org.gnome.Evince.desktop
+image/vnd.djvu+multipage=org.gnome.Evince.desktop
+application/x-ext-djv=org.gnome.Evince.desktop
+application/x-ext-djvu=org.gnome.Evince.desktop
+application/x-cbr=org.gnome.Evince.desktop
+application/x-cbz=org.gnome.Evince.desktop
+application/x-cb7=org.gnome.Evince.desktop
+application/x-cbt=org.gnome.Evince.desktop
+application/x-ext-cbr=org.gnome.Evince.desktop
+application/x-ext-cbz=org.gnome.Evince.desktop
+application/x-ext-cb7=org.gnome.Evince.desktop
+application/x-ext-cbt=org.gnome.Evince.desktop
+application/vnd.comicbook+zip=org.gnome.Evince.desktop
+application/vnd.comicbook-rar=org.gnome.Evince.desktop
+application/oxps=org.gnome.Evince.desktop
+application/vnd.ms-xpsdocument=org.gnome.Evince.desktop
+
+[Default Applications]
+text/html=firefox.desktop
+text/xml=firefox.desktop
+application/xhtml+xml=firefox.desktop
+application/vnd.mozilla.xul+xml=firefox.desktop
+text/mml=firefox.desktop
+x-scheme-handler/http=firefox.desktop
+x-scheme-handler/https=firefox.desktop
+inode/directory=pcmanfm.desktop
+image/bmp=gpicview.desktop
+image/gif=gpicview.desktop
+image/jpeg=gpicview.desktop
+image/jpg=gpicview.desktop
+image/png=gpicview.desktop
+image/tiff=org.gnome.Evince.desktop
+image/x-bmp=gpicview.desktop
+image/x-pcx=gpicview.desktop
+image/x-tga=gpicview.desktop
+image/x-portable-pixmap=gpicview.desktop
+image/x-portable-bitmap=gpicview.desktop
+image/x-targa=gpicview.desktop
+image/x-portable-greymap=gpicview.desktop
+application/pcx=gpicview.desktop
+image/svg+xml=gpicview.desktop
+image/svg-xml=gpicview.desktop
+text/english=vim.desktop
+text/plain=vim.desktop
+text/x-makefile=vim.desktop
+text/x-c++hdr=vim.desktop
+text/x-c++src=vim.desktop
+text/x-chdr=vim.desktop
+text/x-csrc=vim.desktop
+text/x-java=vim.desktop
+text/x-moc=vim.desktop
+text/x-pascal=vim.desktop
+text/x-tcl=vim.desktop
+text/x-tex=vim.desktop
+application/x-shellscript=vim.desktop
+text/x-c=vim.desktop
+text/x-c++=vim.desktop
+application/pdf=org.gnome.Evince.desktop
+application/x-bzpdf=org.gnome.Evince.desktop
+application/x-gzpdf=org.gnome.Evince.desktop
+application/x-xzpdf=org.gnome.Evince.desktop
+application/x-ext-pdf=org.gnome.Evince.desktop
+application/postscript=org.gnome.Evince.desktop
+application/x-bzpostscript=org.gnome.Evince.desktop
+application/x-gzpostscript=org.gnome.Evince.desktop
+image/x-eps=org.gnome.Evince.desktop
+image/x-bzeps=org.gnome.Evince.desktop
+image/x-gzeps=org.gnome.Evince.desktop
+application/x-ext-ps=org.gnome.Evince.desktop
+application/x-ext-eps=org.gnome.Evince.desktop
+application/illustrator=org.gnome.Evince.desktop
+application/x-dvi=org.gnome.Evince.desktop
+application/x-bzdvi=org.gnome.Evince.desktop
+application/x-gzdvi=org.gnome.Evince.desktop
+application/x-ext-dvi=org.gnome.Evince.desktop
+image/vnd.djvu+multipage=org.gnome.Evince.desktop
+application/x-ext-djv=org.gnome.Evince.desktop
+application/x-ext-djvu=org.gnome.Evince.desktop
+application/x-cbr=org.gnome.Evince.desktop
+application/x-cbz=org.gnome.Evince.desktop
+application/x-cb7=org.gnome.Evince.desktop
+application/x-cbt=org.gnome.Evince.desktop
+application/x-ext-cbr=org.gnome.Evince.desktop
+application/x-ext-cbz=org.gnome.Evince.desktop
+application/x-ext-cb7=org.gnome.Evince.desktop
+application/x-ext-cbt=org.gnome.Evince.desktop
+application/vnd.comicbook+zip=org.gnome.Evince.desktop
+application/vnd.comicbook-rar=org.gnome.Evince.desktop
+application/oxps=org.gnome.Evince.desktop
+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 (file)
index 0000000..96c70b9
--- /dev/null
@@ -0,0 +1,21 @@
+---
+- name: Config files
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: config_files/
+    dest: /$XDG_CONFIG_HOME/
+- name: mimeapps file
+  copy:
+    src: mimeapps.list
+    dest: $XDG_DATA_HOME/applications/
+- name: Create xorg state dir
+  file:
+    path: $XDG_STATE_HOME/xorg
+    state: directory
+- name: Link Xorg state dir
+  file:
+    path: "$XDG_DATA_HOME/xorg"
+    src: "$XDG_STATE_HOME/xorg"
+    state: link
diff --git a/roles/init/tasks/main.yml b/roles/init/tasks/main.yml
new file mode 100644 (file)
index 0000000..d3f0f6b
--- /dev/null
@@ -0,0 +1,24 @@
+---
+- name: Get gnupg runtime folder name
+  shell: 'GNUPGHOME=$XDG_CONFIG_HOME/gnupg gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"'
+  register: gnupg_runtime_dir_cmd
+- name: Add pam_environment
+  register: pam_environment
+  template:
+    src: pam_environment.j2
+    dest: $XDG_CONFIG_HOME/pam_environment
+- name: Signal the change
+  when: pam_environment.changed
+  debug:
+    msg: "\u26A0\uFE0F \u26A0\uFE0F  You need to log out and back in to update your environment \u26A0\uFE0F \u26A0\uFE0F"
+- name: Create XDG dirs
+  file:
+    path: "{{ item }}"
+    state: directory
+  loop:
+    - "$XDG_CONFIG_HOME"
+    - "$XDG_STATE_HOME"
+    - "$XDG_DATA_HOME"
+    - "$XDG_CACHE_HOME"
+    - "$HOME/Desktop"
+    - "$HOME/Downloads"
diff --git a/roles/init/templates/pam_environment.j2 b/roles/init/templates/pam_environment.j2
new file mode 100644 (file)
index 0000000..4327eeb
--- /dev/null
@@ -0,0 +1,82 @@
+# This wil be set correctly in systemd service since the service manager
+# itself goes through /etc/pam.d/system-login (as systemd-user) and
+# takes its environment from pam_env
+# HOME doesn’t even exist when arriving here, but the user’s home is
+# available via @{HOME}. But pam_systemd still sets XDG_RUNTIME_DIR (and
+# only that one in the case of systemd-user)
+
+# Those are already defined in /etc/security/pam_env.conf
+XDG_CONFIG_HOME                        DEFAULT="@{HOME}/.config"
+XDG_CACHE_HOME                 DEFAULT="@{HOME}/.cache"
+XDG_DATA_HOME                  DEFAULT="@{HOME}/.local/share"
+XDG_STATE_HOME                 DEFAULT="@{HOME}/.local/state"
+
+EDITOR                         DEFAULT="vim"
+VISUAL                         DEFAULT="vim"
+PAGER                          DEFAULT="less"
+BROWSER                                DEFAULT="firefox"
+
+# Ansible
+ANSIBLE_CONFIG                 DEFAULT="${XDG_CONFIG_HOME}/ansible/ansible.cfg"
+
+# Python
+IPYTHONDIR                     DEFAULT="${XDG_CONFIG_HOME}/ipython"
+JUPYTER_CONFIG_DIR             DEFAULT="${XDG_CONFIG_HOME}/jupyter"
+PYTHONSTARTUP                  DEFAULT="${XDG_CONFIG_HOME}/python/startup_script.py"
+
+# VIM
+VIMINIT                                DEFAULT=":source ${XDG_CONFIG_HOME}/vim/vimrc"
+
+# Mplayer
+MPLAYER_HOME                   DEFAULT="${XDG_CONFIG_HOME}/mplayer"
+
+# X11
+XAUTHORITY                     DEFAULT="${XDG_RUNTIME_DIR}/Xauthority"
+
+# GPG
+GNUPGHOME                      DEFAULT="${XDG_CONFIG_HOME}/gnupg"
+
+# SSH
+SSH_AGENT_PID                  DEFAULT=
+SSH_AUTH_SOCK                  DEFAULT="${XDG_RUNTIME_DIR}/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.ssh"
+
+# Less
+LESSHISTFILE                   DEFAULT="${XDG_STATE_HOME}/less/history"
+
+# Pass
+PASSWORD_STORE_DIR             DEFAULT="${XDG_DATA_HOME}/pass"
+
+# Postgresql
+PSQLRC                         DEFAULT="${XDG_CONFIG_HOME}/psql/psqlrc"
+PSQL_HISTORY                   DEFAULT="${XDG_STATE_HOME}/psql/psql_history"
+PGPASSFILE                     DEFAULT="${XDG_CONFIG_HOME}/psql/pgpass"
+PGSERVICEFILE                  DEFAULT="${XDG_CONFIG_HOME}/psql/pg_service.conf"
+
+# Sqlite
+SQLITE_HISTORY                 DEFAULT="${XDG_STATE_HOME}/sqlite_history"
+
+# Stack
+STACK_ROOT                     DEFAULT="${XDG_DATA_HOME}/stack"
+
+# Nodejs
+NVM_DIR                                DEFAULT="${XDG_DATA_HOME}/nvm"
+NPM_CONFIG_USERCONFIG          DEFAULT="${XDG_CONFIG_HOME}/npm/npmrc"
+
+# TMUX
+TMUX_TMPDIR                    DEFAULT="${XDG_RUNTIME_DIR}"
+
+# node_modules/pm2/paths.js
+PM2_HOME                       DEFAULT="${XDG_DATA_HOME}/pm2"
+PM2_CONF_FILE                  DEFAULT="${XDG_CONFIG_HOME}/pm2/conf.js"
+PM2_MODULE_CONF_FILE           DEFAULT="${XDG_CONFIG_HOME}/pm2/module_conf.js"
+PM2_LOG_FILE_PATH              DEFAULT="${XDG_STATE_HOME}/pm2/pm2.log"
+PM2_PID_FILE_PATH              DEFAULT="${XDG_RUNTIME_DIR}/pm2/pm2.pid"
+PM2_RELOAD_LOCKFILE            DEFAULT="${XDG_RUNTIME_DIR}/pm2/reload.lock"
+PM2_DEFAULT_PID_PATH           DEFAULT="${XDG_RUNTIME_DIR}/pm2/pids"
+PM2_DEFAULT_LOG_PATH           DEFAULT="${XDG_STATE_HOME}/pm2/logs"
+PM2_DAEMON_RPC_PORT            DEFAULT="${XDG_RUNTIME_DIR}/pm2/rpc.sock"
+PM2_DAEMON_PUB_PORT            DEFAULT="${XDG_RUNTIME_DIR}/pm2/pub.sock"
+PM2_INTERACTOR_RPC_PORT                DEFAULT="${XDG_RUNTIME_DIR}/pm2/interactor.sock"
+PM2_INTERACTOR_LOG_FILE_PATH   DEFAULT="${XDG_STATE_HOME}/pm2/agent.log"
+PM2_INTERACTOR_PID_PATH                DEFAULT="${XDG_RUNTIME_DIR}/pm2/agent.pid"
+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 (file)
index 0000000..0d79919
--- /dev/null
@@ -0,0 +1,44 @@
+# Configuration file for the libfm version 1.3.0.2.
+# Autogenerated file, don't edit, your changes will be overwritten.
+
+[config]
+single_click=0
+use_trash=1
+confirm_del=1
+confirm_trash=1
+advanced_mode=0
+si_unit=0
+force_startup_notify=1
+backup_as_hidden=1
+no_usb_trash=1
+no_child_non_expandable=0
+show_full_names=1
+only_user_templates=0
+template_run_app=0
+template_type_once=0
+auto_selection_delay=600
+drop_default_action=auto
+defer_content_test=0
+quick_exec=0
+terminal=lxterminal
+thumbnail_local=1
+thumbnail_max=2048
+smart_desktop_autodrop=1
+
+[ui]
+big_icon_size=48
+small_icon_size=24
+pane_icon_size=24
+thumbnail_size=128
+show_thumbnail=1
+shadow_hidden=1
+
+[places]
+places_home=1
+places_desktop=1
+places_root=1
+places_computer=1
+places_trash=1
+places_applications=1
+places_network=1
+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 (file)
index 0000000..76228e2
--- /dev/null
@@ -0,0 +1,2 @@
+[Command]
+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 (file)
index 0000000..34c978d
--- /dev/null
@@ -0,0 +1,165 @@
+# lxpanel <profile> config file. Manually editing is not recommended.
+# Use preference dialog in lxpanel to adjust config when you can.
+
+Global {
+  edge=bottom
+  align=left
+  margin=0
+  widthtype=percent
+  width=100
+  height=26
+  transparent=0
+  tintcolor=#000000
+  alpha=0
+  setdocktype=1
+  setpartialstrut=1
+  autohide=0
+  heightwhenhidden=0
+  usefontcolor=1
+  fontcolor=#ffffff
+  background=1
+  backgroundfile=/usr/share/lxpanel/images/background.png
+}
+Plugin {
+  type=space
+  Config {
+    Size=2
+  }
+}
+Plugin {
+  type=menu
+  Config {
+    image=/usr/share/lxde/images/lxde-icon.png
+    system {
+    }
+    separator {
+    }
+    item {
+      command=run
+    }
+    separator {
+    }
+    item {
+      image=gnome-logout
+      command=logout
+    }
+  }
+}
+Plugin {
+  type=launchbar
+  Config {
+    Button {
+      id=pcmanfm.desktop
+    }
+    Button {
+      id=firefox.desktop
+    }
+  }
+}
+Plugin {
+  type=space
+  Config {
+    Size=4
+  }
+}
+Plugin {
+  type=wincmd
+  Config {
+    Button1=iconify
+    Button2=shade
+  }
+}
+Plugin {
+  type=space
+  Config {
+    Size=4
+  }
+}
+Plugin {
+  type=pager
+  Config {
+  }
+}
+Plugin {
+  type=space
+  Config {
+    Size=4
+  }
+}
+Plugin {
+  type=taskbar
+  expand=1
+  Config {
+    tooltips=1
+    IconsOnly=0
+    AcceptSkipPager=1
+    ShowIconified=1
+    ShowMapped=1
+    ShowAllDesks=0
+    UseMouseWheel=1
+    UseUrgencyHint=1
+    FlatButton=0
+    MaxTaskWidth=150
+    spacing=1
+  }
+}
+Plugin {
+  type=monitors
+  Config {
+    DisplayCPU=1
+    DisplayRAM=1
+    CPUColor=#0000FF
+    RAMColor=#FF0000
+  }
+}
+Plugin {
+  type=volume
+  Config {
+  }
+}
+Plugin {
+  type=tray
+  Config {
+  }
+}
+Plugin {
+  type=dclock
+  Config {
+    ClockFmt=%F %R
+    TooltipFmt=%A %x
+    BoldFont=0
+    IconOnly=0
+    CenterText=0
+  }
+}
+Plugin {
+  type=netstatus
+  Config {
+    iface=enp0s31f6
+    configtool=nm-connection-editor
+  }
+}
+Plugin {
+  type=netstatus
+  Config {
+    iface=wlp2s0
+    configtool=nm-connection-editor
+  }
+}
+Plugin {
+  type=batt
+  Config {
+    BackgroundColor=black
+    ChargingColor1=#28f200
+    ChargingColor2=#22cc00
+    DischargingColor1=#ffee00
+    DischargingColor2=#d9ca00
+    HideIfNoBattery=0
+    AlarmCommand=notify-send "Batterie faible" --icon=battery-caution
+    AlarmTime=5
+    BorderWidth=0
+    Size=1
+    ShowExtendedInformation=0
+    BatteryNumber=0
+  }
+}
diff --git a/roles/lxde/files/config_files/lxpanel/launchtaskbar.cfg b/roles/lxde/files/config_files/lxpanel/launchtaskbar.cfg
new file mode 100644 (file)
index 0000000..a3d0e52
--- /dev/null
@@ -0,0 +1,4 @@
+[special_cases]
+synaptic=synaptic-pkexec
+soffice.bin=libreoffice
+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 (file)
index 0000000..62314cf
--- /dev/null
@@ -0,0 +1,45 @@
+[Mime]
+webbrowser/available=
+email/available=
+file_manager/available=
+screensaver/available=
+composite_manager/available=
+desktop_manager/available=
+power_manager/available=
+polkit/available=
+im/available=
+widget/available=
+terminal_manager/available=
+audio_player/available=
+video_player/available=
+pdf_reader/available=
+image_display/available=
+text_editor/available=
+archive/available=
+spreadsheet/available=
+bittorent/available=
+document/available=
+burn/available=
+tasks/available=
+webbrowser/installed=Firefox,/usr/lib/firefox/firefox,firefox,/usr/share/applications/firefox.desktop,;
+email/installed=
+file_manager/installed=Gestionnaire de fichiers PCManFM,pcmanfm,system-file-manager,/usr/share/applications/pcmanfm.desktop,;
+screensaver/installed=
+composite_manager/installed=
+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,;
+power_manager/installed=
+polkit/installed=
+im/installed=
+widget/installed=
+terminal_manager/installed=LXTerminal,lxterminal,lxterminal,/usr/share/applications/lxterminal.desktop,;
+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,;
+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,;
+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,;
+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,;
+text_editor/installed=Vim,vim,gvim,/usr/share/applications/vim.desktop,;
+archive/installed=
+spreadsheet/installed=
+bittorent/installed=
+document/installed=
+burn/installed=
+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 (executable)
index 0000000..d8f2e23
--- /dev/null
@@ -0,0 +1,3 @@
+@lxpanel --profile LXDE
+@pcmanfm --desktop --profile LXDE
+@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 (file)
index 0000000..171f6b4
--- /dev/null
@@ -0,0 +1,54 @@
+[Session]
+window_manager=openbox-lxde
+disable_autostart=no
+polkit/command=lxpolkit
+clipboard/command=lxclipboard
+xsettings_manager/command=build-in
+proxy_manager/command=build-in
+keyring/command=
+quit_manager/command=lxsession-logout
+lock_manager/command=lxlock
+terminal_manager/command=lxterminal
+quit_manager/image=/usr/share/lxde/images/logout-banner.png
+quit_manager/layout=top
+webbrowser/command=/usr/lib/firefox/firefox
+tasks/command=lxtask
+pdf_reader/command=evince
+text_editor/command=vim
+
+[GTK]
+sNet/ThemeName=Adwaita
+sNet/IconThemeName=nuoveXT2
+sGtk/FontName=Sans 10
+iGtk/ToolbarStyle=3
+iGtk/ButtonImages=1
+iGtk/MenuImages=1
+iGtk/CursorThemeSize=18
+iXft/Antialias=1
+iXft/Hinting=1
+sXft/HintStyle=hintslight
+sXft/RGBA=rgb
+iNet/EnableEventSounds=1
+iNet/EnableInputFeedbackSounds=1
+sGtk/ColorScheme=
+iGtk/ToolbarIconSize=3
+sGtk/CursorThemeName=DMZ-White
+
+[Mouse]
+AccFactor=20
+AccThreshold=10
+LeftHanded=0
+
+[Keyboard]
+Delay=500
+Interval=30
+Beep=1
+
+[State]
+guess_default=true
+
+[Dbus]
+lxde=true
+
+[Environment]
+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 (file)
index 0000000..e572e20
--- /dev/null
@@ -0,0 +1,53 @@
+[general]
+fontname=Monospace 10
+selchars=-A-Za-z0-9,./?%&#:_
+scrollback=1000
+bgcolor=rgb(0,0,0)
+fgcolor=rgb(170,170,170)
+palette_color_0=rgb(0,0,0)
+palette_color_1=rgb(170,0,0)
+palette_color_2=rgb(0,170,0)
+palette_color_3=rgb(170,85,0)
+palette_color_4=rgb(0,0,170)
+palette_color_5=rgb(170,0,170)
+palette_color_6=rgb(0,170,170)
+palette_color_7=rgb(170,170,170)
+palette_color_8=rgb(85,85,85)
+palette_color_9=rgb(255,85,85)
+palette_color_10=rgb(85,255,85)
+palette_color_11=rgb(255,255,85)
+palette_color_12=rgb(85,85,255)
+palette_color_13=rgb(255,85,255)
+palette_color_14=rgb(85,255,255)
+palette_color_15=rgb(255,255,255)
+color_preset=VGA
+disallowbold=false
+cursorblinks=false
+cursorunderline=false
+audiblebell=false
+tabpos=top
+geometry_columns=80
+geometry_rows=24
+hidescrollbar=true
+hidemenubar=false
+hideclosebutton=false
+hidepointer=false
+disablef10=true
+disablealt=true
+disableconfirm=false
+
+[shortcut]
+new_window_accel=<Primary><Shift>n
+new_tab_accel=<Primary><Shift>t
+close_tab_accel=<Primary><Shift>w
+close_window_accel=<Primary><Shift>q
+copy_accel=<Primary><Shift>c
+paste_accel=<Primary><Shift>v
+name_tab_accel=<Primary><Shift>i
+previous_tab_accel=<Primary>Page_Up
+next_tab_accel=<Primary>Page_Down
+move_tab_left_accel=<Primary><Shift>Page_Up
+move_tab_right_accel=<Primary><Shift>Page_Down
+zoom_in_accel=<Primary><Shift>plus
+zoom_out_accel=<Primary><Shift>underscore
+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 (file)
index 0000000..5003f15
--- /dev/null
@@ -0,0 +1,696 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Do not edit this file, it will be overwritten on install.
+        Copy the file to $HOME/.config/openbox/ instead. -->
+<openbox_config xmlns='http://openbox.org/3.4/rc'>
+    <resistance>
+        <strength>10</strength>
+        <screen_edge_strength>20</screen_edge_strength>
+    </resistance>
+    <focus>
+        <focusNew>yes</focusNew>
+        <!-- always try to focus new windows when they appear. other rules do
+       apply -->
+        <followMouse>no</followMouse>
+        <!-- move focus to a window when you move the mouse into it -->
+        <focusLast>yes</focusLast>
+        <!-- focus the last used window when changing desktops, instead of the one
+       under the mouse pointer. when followMouse is enabled -->
+        <underMouse>no</underMouse>
+        <!-- move focus under the mouse, even when the mouse is not moving -->
+        <focusDelay>200</focusDelay>
+        <!-- when followMouse is enabled, the mouse must be inside the window for
+       this many milliseconds (1000 = 1 sec) before moving focus to it -->
+        <raiseOnFocus>no</raiseOnFocus>
+    </focus>
+    <!-- when followMouse is enabled, and a window is given focus by moving the
+       mouse into it, also raise the window -->
+    <placement>
+        <policy>Smart</policy>
+        <!-- 'Smart' or 'UnderMouse' -->
+        <center>yes</center>
+        <!-- whether to place windows in the center of the free area found or
+       the top left corner -->
+        <monitor>Any</monitor>
+    </placement>
+    <!-- with Smart placement on a multi-monitor system, try to place new windows
+       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
+       the active window is -->
+    <theme>
+        <name>Onyx</name>
+        <titleLayout>NLIMC</titleLayout>
+        <!--       available characters are NDSLIMC, each can occur at most once.
+      N: window icon
+      L: window label (AKA title).
+      I: iconify
+      M: maximize
+      C: close
+      S: shade (roll up/down)
+      D: omnipresent (on all desktops).
+  -->
+        <keepBorder>yes</keepBorder>
+        <animateIconify>yes</animateIconify>
+        <font place='ActiveWindow'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>bold</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='InactiveWindow'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>bold</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='MenuHeader'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>normal</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='MenuItem'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>normal</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='OnScreenDisplay'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>bold</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+    </theme>
+    <!-- 'italic' or 'normal' -->
+    <desktops>
+        <!-- this stuff is only used at startup, pagers allow you to change them
+       during a session
+
+       these are default values to use when other ones are not already set
+       by other applications, or saved in your session
+
+       use obconf if you want to change these without having to log out
+       and back in -->
+        <number>2</number>
+        <firstdesk>1</firstdesk>
+        <names/>
+        <!-- set names up here if you want to, like this:
+    <name>desktop 1</name>
+    <name>desktop 2</name>
+    -->
+        <popupTime>875</popupTime>
+    </desktops>
+    <!-- The number of milliseconds to show the popup for when switching
+       desktops.  Set this to 0 to disable the popup. -->
+    <resize>
+        <drawContents>yes</drawContents>
+        <popupShow>Nonpixel</popupShow>
+        <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
+        <popupPosition>Center</popupPosition>
+        <!-- 'Center', 'Top', or 'Fixed' -->
+        <popupFixedPosition>
+            <!-- these are used if popupPosition is set to 'Fixed' -->
+            <x>10</x>
+            <!-- positive number for distance from left edge, negative number for
+         distance from right edge, or 'Center' -->
+            <y>10</y>
+        </popupFixedPosition>
+    </resize>
+    <!-- You can reserve a portion of your screen where windows will not cover when
+     they are maximized, or when they are initially placed.
+     Many programs reserve space automatically, but you can use this in other
+     cases. -->
+    <margins>
+        <top>0</top>
+        <bottom>0</bottom>
+        <left>0</left>
+        <right>0</right>
+    </margins>
+    <dock>
+        <position>TopLeft</position>
+        <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
+        <floatingX>0</floatingX>
+        <floatingY>0</floatingY>
+        <noStrut>no</noStrut>
+        <stacking>Above</stacking>
+        <!-- 'Above', 'Normal', or 'Below' -->
+        <direction>Vertical</direction>
+        <!-- 'Vertical' or 'Horizontal' -->
+        <autoHide>no</autoHide>
+        <hideDelay>300</hideDelay>
+        <!-- in milliseconds (1000 = 1 second) -->
+        <showDelay>300</showDelay>
+        <!-- in milliseconds (1000 = 1 second) -->
+        <moveButton>Middle</moveButton>
+    </dock>
+    <!-- 'Left', 'Middle', 'Right' -->
+    <keyboard>
+        <chainQuitKey>C-g</chainQuitKey>
+        <!-- Keybindings for desktop switching -->
+        <keybind key='C-A-Left'>
+            <action name='DesktopLeft'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='C-A-Right'>
+            <action name='DesktopRight'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='C-A-Up'>
+            <action name='DesktopUp'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='C-A-Down'>
+            <action name='DesktopDown'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Left'>
+            <action name='SendToDesktopLeft'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Right'>
+            <action name='SendToDesktopRight'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Up'>
+            <action name='SendToDesktopUp'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Down'>
+            <action name='SendToDesktopDown'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='W-F1'>
+            <action name='Desktop'>
+                <desktop>1</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-F2'>
+            <action name='Desktop'>
+                <desktop>2</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-F3'>
+            <action name='Desktop'>
+                <desktop>3</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-F4'>
+            <action name='Desktop'>
+                <desktop>4</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-d'>
+            <action name='ToggleShowDesktop'/>
+        </keybind>
+        <keybind key='C-A-d'>
+            <action name='ToggleShowDesktop'/>
+        </keybind>
+        <!-- Keybindings for windows -->
+        <keybind key='A-F4'>
+            <action name='Close'/>
+        </keybind>
+        <keybind key='A-Escape'>
+            <action name='Lower'/>
+            <action name='FocusToBottom'/>
+            <action name='Unfocus'/>
+        </keybind>
+        <keybind key='A-space'>
+            <action name='ShowMenu'>
+                <menu>client-menu</menu>
+            </action>
+        </keybind>
+        <!-- Keybindings for window switching -->
+        <keybind key='A-Tab'>
+            <action name='NextWindow'/>
+        </keybind>
+        <keybind key='A-S-Tab'>
+            <action name='PreviousWindow'/>
+        </keybind>
+        <keybind key='C-A-Tab'>
+            <action name='NextWindow'>
+                <panels>yes</panels>
+                <desktop>yes</desktop>
+            </action>
+        </keybind>
+        <!-- Keybindings for running applications -->
+        <keybind key='W-e'>
+            <action name='Execute'>
+                <startupnotify>
+                    <enabled>true</enabled>
+                    <name>PCManFM</name>
+                </startupnotify>
+                <command>pcmanfm</command>
+            </action>
+        </keybind>
+        <!-- Keybindings for finding files -->
+        <keybind key='W-f'>
+            <action name='Execute'>
+                <command>pcmanfm --find-files</command>
+            </action>
+        </keybind>
+        <!-- eybindings for LXPanel -->
+        <keybind key='W-p'>
+            <action name='Execute'>
+                <command>lxpanelctl run</command>
+            </action>
+        </keybind>
+        <keybind key='A-F11'>
+            <action name='ToggleFullscreen'/>
+        </keybind>
+        <!-- Launch Task Manager with Ctrl+Alt+Del -->
+        <keybind key='A-C-Delete'>
+            <action name='Execute'>
+                <command>lxtask</command>
+            </action>
+        </keybind>
+        <!-- Launch LXRandR when Fn+Screen is pressed -->
+        <keybind key='XF86Display'>
+            <action name='Execute'>
+                <command>lxrandr</command>
+            </action>
+        </keybind>
+        <keybind key='XF86MonBrightnessUp'>
+            <action name='Execute'>
+                <command>xbacklight -inc 10</command>
+            </action>
+        </keybind>
+        <keybind key='XF86MonBrightnessDown'>
+            <action name='Execute'>
+                <command>xbacklight -dec 10</command>
+            </action>
+        </keybind>
+        <keybind key='A-C-l'>
+            <action name='Execute'>
+                <command>slock</command>
+            </action>
+        </keybind>
+        <keybind key='XF86Tools'>
+            <action name='Execute'>
+                <command>xset dpms force off</command>
+            </action>
+        </keybind>
+        <keybind key='XF86AudioRaiseVolume'>
+            <action name='Execute'>
+                <command>bash -c &quot;pamixer --allow-boost -u -i 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] &amp;&amp; echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i &apos; &apos; -a Openbox-volume -t 1000 -u $color &gt; $v&quot;</command>
+            </action>
+        </keybind>
+        <keybind key='XF86AudioLowerVolume'>
+            <action name='Execute'>
+                <command>bash -c &quot;pamixer --allow-boost -u -d 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] &amp;&amp; echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i &apos; &apos; -a Openbox-volume -t 1000 -u $color &gt; $v&quot;</command>
+            </action>
+        </keybind>
+        <keybind key='XF86AudioMute'>
+            <action name='Execute'>
+                <command>bash -c &quot;v=$HOME/.cache/dunstify_volume; vol=$([ `pamixer -t ; pamixer --get-mute` = \&quot;false\&quot; ] &amp;&amp; echo on || echo off); dunstify -r $(($(cat $v))) -p &apos;Volume &apos;$vol -i &apos; &apos; -a Openbox-mute -t 1000 &gt; $v&quot;</command>
+            </action>
+        </keybind>
+        <keybind key='W-Print'>
+            <action name='Execute'>
+                <command>scrot &quot;%Y-%m-%d_%H_%M_%S.png&quot; -e &apos;mv $f ~&apos;</command>
+            </action>
+        </keybind>
+        <keybind key='S-Print'>
+            <action name='Execute'>
+                <command>scrot -s &quot;%Y-%m-%d_%H_%M_%S.png&quot; -e &apos;mv $f ~&apos;</command>
+            </action>
+        </keybind>
+    </keyboard>
+    <mouse>
+        <dragThreshold>8</dragThreshold>
+        <!-- number of pixels the mouse must move before a drag begins -->
+        <doubleClickTime>200</doubleClickTime>
+        <!-- in milliseconds (1000 = 1 second) -->
+        <screenEdgeWarpTime>400</screenEdgeWarpTime>
+        <!-- Time before changing desktops when the pointer touches the edge of the
+       screen while moving a window, in milliseconds (1000 = 1 second).
+       Set this to 0 to disable warping -->
+        <context name='Frame'>
+            <mousebind button='A-Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='A-Left' action='Click'>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='A-Left' action='Drag'>
+                <action name='Move'/>
+            </mousebind>
+            <mousebind button='A-Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='A-Right' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+            <mousebind button='A-Middle' action='Press'>
+                <action name='Lower'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+            </mousebind>
+            <mousebind button='A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='C-A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='C-A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='A-S-Up' action='Click'>
+                <action name='SendToDesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-S-Down' action='Click'>
+                <action name='SendToDesktopNext'/>
+            </mousebind>
+        </context>
+        <context name='Titlebar'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Move'/>
+            </mousebind>
+            <mousebind button='Left' action='DoubleClick'>
+                <action name='ToggleMaximizeFull'/>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Lower'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+            </mousebind>
+            <mousebind button='Up' action='Click'>
+                <action name='Shade'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+                <action name='Lower'/>
+            </mousebind>
+            <mousebind button='Down' action='Click'>
+                <action name='Unshade'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Top'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>top</edge>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Left'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>left</edge>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Right'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>right</edge>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Bottom'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>bottom</edge>
+                </action>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Lower'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='BLCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='BRCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='TLCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='TRCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='Client'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+        </context>
+        <context name='Icon'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='AllDesktops'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='ToggleOmnipresent'/>
+            </mousebind>
+        </context>
+        <context name='Shade'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='ToggleShade'/>
+            </mousebind>
+        </context>
+        <context name='Iconify'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='Iconify'/>
+            </mousebind>
+        </context>
+        <context name='Maximize'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='ToggleMaximizeFull'/>
+            </mousebind>
+            <mousebind button='Middle' action='Click'>
+                <action name='ToggleMaximizeVert'/>
+            </mousebind>
+            <mousebind button='Right' action='Click'>
+                <action name='ToggleMaximizeHorz'/>
+            </mousebind>
+        </context>
+        <context name='Close'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='Close'/>
+            </mousebind>
+        </context>
+        <context name='Desktop'>
+            <mousebind button='Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='C-A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='C-A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+        </context>
+        <context name='Root'>
+            <!-- Menus -->
+            <mousebind button='Middle' action='Press'>
+                <action name='ShowMenu'>
+                    <menu>client-list-combined-menu</menu>
+                </action>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='ShowMenu'>
+                    <menu>root-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='MoveResize'>
+            <mousebind button='Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+        </context>
+    </mouse>
+    <menu>
+        <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
+        <file>/usr/share/lxde/openbox/menu.xml</file>
+        <hideDelay>200</hideDelay>
+        <!-- if a press-release lasts longer than this setting (in milliseconds), the
+       menu is hidden again -->
+        <middle>no</middle>
+        <!-- center submenus vertically about the parent entry -->
+        <submenuShowDelay>100</submenuShowDelay>
+        <!-- this one is easy, time to delay before showing a submenu after hovering
+       over the parent entry -->
+        <applicationIcons>yes</applicationIcons>
+        <!-- controls if icons appear in the client-list-(combined-)menu -->
+        <manageDesktops>yes</manageDesktops>
+    </menu>
+    <!-- show the manage desktops section in the client-list-(combined-)menu -->
+    <applications/>
+</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 (file)
index 0000000..088cce4
--- /dev/null
@@ -0,0 +1,15 @@
+[*]
+wallpaper_mode=crop
+wallpaper_common=1
+wallpaper=/usr/share/lxde/wallpapers/lxde_blue.jpg
+desktop_bg=#000000
+desktop_fg=#ffffff
+desktop_shadow=#000000
+desktop_font=Sans 12
+folder=
+show_wm_menu=0
+sort=mtime;ascending;
+show_documents=0
+show_trash=1
+show_mounts=0
+
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 (file)
index 0000000..facaa64
--- /dev/null
@@ -0,0 +1,27 @@
+[config]
+bm_open_method=0
+
+[volume]
+mount_on_startup=1
+mount_removable=1
+autorun=1
+
+[ui]
+always_show_tabs=0
+max_tab_chars=32
+win_width=640
+win_height=480
+maximized=1
+splitter_pos=275
+media_in_new_tab=1
+desktop_folder_new_win=0
+change_tab_on_drop=1
+close_on_unmount=0
+focus_previous=0
+side_pane_mode=places
+view_mode=list
+show_hidden=1
+sort=name;ascending;
+toolbar=newtab;navigation;home;
+show_statusbar=1
+pathbar_mode_buttons=0
diff --git a/roles/lxde/files/config_files/xinitrc b/roles/lxde/files/config_files/xinitrc
new file mode 100644 (file)
index 0000000..2e77554
--- /dev/null
@@ -0,0 +1,15 @@
+### replace /etc/X11/xinit/xinitrc and /etc/X11/xinit/xinitrc.d/*
+dbus-update-activation-environment DISPLAY XAUTHORITY
+###
+
+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
+
+#### The rest replaces a `exec startlxde` (To avoid the dbus-update-activation-environment)
+# Enable GTK+2 integration for OpenOffice.org, if available.
+export SAL_USE_VCLPLUGIN=gtk
+
+export XDG_MENU_PREFIX="lxde-"
+export XDG_CURRENT_DESKTOP="LXDE"
+
+# Start the LXDE session
+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 (file)
index 0000000..b48b5e5
--- /dev/null
@@ -0,0 +1,11 @@
+---
+- name: Import graphical
+  include_role:
+    name: graphical
+- name: Config files
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: config_files/
+    dest: /$XDG_CONFIG_HOME/
diff --git a/roles/programming/haskell/files/ghci.conf b/roles/programming/haskell/files/ghci.conf
new file mode 100644 (file)
index 0000000..1de7ca1
--- /dev/null
@@ -0,0 +1,2 @@
+:set prompt "λ "
+:set -XOverloadedStrings
diff --git a/roles/programming/haskell/files/stack/config.yaml b/roles/programming/haskell/files/stack/config.yaml
new file mode 100644 (file)
index 0000000..3bf2f91
--- /dev/null
@@ -0,0 +1,14 @@
+# This file contains default non-project-specific settings for 'stack', used
+# in all projects.  For more information about stack's configuration, see
+# http://docs.haskellstack.org/en/stable/yaml_configuration/
+
+# The following parameters are used by "stack new" to automatically fill fields
+# in the cabal config. We recommend uncommenting them and filling them out if
+# you intend to use 'stack new'.
+# See https://docs.haskellstack.org/en/stable/yaml_configuration/#templates
+templates:
+  scm-init: git
+  params:
+    author-name: Ismaël Bouya
+    author-email: ismael.bouya@fretlink.com
+    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 (file)
index 0000000..646fa5f
--- /dev/null
@@ -0,0 +1,2 @@
+This is the implicit global project, which is used only when 'stack' is run
+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 (file)
index 0000000..e034f58
--- /dev/null
@@ -0,0 +1,10 @@
+# This is the implicit global project's config file, which is only used when
+# 'stack' is run outside of a real project.  Settings here do _not_ act as
+# defaults for all projects.  To change stack's default settings, edit
+# '/home/ismael/.local/share/stack/config.yaml' instead.
+#
+# For more information about stack's configuration, see
+# http://docs.haskellstack.org/en/stable/yaml_configuration/
+#
+packages: []
+resolver: lts-11.15
diff --git a/roles/programming/haskell/tasks/main.yml b/roles/programming/haskell/tasks/main.yml
new file mode 100644 (file)
index 0000000..cd6654b
--- /dev/null
@@ -0,0 +1,13 @@
+---
+- name: GHC config file
+  copy:
+    src: ghci.conf
+    dest: $HOME/.ghc/
+- name: Stack config files
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: stack/
+    dest: /$XDG_DATA_HOME/stack/
+
diff --git a/roles/programming/nodejs/files/npmrc b/roles/programming/nodejs/files/npmrc
new file mode 100644 (file)
index 0000000..5dc76c3
--- /dev/null
@@ -0,0 +1,3 @@
+cache=${XDG_CACHE_HOME}/npm
+tmp=${XDG_RUNTIME_DIR}/npm
+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 (file)
index 0000000..fcf7421
--- /dev/null
@@ -0,0 +1,5 @@
+---
+- name: config file
+  copy:
+    src: npmrc
+    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 (file)
index 0000000..403afe5
--- /dev/null
@@ -0,0 +1,52 @@
+import sys as sys_
+
+# Adapted from /usr/lib/python3.7/site.py # enablerlcompleter
+def register_readline():
+    import os
+    import atexit
+    try:
+        import readline
+        import rlcompleter
+    except ImportError:
+        return
+
+    # Reading the initialization (config) file may not be enough to set a
+    # completion key, so we set one first and then read the file.
+    readline_doc = getattr(readline, '__doc__', '')
+    if readline_doc is not None and 'libedit' in readline_doc:
+        readline.parse_and_bind('bind ^I rl_complete')
+    else:
+        readline.parse_and_bind('tab: complete')
+
+    try:
+        readline.read_init_file()
+    except OSError:
+        # An OSError here could have many causes, but the most likely one
+        # is that there's no .inputrc file (or .editrc file in the case of
+        # Mac OS X + libedit) in the expected location.  In that case, we
+        # want to ignore the exception.
+        pass
+
+    if readline.get_current_history_length() == 0:
+        # If no history was loaded, default to .python_history.
+        # The guard is necessary to avoid doubling history size at
+        # each interpreter exit when readline was already configured
+        # through a PYTHONSTARTUP hook, see:
+        # http://bugs.python.org/issue5845#msg198636
+        environ = os.environ.get("XDG_STATE_HOME") or os.environ.get("XDG_DATA_HOME")
+        if environ is not None:
+            if not os.path.exists(os.path.join(environ, "python")):
+                os.mkdir(os.path.join(environ, "python"))
+            history = os.path.join(environ, "python", "history")
+        else:
+            history = os.path.join(os.path.expanduser('~'),
+                                   '.python_history')
+        try:
+            readline.read_history_file(history)
+        except OSError:
+            pass
+        atexit.register(readline.write_history_file, history)
+
+sys_.__interactivehook__ = register_readline
+
+del sys_
diff --git a/roles/programming/python/tasks/main.yml b/roles/programming/python/tasks/main.yml
new file mode 100644 (file)
index 0000000..db67584
--- /dev/null
@@ -0,0 +1,5 @@
+---
+- name: Config file
+  copy:
+    src: startup_script.py
+    dest: $XDG_CONFIG_HOME/python/
diff --git a/roles/shell/bash/files/bashrc b/roles/shell/bash/files/bashrc
new file mode 100644 (file)
index 0000000..28d0af9
--- /dev/null
@@ -0,0 +1 @@
+coucou
diff --git a/roles/shell/bash/tasks/main.yml b/roles/shell/bash/tasks/main.yml
new file mode 100644 (file)
index 0000000..d74421a
--- /dev/null
@@ -0,0 +1,17 @@
+---
+- name: Add bashrc config
+  template:
+    src: bashrc.j2
+    dest: $HOME/.bashrc
+- name: Add bash_profile config
+  template:
+    src: bash_profile.j2
+    dest: $HOME/.bash_profile
+- name: Create bash state dir
+  file:
+    path: $XDG_STATE_HOME/bash
+    state: directory
+- name: Create less state dir
+  file:
+    path: $XDG_STATE_HOME/less
+    state: directory
diff --git a/roles/shell/bash/templates/bash_profile.j2 b/roles/shell/bash/templates/bash_profile.j2
new file mode 100644 (file)
index 0000000..06210fa
--- /dev/null
@@ -0,0 +1,9 @@
+# Some variables are loaded via pam (see .config/pam_environment)
+
+[[ -f ~/.bashrc ]] && . ~/.bashrc
+{% if "graphical_vt" in features.get(profile, []) %}
+
+if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
+  exec startx $XDG_CONFIG_HOME/xinitrc > $XDG_STATE_HOME/xsession_errors 2>&1
+fi
+{% endif %}
diff --git a/roles/shell/bash/templates/bashrc.j2 b/roles/shell/bash/templates/bashrc.j2
new file mode 100644 (file)
index 0000000..2285d2b
--- /dev/null
@@ -0,0 +1,95 @@
+#
+# ~/.bashrc
+#
+
+if [ -n "$HOME/.local/bin" ]; then
+  PATH="$HOME/.local/bin:$PATH"
+fi
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+export GPG_TTY=$(tty)
+export HISTFILE="$XDG_STATE_HOME/bash/history"
+
+alias vi=vim
+alias ls='ls --color=auto -F -T 0'
+alias tmux='tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf'
+
+alias grep='grep --color=auto'
+alias fgrep='fgrep --color=auto'
+alias egrep='egrep --color=auto'
+
+alias sudo="sudo "
+alias mv="mv -i"
+alias cp="cp -i"
+alias rm="rm -i"
+alias psp="pstree -aUp $USER"
+alias dotdrop="dotdrop --cfg $XDG_CONFIG_HOME/dotdrop/config.yaml"
+
+{% if role.get(profile) == "fretlink" %}
+##### Some Fretlink aliases
+alias getDump='s3cmd -c <(pass show Travail/Fretlink/S3) get '
+
+function vpn() {
+  TMPFILE=$(mktemp /tmp/openvpn.XXXXXX)
+  pass show Travail/Fretlink/OpenVPN >> $TMPFILE
+  sudo openvpn $TMPFILE
+  rm -f $TMPFILE
+}
+
+function dev_prompt() {
+  if [ -n "$FRETLINK_ENV" ]; then
+    echo "{$FRETLINK_ENV} "
+  fi
+}
+##### /Fretlink
+{% endif %}
+
+# Non-printable chars need to be wrapped by \[ ... \] otherwise bash
+# will wrongly count the size of the prompt and glitch when going
+# through history
+function git_prompt_color() {
+  git diff --quiet 2>/dev/null && git diff --cached --quiet 2>/dev/null
+  gitstatus=$?
+  if [ "$gitstatus" -gt 0 ]; then
+    av=$'\033[01;31m'
+  else
+    av=$'\033[01;34m'
+  fi
+  echo "$av"
+}
+
+function git_prompt() {
+  gitinfo=$(git branch 2>/dev/null | grep "^*" | cut -c3-);
+  git diff --quiet 2>/dev/null && git diff --cached --quiet 2>/dev/null
+  gitstatus=$?
+  gitlsfiles=$(git ls-files . 2>/dev/null | wc -l);
+  if [ "$gitinfo" -a "$gitlsfiles" -gt 0 ]; then
+    echo -e "($gitinfo) "
+  fi
+}
+
+function error_code() {
+  ret=$?
+  if [[ $ret != 0  ]]; then
+    echo "$ret "
+  fi
+}
+
+function running_jobs() {
+  ret=$(jobs | wc -l)
+  if [[ $ret != 0  ]]; then
+    echo "[$ret] "
+  fi
+}
+
+{% if role.get(profile) == "fretlink" %}
+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\] '
+{% else %}
+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\] '
+{% endif %}
+
+{% if "nodejs" in features.get(profile, []) %}
+source /usr/share/nvm/init-nvm.sh
+{% endif %}
diff --git a/roles/tools/files/mplayer b/roles/tools/files/mplayer
new file mode 100644 (file)
index 0000000..21cf775
--- /dev/null
@@ -0,0 +1,3 @@
+# Write your default config options here!
+
+
diff --git a/roles/tools/files/psqlrc b/roles/tools/files/psqlrc
new file mode 100644 (file)
index 0000000..c51f46e
--- /dev/null
@@ -0,0 +1,5 @@
+\pset null ¤
+\set COMP_KEYWORD_CASE upper
+\x auto
+\set HISTSIZ -1
+\set ECHO_HIDDEN on
diff --git a/roles/tools/files/remind/commands/work b/roles/tools/files/remind/commands/work
new file mode 100644 (file)
index 0000000..edc937d
--- /dev/null
@@ -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 (file)
index 0000000..3fc221d
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Remind daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/remind -z60 -k'/usr/bin/dunstify -t 0 -a Tracking %%s' %h/.config/remind/%i
+
+[Install]
+WantedBy=default.target
diff --git a/roles/tools/files/vimrc b/roles/tools/files/vimrc
new file mode 100644 (file)
index 0000000..6de0f1c
--- /dev/null
@@ -0,0 +1,309 @@
+" ---------- Init, config, backup ---------------
+" Respect XDG directories (more below for cache)
+set viminfo+='1000,n$XDG_STATE_HOME/vim/viminfo
+set runtimepath=$XDG_DATA_HOME/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$XDG_DATA_HOME/vim/after
+
+" Run :PlugInstall after adding plugins there
+call plug#begin(expand($XDG_DATA_HOME) . '/vim/plugged')
+
+Plug 'vim-scripts/cecutil'
+Plug 'vim-scripts/LargeFile'
+Plug 'vim-scripts/Align'
+Plug 'vim-scripts/AutoAlign'
+Plug 'jamessan/vim-gnupg'
+Plug 'vim-scripts/taglist.vim'
+Plug 'chrisbra/csv.vim'
+Plug 'mustache/vim-mustache-handlebars'
+Plug 'cakebaker/scss-syntax.vim'
+Plug 'tpope/vim-bundler'
+Plug 'tpope/vim-rails'
+Plug 'ledger/vim-ledger'
+Plug 'beyondwords/vim-twig'
+Plug 'scrooloose/nerdtree'
+Plug 'kien/ctrlp.vim'
+Plug 'rodjek/vim-puppet'
+Plug 'szw/vim-tags'
+Plug 'neomutt/neomutt.vim'
+Plug 'kchmck/vim-coffee-script'
+Plug 'digitaltoad/vim-pug'
+Plug 'vim-scripts/slapd.vim'
+Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
+Plug 'vim-vdebug/vdebug'
+Plug 'tpope/vim-fugitive'
+Plug 'tomlion/vim-solidity'
+Plug 'chrisbra/SudoEdit.vim'
+Plug 'Chiel92/vim-autoformat'
+Plug 'pearofducks/ansible-vim'
+Plug 'juliosueiras/vim-terraform-completion'
+
+call plug#end()
+
+" Charge automatiquement les ftplugins/*.vim selon le type de fichier
+filetype plugin on
+" Charge automatiquement les indent/*.vim selon le type de fichier
+filetype indent on
+
+" Pour que vim garde une copie de sauvegarde des fichiers modifiés.
+set backup
+""" Copied from /usr/share/vim/vimfiles/archlinux.vim
+" Move temporary files to a secure location to protect against CVE-2017-1000382
+if exists('$XDG_CACHE_HOME')
+  let &g:directory=$XDG_CACHE_HOME
+else
+  let &g:directory=$HOME . '/.cache'
+endif
+let g:ctrlp_cache_dir=&g:directory . '/vim/ctrlp//'
+let &g:undodir=&g:directory . '/vim/undo//'
+let &g:backupdir=&g:directory . '/vim/backup//'
+let g:vim_tags_cache_dir = &g:directory . '/vim/ctags//'
+let &g:directory.='/vim/swap//'
+" Create directories if they doesn't exist
+if ! isdirectory($XDG_STATE_HOME . '/vim')
+  silent! call mkdir($XDG_STATE_HOME . '/vim')
+endif
+if ! isdirectory(expand(&g:directory))
+  silent! call mkdir(expand(&g:directory), 'p', 0700)
+endif
+if ! isdirectory(expand(&g:backupdir))
+  silent! call mkdir(expand(&g:backupdir), 'p', 0700)
+endif
+if ! isdirectory(expand(&g:undodir))
+  silent! call mkdir(expand(&g:undodir), 'p', 0700)
+endif
+if ! isdirectory(expand(g:vim_tags_cache_dir))
+  silent! call mkdir(expand(g:vim_tags_cache_dir), 'p', 0700)
+endif
+""" /Copied from /usr/share/vim/vimfiles/archlinux.vim
+
+
+" Ne pas sauver un backup spécial pour les fichiers réseau
+let g:netrw_dirhistmax = 0
+
+" ---------- Mappings ---------------------------
+" map  : Normal, Visual, Select, Operator-pending
+" map! : Insert and Command-line
+
+" Le BackSpace fonctionne aussi en mode normal.
+map <BS> X
+
+" Les Control-flèches
+map  <ESC>[1;5A <C-Up>
+map! <ESC>[1;5A <C-Up>
+map  <ESC>[1;5B <C-Down>
+map! <ESC>[1;5B <C-Down>
+map  <ESC>[1;5C <C-Right>
+map! <ESC>[1;5C <C-Right>
+map  <ESC>[1;5D <C-Left>
+map! <ESC>[1;5D <C-Left>
+
+map  <S-Up> {
+map! <S-Up> <C-O>{
+map  <S-Down> }
+map! <S-Down> <C-O>}
+
+
+" ---------- Comportement à la frappe -----------
+" <BS> passe à travers l'indentation, les fins de ligne et le début du "insert"
+set backspace=indent,eol,start
+
+" '<BS>e écrit un é (sinon : ctrl+K ' e)
+" set digraph
+
+" La taille d'une ligne, pour la frappe au kilomètre.
+" Permet 4 niveaux de 'citation' pour les mails/forum
+set textwidth=72
+" set textwidth=80
+
+" Les touches qui font passer à la ligne suivante/précédente. backspace (b),
+" espace (s), flèches (<,>,[,]).
+set whichwrap=b,s,<,>,[,]
+
+" Ne pas mettre deux espaces après la ponctuation quand on "join" deux lignes
+set nojoinspaces
+
+" Quand on tape un ), vim montre furtivement le ( correspondant.
+set showmatch
+
+" Les options de formatage.
+set formatoptions=tcq2
+
+
+" ---------- Recherche --------------------------
+" Pour voir tous les matchs d'une recherche
+set hlsearch
+
+" Pour que les matchs soient affichés pendant que vous tapez le mot recherché
+set incsearch
+
+" On ignore la casse des caractères dans les recherches de chaînes en
+" minuscules; par contre, dès qu'une lettre est en majuscule, on tient compte
+" de la casse de toute la chaîne.
+" Pendant la recherche : \c pour ignorer quand même, \C pour case-sensitive
+set ignorecase
+set smartcase
+
+
+" ---------- Fichiers ---------------------------
+" Pour une complétion automatique des noms de fichiers
+set wildmenu
+
+" La façon dont la complétion présente les choix.
+set wildmode=longest,list:longest,full
+
+" La complétion automatique ignore les fichiers suivants.
+set suffixes=.bak.o.aux.dvi.log.toc.tof
+
+
+" ---------- Buffers ----------------------------
+" On veut pouvoir rendre invisible un buffer
+set hidden
+
+" Pour éviter de trop ralentir en faisant défiler le texte pendant l'exécution
+" des macros.
+set lazyredraw
+
+
+" ----------- Interactions ----------------------
+" On affiche en permanence les numéros de ligne et de colonne.
+set ruler
+
+" Pour ne pas se faire bipper tout le temps.
+set noerrorbells
+set visualbell t_vb=
+
+" Pour avoir des messages de vim qui tiennent sur une seule ligne, ce
+" qui évite d'avoir à presser «Enter» pour voir les messages suivants.
+set shortmess=filnrxoOt
+
+" Quand on tape une commande complexe en mode normal, vim affiche ce que l'on
+" a déjà tapé
+set showcmd
+
+
+" ------------ Indentations ---------------------
+" Conserve l'indentation
+set autoindent
+
+" Remplace les <Tab> par des espaces
+set expandtab
+
+" Nombre d'espaces
+set shiftwidth=2
+set softtabstop=2
+
+" Pour que l'indentation ajuste sur un multiple de 'shiftwidth'.
+set shiftround
+
+" ------------ Folding --------------------------
+set foldmethod=indent
+set foldnestmax=10
+set nofoldenable
+set foldlevel=0
+set foldlevelstart=0
+
+
+" ------------ Auto-commandes -------------------
+" On commence par enlever toutes les autocommandes avant de les définir
+" (pour le cas où ce fichier serait lu plusieurs fois.) 
+autocmd!
+
+autocmd BufRead,BufNewFile mutt*[0-9] set nobackup nowritebackup
+autocmd BufRead,BufNewFile .article.* set filetype=mail nobackup
+
+" ledger
+" Don't load ftplugin for ledger
+" autocmd BufReadPre,BufNewFile *ledger* let b:did_ftplugin = 1
+autocmd FileType ledger set textwidth=0
+let g:ledger_main = '~/.ledger/perso'
+
+autocmd FileType puppet set textwidth=0
+
+" ----------- Coloration syntaxique -------------
+syntax enable
+highlight Comment     term=none      ctermfg=darkCyan cterm=none
+highlight Constant    term=underline ctermfg=Blue     cterm=none
+highlight Error       term=reverse   ctermfg=White    ctermbg=Red   cterm=none
+highlight Identifier  term=none      ctermfg=Green    cterm=none
+highlight IncSearch   term=reverse   ctermfg=Blue     ctermbg=White
+highlight Operator    term=none      ctermfg=darkGray cterm=bold
+highlight PreProc     term=underline ctermfg=Magenta  cterm=none
+highlight Search      term=reverse   cterm=reverse
+highlight Special     term=bold      ctermfg=Blue     cterm=bold
+highlight Statement   term=bold      ctermfg=Red      cterm=none
+highlight Todo        term=standout  ctermfg=White    ctermbg=Green cterm=bold 
+highlight Type        term=bold      ctermfg=Brown    cterm=none
+
+highlight link Delimiter   Operator  
+highlight link SpecialChar Special
+
+" lignes "foldées"
+highlight Folded      term=standout  ctermfg=White   ctermbg=Blue cterm=bold
+
+" Pour les diffs (commande vimdiff).
+highlight DiffAdd     term=bold      ctermfg=Green   ctermbg=none cterm=bold
+highlight DiffChange  term=bold      ctermfg=Cyan    ctermbg=none
+highlight DiffDelete  term=bold      ctermfg=Red     ctermbg=none cterm=bold
+highlight DiffText    term=standout  ctermfg=White   ctermbg=Cyan cterm=bold
+
+" ------------- Fonctions, commandes, macros ----
+" Identer les fichiers (json, xml)
+function PRangeFunc(command_line, syntax) range
+  if a:firstline==1 && a:lastline==line('$')
+    execute 'set filetype=' . a:syntax
+    execute 'syntax on'
+  endif
+  execute a:firstline . "," . a:lastline . '!' . a:command_line
+endfunction
+
+command -range=% Pjson normal <Esc>`>a<CR><Esc>mb`<i<CR><Esc>ma:'a,'b-1 call PRangeFunc('python -m json.tool', 'json')<CR>
+command -range=% Pxml  normal <Esc>`>a<CR><Esc>mb`<i<CR><Esc>ma:'a,'b-1 call PRangeFunc('xmllint --format --encode UTF8 -', 'xml')<CR>
+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>
+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>
+command! -range=% Pastebin execute <line1> . "," . <line2> . "w !curl -F 'c=@-' https://ptpb.pw"
+
+noremap <F3> :Autoformat<CR>
+vmap <F8> :Pxml<CR>
+vmap <F9> :Pjson<CR>
+
+" gpg-encryptes files
+let g:GPGPreferArmor=1
+let g:GPGDefaultRecipients=["ismael.bouya@normalesup.org"]
+let g:GPGUsesPipes=1
+
+command Decrypt 1,$!gpg -d -q
+command Encrypt 1,$!gpg -e -q --armor -r ismael.bouya@normalesup.org
+command -range=% Runhash s/:\([_a-zA-Z0-9]\+\)\( \+\)=> \( *\)/\1:\2\3/
+
+function! s:DiffWithSaved()
+  let filetype=&ft
+  diffthis
+  vnew | r # | normal! 1Gdd
+  diffthis
+  exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
+endfunction
+command! DiffSaved call s:DiffWithSaved()
+
+" Load NERDTree on startup if no file were specified
+" autocmd StdinReadPre * let s:std_in=1
+" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
+" Load NERDTree on startup
+"autocmd VimEnter * NERDTree | wincmd p
+let g:vim_tags_auto_generate = 1
+let g:vim_tags_project_tags_command = "ctags -R {OPTIONS} {DIRECTORY} 2>/dev/null"
+map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
+map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
+
+let g:ctrlp_extensions = ['tag', 'buffertag', 'dir', 'undo', 'line']
+set modeline
+
+set grepprg=grep\ -rn\ $*\ /dev/null
+let c_comment_strings=1
+if !exists(":DiffOrig")
+  command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
+                 \ | wincmd p | diffthis
+endif
+
+set list
+set listchars=tab:>-,trail:-
+
diff --git a/roles/tools/handlers/main.yml b/roles/tools/handlers/main.yml
new file mode 100644 (file)
index 0000000..a282512
--- /dev/null
@@ -0,0 +1,5 @@
+---
+- name: reload systemd
+  systemd:
+    daemon_reload: true
+    scope: user
diff --git a/roles/tools/tasks/main.yml b/roles/tools/tasks/main.yml
new file mode 100644 (file)
index 0000000..aa61aab
--- /dev/null
@@ -0,0 +1,48 @@
+---
+- name: Import other tools
+  include_role:
+    name: "{{ item }}"
+  loop:
+    - git
+    - gnupg
+- name: mplayer config file
+  copy:
+    src: mplayer
+    dest: $XDG_CONFIG_HOME/mplayer/config
+- name: psql config file
+  copy:
+    src: psqlrc
+    dest: $XDG_CONFIG_HOME/psql/psqlrc
+- name: psql history directory
+  file:
+    path: $XDG_STATE_HOME/psql
+    state: directory
+- name: vim config file
+  register: vim_result
+  copy:
+    src: vimrc
+    dest: $XDG_CONFIG_HOME/vim/vimrc
+- name: run PlugInstall
+  shell: vim -c PlugInstall -c qa
+  when: vim_result.changed
+- name: tmux config file
+  template:
+    src: tmux.conf.j2
+    dest: $XDG_CONFIG_HOME/tmux/tmux.conf
+- name: youtube viewer config file
+  template:
+    src: youtube-viewer.conf.j2
+    dest: $XDG_CONFIG_HOME/youtube-viewer/youtube-viewer.conf
+- name: remind config file
+  synchronize:
+    recursive: yes
+    archive: no
+    checksum: yes
+    src: remind/commands/
+    dest: /$XDG_CONFIG_HOME/remind/
+- name: remind service file
+  copy:
+    src: remind/remind@.service
+    dest: $XDG_CONFIG_HOME/systemd/user/
+  notify:
+    - reload systemd
diff --git a/roles/tools/templates/tmux.conf.j2 b/roles/tools/templates/tmux.conf.j2
new file mode 100644 (file)
index 0000000..8aad615
--- /dev/null
@@ -0,0 +1,88 @@
+# Pour les nostalgiques de screen
+# comme les raccourcis ne sont pas les mêmes, j'évite
+set-option -g prefix C-a
+unbind-key C-b
+bind-key a send-prefix
+
+bind-key C-d detach
+unbind-key C-z
+bind-key C-z resize-pane -Z
+bind-key h switch-client -t remote
+
+unbind-key )
+unbind-key (
+bind-key -r ( switch-client -p
+bind-key -r ) switch-client -n
+
+bind-key -n M-Left previous-window
+bind-key -n M-Right next-window
+bind-key -n M-PageDown switch-client -n
+bind-key -n M-PageUp switch-client -p
+
+bind-key M set-window-option monitor-activity
+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"'
+
+bind-key C-c run-shell -b "tmux save-buffer - | xclip -i -sel clipboard"
+bind-key C-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
+
+bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary"
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel \; run-shell -b "tmux save-buffer - | xclip -i -selection primary"
+bind-key -T root MouseUp2Pane run-shell "tmux set-buffer \"$(xclip -o -selection primary)\"; tmux paste-buffer"
+
+# même hack que sur screen lorsqu'on veut profiter du scroll du terminal
+# (xterm ...)
+set-option -g terminal-overrides 'xterm*:smcup@:rmcup@:Tc'
+
+# Renumeroter les fenetres quand on en ferme une
+set-option -g renumber-windows on
+
+#Pour les ctrl+arrow
+set-option -g xterm-keys on
+
+# c'est un minimum (defaut 2000)
+set-option -g history-limit 10000
+
+# lorsque j'ai encore un tmux ailleurs seule
+# sa fenetre active réduit la taille de ma fenetre locale
+set-window-option -g aggressive-resize on
+
+# Pour etre alerté sur une alerte dans une autre fenêtre
+set-option -g visual-activity off
+set-option -g visual-bell off
+
+# numéroter a partir de 1, pratique pour l'accès direct
+set-option -g base-index 1
+
+# repercuter le contenu de la fenetre dans la barre de titre
+# reference des string : man tmux (status-left)
+set-option -g set-titles on
+set-option -g set-titles-string '#H #W #T' # host window command
+
+set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY XDG_VTNR"
+
+set-window-option -g window-status-bell-style fg=yellow,bold,underscore
+
+set -g default-terminal screen-256color
+
+set -g mouse on
+
+{% if role.get(profile) == "fretlink" %}
+new-session -A -c "$HOME/workdir/admin-root" -s admin-root
+send-keys "../start" C-m
+rename-window "running"
+new-window
+new-session -A -c "$HOME/workdir/carrier-directory" -s carrier-directory
+send-keys "../start" C-m
+rename-window "running"
+new-window
+new-session -A -c "$HOME/workdir/notifier" -s notifier
+send-keys "../start" C-m
+rename-window "running"
+new-window
+new-session -A -c "$HOME/workdir/geodata" -s geodata
+new-session -A -c "$HOME/workdir/app" -s app
+send-keys "../start" C-m
+rename-window "running"
+new-window
+select-window -t 1
+{% endif %}
diff --git a/roles/tools/templates/youtube-viewer.conf.j2 b/roles/tools/templates/youtube-viewer.conf.j2
new file mode 100644 (file)
index 0000000..3107584
--- /dev/null
@@ -0,0 +1,89 @@
+#!/usr/bin/perl
+
+# Youtube Viewer 3.3.4 - configuration file
+
+our $CONFIG = {
+  auto_captions           => 0,
+  autohide_watched        => 0,
+  cache_dir               => "{{ lookup('env', 'XDG_CACHE_HOME') }}/youtube-viewer",
+  captions_dir            => "/tmp",
+  clobber                 => 0,
+  colors                  => 1,
+  combine_multiple_videos => 0,
+  confirm                 => 0,
+  convert_cmd             => "ffmpeg -i *IN* *OUT*",
+  convert_to              => undef,
+  copy_caption            => 0,
+  dash_mp4_audio          => 1,
+  dash_support            => 1,
+  debug                   => 0,
+  download_and_play       => 0,
+  download_in_parallel    => 0,
+  download_with_wget      => 0,
+  downloads_dir           => ".",
+  env_proxy               => 1,
+  fat32safe               => 0,
+  fullscreen              => 0,
+  get_captions            => 1,
+  get_term_width          => 1,
+  highlight_color         => "bold",
+  highlight_watched       => 0,
+  history                 => 0,
+  history_file            => "{{ lookup('env', 'XDG_STATE_HOME') }}/youtube-viewer/history.txt",
+  history_limit           => 10000,
+  hl                      => "en_US",
+  http_proxy              => undef,
+  interactive             => 1,
+  keep_original_video     => 0,
+  maxResults              => 20,
+  order                   => undef,
+  page                    => 1,
+  publishedAfter          => undef,
+  publishedBefore         => undef,
+  regionCode              => undef,
+  remove_played_file      => 0,
+  resolution              => "original",
+  results_fixed_width     => 0,
+  results_with_colors     => 0,
+  results_with_details    => 0,
+  safeSearch              => undef,
+  skip_if_exists          => 0,
+  srt_languages           => ["en", "fr"],
+  subscriptions_order     => "relevance",
+  thousand_separator      => ",",
+  video_filename_format   => "*FTITLE*.*FORMAT*",
+  video_player_selected   => "mplayer",
+  video_players           => {
+                               mplayer => {
+                                 arg => "-prefer-ipv4 -really-quiet -title *TITLE*",
+                                 audio => "-audiofile *AUDIO*",
+                                 cmd => "/usr/bin/mplayer",
+                                 fs => "-fs",
+                                 novideo => "-novideo",
+                                 srt => "-sub *SUB*",
+                               },
+                               mpv => {
+                                 arg => "--really-quiet --title *TITLE* --no-ytdl",
+                                 audio => "--audio-file *AUDIO*",
+                                 cmd => "mpv",
+                                 fs => "--fullscreen",
+                                 novideo => "--no-video",
+                                 srt => "--sub-file *SUB*",
+                               },
+                               vlc => {
+                                 arg => "--quiet --play-and-exit --no-video-title-show --input-title-format *TITLE*",
+                                 audio => "--input-slave *AUDIO*",
+                                 cmd => "vlc",
+                                 fs => "--fullscreen",
+                                 novideo => "--intf dummy --novideo",
+                                 srt => "--sub-file *SUB*",
+                               },
+                             },
+  videoCaption            => undef,
+  videoDefinition         => undef,
+  videoDimension          => undef,
+  videoDuration           => undef,
+  videoLicense            => undef,
+  videoSyndicated         => undef,
+  youtube_video_url       => "https://www.youtube.com/watch?v=%s",
+}
diff --git a/site.yml b/site.yml
new file mode 100644 (file)
index 0000000..99cf119
--- /dev/null
+++ b/site.yml
@@ -0,0 +1,21 @@
+---
+- hosts: home
+  vars:
+    debug_gnupg_runtime_dir: "d.sa5ao9hmm8xbjif73e5hcsfs"
+    profile: "flony"
+    role:
+      flony: "fretlink"
+    features:
+      flony:
+        - "nodejs"
+        - "graphical_vt"
+  #vars_prompt:
+  #  - name: coucou
+  #    private: true
+  roles:
+    - role: init
+      tags: ["init"]
+    - shell/bash
+    - lxde
+    - tools
+    - contexts/fretlink