ソースを参照

include eralitex configuration

systemd-xsession
コミット
a33340c903
22個のファイルの変更1156行の追加2行の削除
  1. +40
    -0
      defaults/main.yaml
  2. +2
    -0
      files/bin/etx
  3. +5
    -0
      files/bin/i3-watchers
  4. +17
    -0
      files/bin/on-focus-workspace
  5. +8
    -0
      files/bin/on-space-shortcut
  6. +8
    -0
      files/bin/timer
  7. +1
    -0
      handlers/main.yaml
  8. +121
    -2
      tasks/eralitex.yaml
  9. +3
    -0
      tasks/main.yaml
  10. +8
    -0
      tasks/ssh.yaml
  11. +11
    -0
      tasks/structure.yaml
  12. +2
    -0
      tasks/tmux.yaml
  13. +6
    -0
      tasks/x11.yaml
  14. +24
    -0
      templates/Xmodmap.j2
  15. +28
    -0
      templates/eralitex-vdesk.service.j2
  16. +411
    -0
      templates/i3.config.j2
  17. +108
    -0
      templates/i3blocks.config.j2
  18. +22
    -0
      templates/reload.sh.j2
  19. +148
    -0
      templates/rofi.theme.j2
  20. +34
    -0
      templates/urxvt.Xresources.j2
  21. +30
    -0
      templates/xsession.sh.j2
  22. +119
    -0
      vars/main.yaml

+ 40
- 0
defaults/main.yaml ファイルの表示

@@ -9,3 +9,43 @@ kanboard_api_settings: "{{ lookup('file', '~/.eralitex/kanboard_api_settings.jso
# kanboard_api_url: https://kanboard.katyx.net/jsonrpc.php
# kanboard_api_user: ka
# kanboard_api_key: xxx
home_eralitex_vdesk_started_and_enabled: false

eralitex_directory: ~/.eralitex

eralitex_profile: desktop

eralitex_terminal: urxvt
eralitex_browser: firefox

# feature flags
eralitex_with_activity: false

eralitex_applications:
a: atom
w: lowriter
c: localc
i: loimpress
d: lodraw
F: catfish # search
j: "{{eralitex_jupyter_console_command}}"
s: xfce4-screenshooter
l: catfish
f: "{{eralitex_file_browser_command}}" # files
m: "{{eralitex_mail_command}}"
r: arandr


eralitex_lock_command: /usr/local/bin/screensaver-lock
eralitex_enable_screensaver_command: /usr/local/bin/screensaver-enable
eralitex_disable_screensaver_command: /usr/local/bin/screensaver-disable
eralitex_suspend_command: systemctl suspend
eralitex_reboot_command: systemctl reboot
eralitex_poweroff_command: systemctl poweroff

eralitex_file_browser_command: thunar
eralitex_calculator_command: "{{eralitex_jupyter_console_command}}"
eralitex_jupyter_console_command: jupyter qtconsole --no-confirm-exit
eralitex_mail_command: thunderbird

eralitex_background_image: false

+ 2
- 0
files/bin/etx ファイルの表示

@@ -0,0 +1,2 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-

+ 5
- 0
files/bin/i3-watchers ファイルの表示

@@ -0,0 +1,5 @@
#!/usr/bin/fish

set DIR (cd (dirname (status -f)); and pwd)

i3-msg -t subscribe -m '["workspace"]' | jq --raw-output --unbuffered 'select(.change == "focus").current.name' | xargs -n1 -r $DIR/on-focus-workspace &

+ 17
- 0
files/bin/on-focus-workspace ファイルの表示

@@ -0,0 +1,17 @@
#!/usr/bin/fish

if count $argv
set ws $argv[1]
else
set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
end
set script ~/.eralitex/workspace-cmd/$ws.focus
set oscript ~/.eralitex/workspace-cmd/other-focus

if type -q $script
$script
else
if type -q $oscript
$oscript
end
end

+ 8
- 0
files/bin/on-space-shortcut ファイルの表示

@@ -0,0 +1,8 @@
#!/usr/bin/fish

set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
set script ~/.eralitex/workspace-cmd/$ws.space

if type -q $script
$script
end

+ 8
- 0
files/bin/timer ファイルの表示

@@ -0,0 +1,8 @@
#!/usr/bin/fish

switch $argv[1]
case "activity"
/opt/activity/select_activity
case "end"
/opt/activity/activity
end

+ 1
- 0
handlers/main.yaml ファイルの表示

@@ -1,4 +1,5 @@
---

- name: systemd daemon-reload
systemd:
daemon_reload: yes


+ 121
- 2
tasks/eralitex.yaml ファイルの表示

@@ -1,7 +1,115 @@
---

- import_role:
name: eralitex
- name: eralitex directory
file:
path: "{{eralitex_directory}}"
state: directory

- name: profile directories
file:
path: "{{eralitex_directory}}/{{item}}"
state: directory
with_items: "{{ eralitex_profiles }}"

- name: i3 config
template:
src: i3.config.j2
dest: "{{eralitex_directory}}/{{item}}/i3.config"
with_items: "{{ eralitex_profiles }}"

- name: check i3 config
command: i3 -c {{eralitex_directory}}/{{item}}/i3.config -C
with_items: "{{ eralitex_profiles }}"
changed_when: false

- name: i3blocks config
template:
src: i3blocks.config.j2
dest: "{{eralitex_directory}}/{{item}}/i3blocks.config"
with_items: "{{ eralitex_profiles }}"

- name: xsession scripts
template:
src: xsession.sh.j2
dest: "{{eralitex_directory}}/{{item}}/xsession"
mode: 0755
with_items: "{{ eralitex_profiles }}"

- name: session reload scripts
template:
src: reload.sh.j2
dest: "{{eralitex_directory}}/{{item}}/reload"
mode: 0755
with_items: "{{ eralitex_profiles }}"

- name: rofi themes
template:
src: rofi.theme.j2
dest: "{{eralitex_directory}}/{{item}}/rofi.theme"
mode: 0755
with_items: "{{ eralitex_profiles }}"

- name: Xmodmap
template:
src: Xmodmap.j2
dest: "{{eralitex_directory}}/Xmodmap"

- name: urxvt Xresources system config
template:
src: urxvt.Xresources.j2
dest: "{{eralitex_directory}}/urxvt.Xresources"

- name: eralitex bin directory
copy:
src: bin/
dest: "{{eralitex_directory}}/bin/"
mode: 0755

- name: link selected profile as active
file:
dest: "{{eralitex_directory}}/active-profile"
src: "{{eralitex_profile}}"
state: link

- name: vdesk user service
template:
src: eralitex-vdesk.service.j2
dest: ~/.config/systemd/user/eralitex@.service

- name: link etx cli utility from users bin
file:
dest: ~/bin/etx
src: "{{eralitex_directory}}/bin/etx"
state: link

- name: link selected profile as active
file:
dest: "{{eralitex_directory}}/active-profile"
src: "{{eralitex_profile}}"
state: link

- name: points counter
copy:
content: 0
dest: "{{eralitex_directory}}/points"
force: no

- name: background image directory
file:
path: "{{eralitex_directory}}/backgrounds"
state: directory
when: eralitex_background_image is defined

- name: background image
copy:
src: "{{eralitex_background_image}}"
dest: "{{eralitex_background_image_path}}"
when: eralitex_background_image is defined

- name: workspace-cmd directory
file:
path: "{{eralitex_directory}}/workspace-cmd"
state: directory

- name: other workspace focus script
template:
@@ -34,3 +142,14 @@
src: vnc-options.fish.j2
dest: ~/.eralitex/workspace-cmd/vnc-options
mode: 0755

- name: flush handlers
meta: flush_handlers

- name: enable and start eralitex vdesk user service
systemd:
name: eralitex@:16.service
state: started
enabled: true
user: true
when: home_eralitex_vdesk_started_and_enabled

+ 3
- 0
tasks/main.yaml ファイルの表示

@@ -1,5 +1,6 @@
---

- import_tasks: structure.yaml
- import_tasks: ssh.yaml
- import_tasks: vnc.yaml
- import_tasks: tmux.yaml
@@ -8,3 +9,5 @@

- import_tasks: eralitex.yaml
when: home_eralitex
- import_tasks: x11.yaml
when: home_eralitex

+ 8
- 0
tasks/ssh.yaml ファイルの表示

@@ -17,3 +17,11 @@
line: Include config.auto
insertbefore: BOF
create: true

- name: enable and start ssh-agent user service
systemd:
name: ssh-agent.service
state: started
enabled: true
user: true
when: home_eralitex_vdesk_started_and_enabled

+ 11
- 0
tasks/structure.yaml ファイルの表示

@@ -0,0 +1,11 @@
---

- name: ~/bin directory
file:
path: ~/bin
state: directory

- name: systemd user config directory
file:
path: ~/.config/systemd/user
state: directory

+ 2
- 0
tasks/tmux.yaml ファイルの表示

@@ -10,11 +10,13 @@
file:
path: ~/.config/systemd/user
state: directory

- name: tmux systemd user service unit
template:
src: tmux@.service.j2
dest: ~/.config/systemd/user/tmux@.service
notify: systemd daemon-reload

- name: tmux systemd user service unit
template:
src: tmux@.service.j2


+ 6
- 0
tasks/x11.yaml ファイルの表示

@@ -0,0 +1,6 @@
---

- name: xsessionrc
copy:
content: exec fish {{eralitex_directory}}/active-profile/xsession
dest: ~/.xsessionrc

+ 24
- 0
templates/Xmodmap.j2 ファイルの表示

@@ -0,0 +1,24 @@
! {{ ansible_managed }}
!
! xmodmap {{eralitex_directory}}/Xmodmap
!
! default modifier configuration
!
!xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
!
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x42)
!control Control_L (0x25), Control_R (0x69)
!mod1 Alt_L (0x40), Meta_L (0xcd)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
!mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

clear lock
clear mod3
clear mod4

keycode 66 = Hyper_L
add mod3 = Hyper_L
add mod4 = Super_L

+ 28
- 0
templates/eralitex-vdesk.service.j2 ファイルの表示

@@ -0,0 +1,28 @@
{{ ansible_managed | comment }}

#
# /usr/lib/systemd/user/vncserver@.service
#
# 1. Switches for vncserver should be entered in ~/.vnc/config rather than
# hard-coded into this unit file. See the vncserver(1) manpage.
#
# 2. Users wishing for the server to continue running after the owner logs
# out MUST enable 'linger' with loginctl like this:
# `loginctl enable-linger username`
#
# 3. The server can be enabled and started like this once configured:
# `systemctl --user start eralitex@:<display>.service`
# `systemctl --user enable eralitex@:<display>.service`

[Unit]
Description=eralitex vdesk service - display %i
After=syslog.target network.target

[Service]
Type=forking
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/fish -c "/usr/bin/vncserver -xstartup {{eralitex_directory}}/vdesk/xsession %i"
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=default.target

+ 411
- 0
templates/i3.config.j2 ファイルの表示

@@ -0,0 +1,411 @@
{{ ansible_managed | comment }}

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

{% set workspace_switcher = "exec fish -c \"i3-msg workspace (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.num == -1).name' | rofi -dmenu -p workspace )\"" %}
{% set on_focus_workspace = "exec --no-startup-id " + eralitex_directory + "/bin/on-focus-workspace" %}


### Font
font pango:Terminus 14px



### Modifier Key
set $mod Mod4
set $plexmod Mod3

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod


### key patterns
set $up l
set $down k
set $left j
set $right odiaeresis


### default/local mode

## special keys
bindsym XF86Sleep exec {{eralitex_lock_command}}
bindsym XF86Mail exec {{eralitex_mail_command}}
bindsym XF86HomePage exec {{eralitex_browser}}
bindsym XF86Calculator exec {{eralitex_calculator_command}}

## Special modes
bindsym $mod+t mode timer
bindsym $mod+s mode session
bindsym $mod+c mode clipboard
bindcode $mod+49 mode "remote"


## Applications
bindsym $mod+Return exec "{{eralitex_terminal}}"
bindsym $mod+b exec "{{eralitex_browser}}"
bindsym $mod+d exec rofi -show drun -show-icons
bindsym $mod+e exec rofi -show run
bindsym $mod+a mode "apps"
bindsym $mod+space exec "{{eralitex_directory}}/bin/on-space-shortcut"


## Workspaces
bindsym $mod+w {{workspace_switcher}}
{% for ws in eralitex_numbered_workspace_keymaps %}
bindsym $mod+{{ws.keysym}} workspace "{{ws.workspace}}"
{% endfor %}
# focus workspace
bindsym $mod+Prior workspace next
bindsym $mod+Next workspace prev
bindsym $mod+ssharp scratchpad show
bindsym $mod+g sticky toggle


## Layout
bindsym $mod+y mode "layout"
bindsym $mod+h split h
bindsym $mod+v split v

## Focus
bindsym $mod+Left focus left
bindsym $mod+$left focus left
bindsym $mod+Down focus down
bindsym $mod+$down focus down
bindsym $mod+Up focus up
bindsym $mod+$up focus up
bindsym $mod+Right focus right
bindsym $mod+$right focus right
bindsym $mod+p focus parent
# change focus between tiling / floating windows
bindsym $mod+Tab focus mode_toggle

## Window
# The middle button over a titlebar kills the window
bindsym --release button2 kill
# The middle button and a modifer over any part of the window kills the window
bindsym --whole-window $mod+button2 kill
bindsym $mod+BackSpace kill
bindsym $mod+q kill
bindsym $mod+f fullscreen
bindsym $mod+z floating toggle
bindsym $mod+m mode move
bindsym $mod+r mode resize
bindsym $mod+x exec xkill

# points
bindsym $mod+minus exec {{eralitex_points_down_command}}
bindsym $mod+plus exec {{eralitex_points_up_command}}

# unlearn
#exec {{eralitex_points_down_command}}


## stuff that is available in default and remote mode
{% macro overall() %}

{% if item == "desktop" %}
bindsym $plexmod+space exec "{{eralitex_directory}}/bin/on-space-shortcut"
bindsym $plexmod+BackSpace kill
bindsym $plexmod+w {{workspace_switcher}}

{% for ws in eralitex_numbered_workspace_keymaps %}
bindsym $plexmod+{{ws.keysym}} workspace "{{ws.workspace}}"
{% endfor %}
{% for ws in eralitex_letter_workspace_keymaps %}
bindsym $plexmod+{{ws.keysym}} workspace "{{ws.workspace}}"
{% endfor %}
# focus workspace
bindsym $plexmod+Prior workspace next
bindsym $plexmod+Next workspace prev
{% endif %}

# focus output
bindsym $plexmod+Shift+p focus output primary
bindsym $plexmod+Shift+o exec fish -c "i3-msg focus output ( i3-msg -t get_outputs | jq --raw-output '.[]|select(.active == true).name' | rofi -dmenu -p 'focus output' )"
bindsym $plexmod+Left focus output left
bindsym $plexmod+Down focus output down
bindsym $plexmod+Up focus output up
bindsym $plexmod+Right focus output right

# Special modes
bindsym $plexmod+s mode session
bindsym $plexmod+t mode timer
{% endmacro %}
{{ overall() }}


### remote mode
mode "remote" {

bindcode $mod+9 mode "default"
bindsym XF86Sleep exec {{eralitex_lock_command}}

# The middle button over a titlebar kills the window
bindsym --release button2 kill

{{ overall() }}

}



### Applications mode
mode "apps" {
{% for key, app in eralitex_applications.iteritems() %}
bindsym {{key}} exec {{app}}; mode "default"
{% endfor %}
bindsym Escape mode "default"
}



### Session
mode "session" {
bindsym q exit
bindsym r reload; exec --no-startup-id {{eralitex_directory}}/{{item}}/reload; mode "default"; {{on_focus_workspace}}
bindsym s exec --no-startup-id {{eralitex_lock_command}}; exec --no-startup-{{eralitex_suspend_command}}; mode "default"; {{on_focus_workspace}}
bindsym x exec --no-startup-id {{eralitex_lock_command}}; mode "default"; {{on_focus_workspace}}
bindsym e exec --no-startup-id {{eralitex_enable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
bindsym d exec --no-startup-id {{eralitex_disable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
bindsym b exec --no-startup-id xsetroot -solid black; mode "default"; {{on_focus_workspace}}
bindsym Shift+R exec --no-startup-id {{eralitex_reboot_command}}; mode "default"; {{on_focus_workspace}}
bindsym Shift+P exec --no-startup-id {{eralitex_poweroff_command}}; mode "default"; {{on_focus_workspace}}

# back to normal: Escape
bindsym Escape mode "default"; {{on_focus_workspace}}
}


### Timer
mode "timer" {
bindsym a exec "{{eralitex_directory}}/bin/timer activity"; mode "default"; {{on_focus_workspace}}
bindsym e exec "{{eralitex_directory}}/bin/timer end"; mode "default"; {{on_focus_workspace}}
bindsym u exec "{{eralitex_directory}}/bin/timer update"; mode "default"; {{on_focus_workspace}}

# back to normal: Escape
bindsym Escape mode "default"; {{on_focus_workspace}}
}

### Clipboard
mode "clipboard" {
# back to normal: Escape
bindsym Escape mode "default"
}


### Layout
# set default layout to tabbed
workspace_layout tabbed

mode "layout" {
bindsym s layout stacking; mode "default";
bindsym t layout tabbed; mode "default";
bindsym e layout toggle split; mode "default";
bindsym h layout splith; mode "default"
bindsym v layout splitv; mode "default"

bindsym b mode bar

# back to normal: Escape
bindsym Escape mode "default"
}

mode "bar" {
bindsym h bar mode hide; mode "default"
bindsym d bar mode dock; mode "default"

# back to normal: Escape
bindsym Escape mode "default"
}

### Move mode
mode "move" {

# move window
bindsym Left move left
bindsym $left move left
bindsym Down move down
bindsym $down move down
bindsym Up move up
bindsym $up move up
bindsym Right move right
bindsym $right move right

# move window to workspace
{% for ws in eralitex_numbered_workspace_keymaps %}
bindsym {{ws.keysym}} move container to workspace "{{ws.workspace}}"; mode "default"
{% endfor %}
bindsym w exec fish -c "i3-msg move container to workspace (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.num == -1).name' | rofi -dmenu -p 'move to workspace' )"; mode "default"
bindsym ssharp move scratchpad

# move workspace to output
bindsym Shift+Left move workspace to output left
bindsym Shift+$left move workspace to output left
bindsym Shift+Down move workspace to output down
bindsym Shift+$down move workspace to output down
bindsym Shift+Up move workspace to output up
bindsym Shift+$up move workspace to output up
bindsym Shift+Right move workspace to output right
bindsym Shift+$right move workspace to output right

bindsym o exec fish -c "i3-msg move workspace to output ( i3-msg -t get_outputs | jq --raw-output '.[]|select(.active == true).name' | rofi -dmenu -p 'move workspace to output' )"; mode "default"
bindsym p move workspace to output primary; mode "default"

# back to normal: Escape
bindsym Escape mode "default"
}



### Resize window mode
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode

# Pressing left will shrink the window’s width.
bindsym Left resize shrink width 10 px or 10 ppt
bindsym $left resize shrink width 10 px or 10 ppt
# Pressing down will grow the window’s height.
bindsym Down resize grow height 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
# Pressing up will shrink the window’s height.
bindsym Up resize shrink height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
# Pressing right will grow the window’s width.
bindsym Right resize grow width 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt

bindsym 1 resize set 10 ppt 10 ppt; mode "default"
bindsym 2 resize set 20 ppt 20 ppt; mode "default"
bindsym 3 resize set 30 ppt 30 ppt; mode "default"
bindsym 4 resize set 40 ppt 40 ppt; mode "default"
bindsym 5 resize set 50 ppt 50 ppt; mode "default"
bindsym 6 resize set 60 ppt 60 ppt; mode "default"
bindsym 7 resize set 70 ppt 70 ppt; mode "default"
bindsym 8 resize set 80 ppt 80 ppt; mode "default"
bindsym 9 resize set 90 ppt 90 ppt; mode "default"
bindsym 0 resize set 100 ppt 100 ppt; mode "default"

bindsym v resize set 640 480; mode "default"
bindsym y resize set 870 628; mode "default"

# back to normal: Escape
bindsym Escape mode "default"
}



### Bar
bar {
position top

strip_workspace_numbers yes

tray_output primary

status_command "i3blocks -c {{eralitex_directory}}/{{item}}/i3blocks.config"

colors {
background #000000
statusline #ffffff
separator #666666

# <colorclass> <border> <background> <text>
{% if item == "desktop" %}
# lila: Farbton 274
focused_workspace #774C99 #552877 #ffffff
{% endif %}
{% if item == "vdesk" %}
# grün: Farbton 110
focused_workspace #4D994C #357728 #ffffff
{% endif %}
{% if item == "presentation" %}
# gelb: Farbton 60
focused_workspace #99994C #777728 #ffffff
{% endif %}
active_workspace #333333 #696969 #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
binding_mode #2f343a #900000 #ffffff
}
}



### Design

# class border backgr. text indicator child_border
{% if item == "desktop" %}
# lila: Farbton 274
client.focused #784C99 #552877 #ffffff #9E2EF4 #552877
{% endif %}
{% if item == "vdesk" %}
# grün: Farbton 110
client.focused #59994C #357728 #ffffff #4FF42E #357728
{% endif %}
{% if item == "presentation" %}
# gelb: Farbton 60
client.focused #99994C #777728 #ffffff #F4F42E #777728
{% endif %}
client.focused_inactive #333333 #6A6A6A #ffffff #505050 #6A6A6A
client.unfocused #333333 #222222 #888888 #2E2E2E #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c

client.background #ffffff

default_border normal
hide_edge_borders both

default_floating_border normal

### general settings

focus_on_window_activation urgent



### Application specific rule

for_window [class="^Vncviewer$"] border none
for_window [window_role="^About$"] floating enable
for_window [class="^Pavu"] floating enable
for_window [class="^Paman$"] floating enable
for_window [class="^Blueman"] floating enable
for_window [class="^URxvt$" title="^tmux-workspace$"] border none



### Autostart

exec "{{eralitex_terminal}}"

{% if item == "desktop" %}
exec --no-startup-id "{{eralitex_directory}}/bin/i3-watchers"
{% endif %}

### free keys
# $mod+i
# $mod+j
# $mod+k
# $mod+l
# $mod+n
# $mod+o
# $mod+u
# $mod+adiaeresis
# $mod+odiaeresis
# $mod+udiaeresis
# $mod+comma
# $mod+period
# $mod+numbersign
# $mod+Home
# $mod+End
# $mod+Pause
# $mod+Delete
# $mod+Insert
# $mod+Print
# $mod+Scroll_Lock
# $mod+less

+ 108
- 0
templates/i3blocks.config.j2 ファイルの表示

@@ -0,0 +1,108 @@
{{ ansible_managed | comment }}

# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent

# Global properties
#
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
command=/usr/share/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=none

{% if eralitex_with_activity %}
# activity
[activity]
command=/opt/activity/i3blocks-activity
interval=persist
markup=pango
{% endif %}

# hostinfo
[hostinfo]
command=echo "$USER@`hostname -s`"
interval=once

# Load Average
[load_average]
interval=10

# CPU usage
#
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
#[cpu_usage]
#label=CPU
#interval=10
#min_width=CPU: 100.00%

# Memory usage
#
# The type defaults to "mem" if the instance is not specified.
[memory]
label=MEM
separator=false
interval=30

[memory]
label=SWAP
instance=swap
interval=30

# Disk usage
#
# The directory defaults to $HOME if the instance is not specified.
# The script may be called with a optional argument to set the alert
# (defaults to 10 for 10%).
#[disk]
#label=HOME
#instance=/mnt/data
#interval=30

# Battery indicator
#
# The battery instance defaults to 0.
[battery]
#label=BAT
label=⚡
#instance=1
interval=30

# Volume indicator
#
# The first parameter sets the step (and units to display)
# The second parameter overrides the mixer selection
# See the script for details.
[volume]
#label=VOL
label=♪
instance=Master
#instance=PCM
interval=once
signal=10

# Date Time
#
[time]
command=date '+%Y-%m-%d W%V %a %H:%M %Z'
interval=5

+ 22
- 0
templates/reload.sh.j2 ファイルの表示

@@ -0,0 +1,22 @@
#!/usr/bin/fish

# keymap
setxkbmap de
xmodmap {{eralitex_directory}}/Xmodmap
setxkbmap -option caps:hyper
xmodmap {{eralitex_directory}}/Xmodmap

# background
xsetroot -solid black
{% if eralitex_background_image is defined %}
{{eralitex_background_command}}
{% endif %}

# urxvt config
xrdb -merge {{eralitex_directory}}/urxvt.Xresources

# rofi config
rofi -theme {{eralitex_directory}}/{{item}}/rofi.theme -dump-xresources | xrdb -merge

# screensaver settings
/usr/local/bin/screensaver-settings

+ 148
- 0
templates/rofi.theme.j2 ファイルの表示

@@ -0,0 +1,148 @@
/******************************************************************************
* ROFI Color theme
* User: Rasi
* Copyright: Rasmus Steinke
******************************************************************************/
* {

border-color: #333333;
separatorcolor: #6A6A6A;

foreground: #888888;
input-foreground: #ffffff;
normal-foreground: #888888;
urgent-foreground: #ffffff;
active-foreground: #ffffff;
selected-normal-foreground: #ffffff;
selected-urgent-foreground: #ffffff;
selected-active-foreground: #ffffff;

background-color: #222222;
background: #222222;
normal-background: #222222;
urgent-background: #900000;
active-background: #6A6A6A;

selected-urgent-background: #2f343a;
{% if item == "desktop" %}
selected-normal-background: #552877;
selected-active-background: #784C99;
{% endif %}
{% if item == "vdesk" %}
selected-normal-background: #357728;
selected-active-background: #59994C;
{% endif %}
{% if item == "presentation" %}
selected-normal-background: #99994C;
selected-active-background: #777728;
{% endif %}

spacing: 2;

font: "Terminus 12";
}
#window {
background-color: @background;
border: 1;
padding: 5;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
text-color: @input-foreground;
}
#listview {
fixed-height: 0;
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
spacing: 2px ;
scrollbar: true;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @active-foreground;
}
#scrollbar {
width: 4px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
#entry {
spacing: 0;
text-color: @input-foreground;
}
#prompt {
spacing: 0;
text-color: @normal-foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @normal-foreground;
}

+ 34
- 0
templates/urxvt.Xresources.j2 ファイルの表示

@@ -0,0 +1,34 @@
! set font to Terminus
urxvt*font: xft:Terminus:pixelsize=14
urxvt*boldFont: xft:Terminus:pixelsize=14

! set colors
URxvt*background: black
URxvt*foreground: white

! save number lines in the scrollback buffer
URxvt.saveLines: 10000

! disable scrollbar
URxvt*scrollBar: false

! do not scroll with output
URxvt*scrollTtyOutput: false

! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt*scrollWithBuffer: true

! scroll back to the bottom on keypress
URxvt*scrollTtyKeypress: true

! scrollback buffer in secondary screen
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0

{% if not ansible_lsb.id == "Raspbian" %}
! fake transparency
urxvt*transparent: true
urxvt*shading: 30
! https://bbs.archlinux.org/viewtopic.php?id=222070
URxvt*ineheritPixmap: true
{% endif %}

+ 30
- 0
templates/xsession.sh.j2 ファイルの表示

@@ -0,0 +1,30 @@
#!/usr/bin/fish

{{ ansible_managed | comment }}



# set PATH so it includes users
# private bin directory if it exists
if test -d "$HOME/bin"
set -x PATH "$HOME/bin:$PATH"
end

# reload script
source {{eralitex_directory}}/{{item}}/reload

{% if item != "vdesk" %}
blueman-applet &
pasystray &
nm-applet &
{% endif %}

{% if item != "presentation" and item != "vdesk" %}
/usr/local/bin/screensaver-start &
{% endif %}

{% if item == "presentation" %}
unclutter &
{% endif %}

exec /usr/bin/i3 -c {{eralitex_directory}}/{{item}}/i3.config

+ 119
- 0
vars/main.yaml ファイルの表示

@@ -0,0 +1,119 @@
eralitex_profiles:
- desktop
- vdesk
- presentation

eralitex_numbered_workspace_keymaps:
- keysym: 1
workspace: 1
- keysym: 2
workspace: 2
- keysym: 3
workspace: 3
- keysym: 4
workspace: 4
- keysym: 5
workspace: 5
- keysym: 6
workspace: 6
- keysym: 7
workspace: 7
- keysym: 8
workspace: 8
- keysym: 9
workspace: 9
- keysym: 0
workspace: 10
- keysym: F1
workspace: 11
- keysym: F2
workspace: 12
- keysym: F3
workspace: 13
- keysym: F4
workspace: 14
- keysym: F5
workspace: 15
- keysym: F6
workspace: 16
- keysym: F7
workspace: 17
- keysym: F8
workspace: 18
- keysym: F9
workspace: 19
- keysym: F10
workspace: 20
- keysym: F11
workspace: 21
- keysym: F12
workspace: 22


eralitex_letter_workspace_keymaps:
- keysym: a
workspace: 23:a
- keysym: b
workspace: 24:b
- keysym: c
workspace: 25:c
- keysym: d
workspace: 26:d
- keysym: e
workspace: 27:e
- keysym: f
workspace: 28:f
- keysym: g
workspace: 29:g
- keysym: h
workspace: 30:h
- keysym: i
workspace: 31:i
- keysym: j
workspace: 32:j
- keysym: k
workspace: 33:k
- keysym: l
workspace: 34:l
- keysym: m
workspace: 35:m
- keysym: n
workspace: 36:n
- keysym: o
workspace: 37:o
- keysym: p
workspace: 38:p
- keysym: q
workspace: 39:q
- keysym: r
workspace: 40:r
# - keysym: s
# workspace: 41:s
# - keysym: t
# workspace: 42:t
- keysym: u
workspace: 43:u
- keysym: v
workspace: 44:v
#- keysym: w
# workspace: 45:w
- keysym: x
workspace: 46:x
- keysym: y
workspace: 47:y
- keysym: z
workspace: 48:z
- keysym: adiaeresis
workspace: 49:ä
- keysym: odiaeresis
workspace: 50:ö
- keysym: udiaeresis
workspace: 51:ü
- keysym: ssharp
workspace: 52:ß

eralitex_points_up_command: fish -c "echo (expr (cat ~/.eralitex/points) + 1 > ~/.eralitex/points) (i3-nagbar -m (cat ~/.eralitex/points)\ €)"
eralitex_points_down_command: fish -c "echo (expr (cat ~/.eralitex/points) - 1 > ~/.eralitex/points) (i3-nagbar -m (cat ~/.eralitex/points)\ €)"

eralitex_background_image_path: "{{eralitex_directory}}/backgrounds/{{eralitex_background_image|basename}}"
eralitex_background_command: feh --no-fehbg --bg-fill {{eralitex_background_image_path}}