Browse Source

current

pull/1/head
parent
commit
1a0621dc37
17 changed files with 174 additions and 164 deletions
  1. +3
    -0
      defaults/main.yaml
  2. +0
    -2
      files/bin/etx
  3. +0
    -0
      files/bin/i3-watchers
  4. +9
    -0
      files/bin/i3-workspace-switcher
  5. +12
    -0
      files/bin/i3block-socket-watcher
  6. +3
    -3
      files/bin/on-focus-workspace
  7. +1
    -1
      files/bin/on-space-shortcut
  8. +0
    -3
      files/bin/timer
  9. +15
    -0
      files/bin/todo
  10. +5
    -0
      tasks/main.yaml
  11. +12
    -0
      tasks/todo.yaml
  12. +10
    -2
      tasks/workspaces.yaml
  13. +9
    -13
      templates/i3/i3.config.j2
  14. +9
    -3
      templates/i3/i3blocks.config.j2
  15. +1
    -1
      templates/path/pathappend.service.j2
  16. +1
    -1
      templates/workspaces/workspace-app.service.j2
  17. +84
    -135
      vars/main.yaml

+ 3
- 0
defaults/main.yaml View File

@@ -56,6 +56,7 @@ home_autostart_terminal: false
home_autostart_nm_applet: false
home_autostart_blueman_applet: false
home_autostart_pasystray: false

home_autostart_unclutter: false

default_activities: []
@@ -87,3 +88,5 @@ pulseaudio_jack_sink_client_name: PulseAudio
pulseaudio_jack_source_enabled: false
pulseaudio_jack_source_channels: 2
pulseaudio_jack_source_client_name: PulseAudio

todo_file: ~/todo.txt

+ 0
- 2
files/bin/etx View File

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

+ 0
- 0
files/bin/i3-watchers View File


+ 9
- 0
files/bin/i3-workspace-switcher View File

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

# active workspaces
#i3-msg -t get_workspaces | jq --raw-output '.[]|select(.num == -1).name'

# configured workspaces
#find .workspaces -mindepth 1 -type d -printf "%f\n"

i3-msg workspace (find .workspaces -mindepth 1 -type d -printf "%f\n" | rofi -dmenu -p workspace )

+ 12
- 0
files/bin/i3block-socket-watcher View File

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

# print one line to unblock i3blocks
echo

# remove socket if it exists already
if test -e $argv[1]
rm $argv[1]
end

# listen to socket
exec socat UNIX-LISTEN:$argv[1],fork -

+ 3
- 3
files/bin/on-focus-workspace View File

@@ -3,17 +3,17 @@
if count $argv
set ws $argv[1]
else
set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name') | grep -oP '([0-9]*:)?\K(.*)'
end

set focus_script ~/.workspaces/$ws.focus
set focus_script ~/.workspaces/$ws/focus
if type -q $focus_script
$focus_script
else
i3-msg mode default
end

set space_script ~/.workspaces/$ws.space
set space_script ~/.workspaces/$ws/space
if type -q $space_script
systemctl --user start workspace-app@$ws.service
end

+ 1
- 1
files/bin/on-space-shortcut View File

@@ -2,7 +2,7 @@

set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')

set space_script ~/.workspaces/$ws.space
set space_script ~/.workspaces/$ws/space
if type -q $space_script
systemctl --user restart workspace-app@$ws.service
end

+ 0
- 3
files/bin/timer View File

@@ -92,7 +92,4 @@ switch $command
case "show_activity"
get_current_timeclock_state

case "uniklinik"
begin_activity 'Arbeit:Uniklinik Köln'

end

+ 15
- 0
files/bin/todo View File

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

set todo_folder ~/.todo
set todo_i3block_socket $todo_folder/i3block.sock

function set_todo_i3block
socat - UNIX-CONNECT:$todo_i3block_socket
end

set command $argv[1]
switch $command

case "finished"
echo finished
end

+ 5
- 0
tasks/main.yaml View File

@@ -9,6 +9,11 @@
- import_tasks: pulseaudio.yaml
- import_tasks: git.yaml
- import_tasks: timer.yaml
tags:
- timer
- import_tasks: todo.yaml
tags:
- todo

- block:
- import_tasks: i3.yaml


+ 12
- 0
tasks/todo.yaml View File

@@ -0,0 +1,12 @@
---

- name: todo directory
file:
path: "{{todo_folder}}"
state: directory

- name: todo file
copy:
content: ""
dest: "{{todo_file}}"
force: false

+ 10
- 2
tasks/workspaces.yaml View File

@@ -12,10 +12,18 @@
path: ~/.workspaces
state: directory

- name: workspace directory
file:
path: ~/.workspaces/{{workspace}}
state: directory
with_items: "{{ workspaces }}"
loop_control:
loop_var: workspace

- name: workspace focus scripts
template:
src: workspaces/workspace.focus.fish.j2
dest: ~/.workspaces/{{workspace}}.focus
dest: ~/.workspaces/{{workspace}}/focus
mode: 0755
with_items: "{{ workspaces }}"
loop_control:
@@ -24,7 +32,7 @@
- name: workspace space shortcut scripts
template:
src: workspaces/workspace.space.fish.j2
dest: ~/.workspaces/{{workspace}}.space
dest: ~/.workspaces/{{workspace}}/space
mode: 0755
with_items: "{{ workspaces }}"
loop_control:


+ 9
- 13
templates/i3/i3.config.j2 View File

@@ -4,7 +4,7 @@
#
# 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 workspace_switcher = "exec --no-startup-id i3-workspace-switcher" %}
{% set on_focus_workspace = "exec --no-startup-id on-focus-workspace" %}

### Font
@@ -35,8 +35,8 @@ bindcode $mod+49 mode "session"

bindcode $mod+9 exec --no-startup-id ~/.xsession.reload.fish

## Activity
bindsym $mod+less exec {{i3_exec_command_prefix}} "timer select_activity"
## Todo
bindsym $mod+x exec {{i3_exec_command_prefix}} todo finished

## Applications
bindsym $mod+Return exec {{i3_exec_command_prefix}} "{{default_terminal}}"
@@ -60,7 +60,7 @@ bindsym $mod+g sticky toggle


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

@@ -101,13 +101,11 @@ bindsym $mod+BackSpace kill
bindsym $mod+q kill
bindsym $mod+f fullscreen
bindsym $mod+r mode resize
bindsym $mod+x exec {{i3_exec_command_prefix}} xkill

# free keys
# $mod+i
# $mod+j
# $mod+k
# $mod+l
# $mod+n
# $mod+m
# $mod+o
@@ -127,6 +125,7 @@ bindsym $mod+x exec {{i3_exec_command_prefix}} xkill
# $mod+Scroll_Lock
# $mod+minus
# $mod+plus
# $mod+less

## stuff that is available in default and remote mode
{% macro overall() %}
@@ -156,9 +155,6 @@ bindsym $mod+x exec {{i3_exec_command_prefix}} xkill
# Special modes
bindcode $plexmod+49 mode "session"

# activity
bindsym $plexmod+less exec "{{i3_exec_command_prefix}} timer select_activity"

{% endmacro %}
{{ overall() }}

@@ -207,11 +203,11 @@ mode "session" {
}


### Timer
mode "timer" {
### Todo
mode "todo" {
bindsym a exec "{{i3_exec_command_prefix}} timer select_activity"; mode "default"; {{on_focus_workspace}}
bindsym e exec "{{i3_exec_command_prefix}} timer end_activity"; mode "default"; {{on_focus_workspace}}
bindsym u exec "{{i3_exec_command_prefix}} timer uniklinik"; mode "default"; {{on_focus_workspace}}
bindsym w exec "{{i3_exec_command_prefix}} todo workspace"; mode "default"; {{on_focus_workspace}}

# back to normal: Escape
bindsym Escape mode "default"; {{on_focus_workspace}}
@@ -299,7 +295,7 @@ bar {

position top

strip_workspace_numbers yes
strip_workspace_numbers no

tray_output primary



+ 9
- 3
templates/i3/i3blocks.config.j2 View File

@@ -30,9 +30,15 @@ command=/usr/share/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=none

# activity
[activity]
command=cat ~/.timer/activity.i3blocks; socat UNIX-LISTEN:$HOME/.timer/activity.i3blocks.sock,fork -
# todo
[todo]
command=i3block-socket-watcher {{todo_i3block_socket}}
interval=persist
markup=pango

# timer
[timer]
command=i3block-socket-watcher {{timer_i3block_socket}}
interval=persist
markup=pango



+ 1
- 1
templates/path/pathappend.service.j2 View File

@@ -5,7 +5,7 @@ Description=append home directory paths to PATH environment variable

[Service]
Type=oneshot
ExecStart=fish -c "for np in ~/.local/bin ~/bin; if not contains $np $PATH; set -x PATH $np $PATH; end; end; systemctl --user import-environment PATH"
ExecStart=fish -c "for np in ~/.local/bin ~/bin; if not contains $np $PATH; set -p PATH $np; end; end; systemctl --user import-environment PATH"

[Install]
WantedBy=default.target

+ 1
- 1
templates/workspaces/workspace-app.service.j2 View File

@@ -6,7 +6,7 @@ PartOf=graphical-session.target
After=xsession-reload.service

[Service]
ExecStart=%h/.workspaces/%i.space
ExecStart=%h/.workspaces/%i/space

[Install]
WantedBy=graphical-session.target

+ 84
- 135
vars/main.yaml View File

@@ -17,175 +17,124 @@ home_autostart_desktop_apps:
command: unclutter
enabled: "{{ home_autostart_unclutter }}"


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


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

background_image_path: ~/.backgrounds/{{background_image|basename}}
background_command: feh --no-fehbg --bg-fill {{background_image_path}}

timer_folder: ~/.timer
timer_i3block_socket: "{{timer_folder}}/i3block.sock"
timer_config: {}

todo_folder: ~/.todo
todo_i3block_socket: "{{todo_folder}}/i3block.sock"

vncserver_options: |
-desktop %H%i