@@ -16,6 +16,10 @@ home_vncserver_started_and_enabled: "{{ home_profile == 'vdesk' }}" | |||||
home_vncserver_display_number: 47 | home_vncserver_display_number: 47 | ||||
home_xsession_vncviewer: "{{ home_profile == 'vdesk' }}" | home_xsession_vncviewer: "{{ home_profile == 'vdesk' }}" | ||||
home_vncserver_allow_resize: true | |||||
home_vncserver_geometry: '1920x1200' | |||||
home_profile: desktop | home_profile: desktop | ||||
default_terminal: urxvt | default_terminal: urxvt | ||||
@@ -49,8 +53,8 @@ file_browser_command: thunar | |||||
calculator_command: "{{default_browser}} --new-window https://www.geogebra.org/calculator" | calculator_command: "{{default_browser}} --new-window https://www.geogebra.org/calculator" | ||||
mail_command: thunderbird | mail_command: thunderbird | ||||
background_image: false | |||||
home_copy_all_background_images: false | home_copy_all_background_images: false | ||||
background_image: background/eso0932a.jpg | |||||
home_autostart_terminal: true | home_autostart_terminal: true | ||||
home_autostart_nm_applet: "{{ home_profile != 'vdesk' }}" | home_autostart_nm_applet: "{{ home_profile != 'vdesk' }}" | ||||
@@ -59,3 +63,18 @@ home_autostart_pasystray: "{{ home_profile != 'vdesk' }}" | |||||
home_autostart_unclutter: "{{ home_profile == 'presentation' }}" | home_autostart_unclutter: "{{ home_profile == 'presentation' }}" | ||||
default_activities: [] | default_activities: [] | ||||
workspaces: {} | |||||
i3_hide_bar: false | |||||
i3_hide_border_one_window: false | |||||
home_xhosts_allow: [] | |||||
pulseaudio_load_system_config: true | |||||
pulseaudio_jack_sink_enabled: false | |||||
pulseaudio_jack_sink_channels: 2 | |||||
pulseaudio_jack_sink_client_name: PulseAudio | |||||
pulseaudio_jack_source_enabled: false | |||||
pulseaudio_jack_source_channels: 2 | |||||
pulseaudio_jack_source_client_name: PulseAudio |
@@ -0,0 +1,16 @@ | |||||
#!/usr/bin/fish | |||||
set pipe $argv[1] | |||||
if test (count $argv) -ge 2 | |||||
echo $argv[2] | |||||
end | |||||
if [ ! -p $pipe ] | |||||
echo named pipe $pipe not found | |||||
exit 1 | |||||
end | |||||
while [ -p $pipe ] | |||||
cat $pipe | |||||
end |
@@ -3,17 +3,11 @@ | |||||
set timer_folder ~/.timer | set timer_folder ~/.timer | ||||
set activity_lists_folder $timer_folder/activity.lists | set activity_lists_folder $timer_folder/activity.lists | ||||
set activity_timeclock_file $timer_folder/activity.timeclock | set activity_timeclock_file $timer_folder/activity.timeclock | ||||
set activity_i3blocks $timer_folder/activity.i3blocks | |||||
set activity_i3blocks_linefile $timer_folder/activity.i3blocks | |||||
set activity_current_file $timer_folder/activity.current | set activity_current_file $timer_folder/activity.current | ||||
set activity_timeclock_append_log_folder $timer_folder/activity.timeclock.d | set activity_timeclock_append_log_folder $timer_folder/activity.timeclock.d | ||||
set activity_timeclock_append_log_filename $activity_timeclock_append_log_folder/(date +%Y-%m-%d)-(hostname) | set activity_timeclock_append_log_filename $activity_timeclock_append_log_folder/(date +%Y-%m-%d)-(hostname) | ||||
function set_i3blocks_activity_display | |||||
echo $argv[1] > $activity_i3blocks | |||||
pkill -RTMIN+1 i3blocks | |||||
end | |||||
function parse_activity_timeclock | function parse_activity_timeclock | ||||
sort -k2 | uniq \ | sort -k2 | uniq \ | ||||
|begin | |begin | ||||
@@ -42,10 +36,10 @@ function parse_activity_timeclock | |||||
end | end | ||||
if [ $state = 'i' ] | if [ $state = 'i' ] | ||||
echo $activity > $activity_current_file | echo $activity > $activity_current_file | ||||
set_i3blocks_activity_display "<span foreground=\"#00FF00\">★ $activity</span>" | |||||
echo "<span foreground=\"#00FF00\">★ $activity</span>" > $activity_i3blocks_linefile | |||||
else | else | ||||
rm $activity_current_file | rm $activity_current_file | ||||
set_i3blocks_activity_display "<span foreground=\"#0000FF\">☆</span>" | |||||
echo "<span foreground=\"#0000FF\">☆</span>" > $activity_i3blocks_linefile | |||||
end | end | ||||
end | end | ||||
@@ -69,10 +63,12 @@ end | |||||
function begin_activity | function begin_activity | ||||
echo i (date '+%Y-%m-%d %H:%M:%S') $argv >> $activity_timeclock_append_log_filename | echo i (date '+%Y-%m-%d %H:%M:%S') $argv >> $activity_timeclock_append_log_filename | ||||
echo "<span foreground=\"#00FF00\">★ $argv</span>" > $activity_i3blocks_linefile | |||||
end | end | ||||
function end_activity | function end_activity | ||||
echo o (date '+%Y-%m-%d %H:%M:%S') >> $activity_timeclock_append_log_filename | echo o (date '+%Y-%m-%d %H:%M:%S') >> $activity_timeclock_append_log_filename | ||||
echo "<span foreground=\"#0000FF\">☆</span>" > $activity_i3blocks_linefile | |||||
end | end | ||||
@@ -95,5 +91,3 @@ switch $command | |||||
begin_activity 'Arbeit:Uniklinik Köln' | begin_activity 'Arbeit:Uniklinik Köln' | ||||
end | end | ||||
merge_timeclock_append_log |
@@ -12,6 +12,13 @@ | |||||
scope: user | scope: user | ||||
failed_when: false | failed_when: false | ||||
- name: restart pulseaudio | |||||
systemd: | |||||
name: pulseaudio.service | |||||
state: restarted | |||||
scope: user | |||||
failed_when: false | |||||
- name: i3 reload | - name: i3 reload | ||||
systemd: | systemd: | ||||
name: i3wm.service | name: i3wm.service | ||||
@@ -4,3 +4,6 @@ | |||||
template: | template: | ||||
src: git/gitconfig.j2 | src: git/gitconfig.j2 | ||||
dest: ~/.gitconfig | dest: ~/.gitconfig | ||||
when: | |||||
- git_user_email is defined | |||||
- git_user_name is defined |
@@ -38,6 +38,9 @@ | |||||
dest: ~/.config/systemd/user/i3wm.service | dest: ~/.config/systemd/user/i3wm.service | ||||
notify: systemd daemon-reload | notify: systemd daemon-reload | ||||
- name: flush handlers | |||||
meta: flush_handlers | |||||
- name: i3wm graphical-session service enabled | - name: i3wm graphical-session service enabled | ||||
systemd: | systemd: | ||||
name: i3wm.service | name: i3wm.service | ||||
@@ -6,3 +6,14 @@ | |||||
dest: ~/.pulse-cookie | dest: ~/.pulse-cookie | ||||
mode: 0600 | mode: 0600 | ||||
when: home_copy_pulseaudio_cookie | when: home_copy_pulseaudio_cookie | ||||
- name: pulse directory | |||||
file: | |||||
path: ~/.pulse | |||||
state: directory | |||||
- name: pulse default config | |||||
template: | |||||
src: pulseaudio/default.pa.j2 | |||||
dest: ~/.pulse/default.pa | |||||
notify: restart pulseaudio |
@@ -24,3 +24,8 @@ | |||||
copy: | copy: | ||||
content: "{{ default_activities | join('\n') }}" | content: "{{ default_activities | join('\n') }}" | ||||
dest: "{{timer_folder}}/activity.lists/10-default" | dest: "{{timer_folder}}/activity.lists/10-default" | ||||
- name: timer activity i3blocks linefile | |||||
shell: echo ☆ > {{timer_folder}}/activity.i3blocks | |||||
args: | |||||
creates: "{{timer_folder}}/activity.i3blocks" |
@@ -6,6 +6,18 @@ | |||||
state: directory | state: directory | ||||
mode: 0700 | mode: 0700 | ||||
- name: vnc config | |||||
template: | |||||
src: vnc/config.j2 | |||||
dest: ~/.vnc/config | |||||
mode: 0644 | |||||
- name: vnc env | |||||
template: | |||||
src: vnc/vncserver.env.j2 | |||||
dest: ~/.vnc/vncserver.env | |||||
mode: 0644 | |||||
- name: vnc server config | - name: vnc server config | ||||
template: | template: | ||||
src: vnc/vnc.conf.j2 | src: vnc/vnc.conf.j2 | ||||
@@ -17,7 +17,7 @@ | |||||
src: workspaces/workspace.focus.fish.j2 | src: workspaces/workspace.focus.fish.j2 | ||||
dest: ~/.workspaces/{{workspace}}.focus | dest: ~/.workspaces/{{workspace}}.focus | ||||
mode: 0755 | mode: 0755 | ||||
with_items: "{{workspaces|dict2items|json_query(\"[?value.type=='vncviewer'].key\") }}" | |||||
with_items: "{{ workspaces }}" | |||||
loop_control: | loop_control: | ||||
loop_var: workspace | loop_var: workspace | ||||
@@ -1,3 +1,13 @@ | |||||
[user] | [user] | ||||
{% if git_user_email is defined %} | |||||
email = {{git_user_email}} | email = {{git_user_email}} | ||||
{% endif %} | |||||
{% if git_user_name is defined %} | |||||
name = {{git_user_name}} | name = {{git_user_name}} | ||||
{% endif %} | |||||
[init] | |||||
defaultBranch = main | |||||
{% if github_username is defined %} | |||||
[github] | |||||
user = {{github_username}} | |||||
{% endif %} |
@@ -47,11 +47,13 @@ bindsym XF86HomePage exec {{default_browser}} | |||||
bindsym XF86Calculator exec {{calculator_command}} | bindsym XF86Calculator exec {{calculator_command}} | ||||
## Special modes | ## Special modes | ||||
bindsym $mod+less mode timer | |||||
bindsym $mod+t mode timer | |||||
bindsym $mod+s mode session | bindsym $mod+s mode session | ||||
bindsym $mod+c mode clipboard | bindsym $mod+c mode clipboard | ||||
bindcode $mod+49 mode "remote" | bindcode $mod+49 mode "remote" | ||||
## Activity | |||||
bindsym $mod+less exec "~/bin/timer select_activity" | |||||
## Applications | ## Applications | ||||
bindsym $mod+Return exec "{{default_terminal}}" | bindsym $mod+Return exec "{{default_terminal}}" | ||||
@@ -118,7 +120,6 @@ bindsym $mod+KP_Add exec {{points_up_command}} | |||||
# $mod+l | # $mod+l | ||||
# $mod+n | # $mod+n | ||||
# $mod+o | # $mod+o | ||||
# $mod+t | |||||
# $mod+u | # $mod+u | ||||
# $mod+adiaeresis | # $mod+adiaeresis | ||||
# $mod+odiaeresis | # $mod+odiaeresis | ||||
@@ -167,7 +168,10 @@ bindsym $mod+KP_Add exec {{points_up_command}} | |||||
# Special modes | # Special modes | ||||
bindcode $plexmod+49 mode "session" | bindcode $plexmod+49 mode "session" | ||||
bindsym $plexmod+less mode timer | |||||
# activity | |||||
bindsym $plexmod+less exec "~/bin/timer select_activity" | |||||
{% endmacro %} | {% endmacro %} | ||||
{{ overall() }} | {{ overall() }} | ||||
@@ -336,6 +340,11 @@ mode "resize" { | |||||
### Bar | ### Bar | ||||
bar { | bar { | ||||
{% if i3_hide_bar %} | |||||
mode invisible | |||||
hidden_state hide | |||||
{% endif %} | |||||
position top | position top | ||||
strip_workspace_numbers yes | strip_workspace_numbers yes | ||||
@@ -371,8 +380,13 @@ client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c | |||||
client.background #ffffff | client.background #ffffff | ||||
{% if not i3_hide_border_one_window %} | |||||
default_border normal | default_border normal | ||||
hide_edge_borders both | hide_edge_borders both | ||||
{% else %} | |||||
default_border none | |||||
hide_edge_borders smart | |||||
{% endif %} | |||||
default_floating_border normal | default_floating_border normal | ||||
@@ -32,10 +32,9 @@ markup=none | |||||
# activity | # activity | ||||
[activity] | [activity] | ||||
command=cat ~/.timer/activity.i3blocks | |||||
interval=once | |||||
command=tail -f ~/.timer/activity.i3blocks 2> /dev/null | |||||
interval=persist | |||||
markup=pango | markup=pango | ||||
signal=1 | |||||
# hostinfo | # hostinfo | ||||
[hostinfo] | [hostinfo] | ||||
@@ -60,7 +59,6 @@ interval=10 | |||||
# The type defaults to "mem" if the instance is not specified. | # The type defaults to "mem" if the instance is not specified. | ||||
[memory] | [memory] | ||||
label=MEM | label=MEM | ||||
separator=false | |||||
interval=30 | interval=30 | ||||
[memory] | [memory] | ||||
@@ -73,10 +71,9 @@ interval=30 | |||||
# The directory defaults to $HOME if the instance is not specified. | # The directory defaults to $HOME if the instance is not specified. | ||||
# The script may be called with a optional argument to set the alert | # The script may be called with a optional argument to set the alert | ||||
# (defaults to 10 for 10%). | # (defaults to 10 for 10%). | ||||
#[disk] | |||||
#label=HOME | |||||
#instance=/mnt/data | |||||
#interval=30 | |||||
[disk] | |||||
label=HOME | |||||
interval=30 | |||||
# Battery indicator | # Battery indicator | ||||
# | # | ||||
@@ -0,0 +1,25 @@ | |||||
{{ansible_managed|comment}} | |||||
{% if pulseaudio_load_system_config %} | |||||
.include /etc/pulse/default.pa | |||||
{% endif %} | |||||
.fail | |||||
{% if pulseaudio_jack_sink_enabled %} | |||||
load-module module-jack-sink channels={{pulseaudio_jack_sink_channels}} client_name="{{pulseaudio_jack_sink_client_name}}" connect=0 | |||||
{% endif %} | |||||
{% if pulseaudio_jack_source_enabled %} | |||||
load-module module-jack-source channels={{pulseaudio_jack_source_channels}} client_name="{{pulseaudio_jack_source_client_name}}" connect=0 | |||||
{% endif %} | |||||
{% if pulseaudio_default_sink is defined %} | |||||
set-default-sink {{pulseaudio_default_sink}} | |||||
{% endif %} | |||||
{% if pulseaudio_default_source is defined %} | |||||
set-default-source {{pulseaudio_default_source}} | |||||
{% endif %} | |||||
.ifexists module-x11-publish.so | |||||
load-module module-x11-publish | |||||
.endif |
@@ -0,0 +1 @@ | |||||
{{ ansible_managed | comment }} |
@@ -1,4 +1,4 @@ | |||||
{{ ansible_managed | comment }} | {{ ansible_managed | comment }} | ||||
$desktopName = "{{inventory_hostname}}$ENV{DISPLAY}"; | $desktopName = "{{inventory_hostname}}$ENV{DISPLAY}"; | ||||
$geometry = "1920x1200"; | |||||
$geometry = "{{home_vncserver_geometry}}"; |
@@ -0,0 +1,3 @@ | |||||
{{ ansible_managed | comment }} | |||||
VNCSERVER_OPTIONS="{{vncserver_options|replace('\n',' ')|trim}}" |
@@ -19,8 +19,9 @@ Description=vncserver service - display %i | |||||
After=syslog.target network.target | After=syslog.target network.target | ||||
[Service] | [Service] | ||||
EnvironmentFile=%h/.vnc/vncserver.env | |||||
Type=forking | Type=forking | ||||
ExecStart=/usr/bin/vncserver -autokill %i | |||||
ExecStart=/usr/bin/vncserver -autokill %i $VNCSERVER_OPTIONS | |||||
ExecStop=/usr/bin/vncserver -kill %i | ExecStop=/usr/bin/vncserver -kill %i | ||||
[Install] | [Install] | ||||
@@ -1,7 +1,16 @@ | |||||
#!/usr/bin/fish | #!/usr/bin/fish | ||||
{{ ansible_managed | comment }} | {{ ansible_managed | comment }} | ||||
{% if workspaces[workspace].type is defined %} | |||||
{% if workspaces[workspace].type == "vncviewer" %} | |||||
i3-msg mode remote | i3-msg mode remote | ||||
{% endif %} | |||||
{% endif %} | |||||
{% if workspaces[workspace].activity is defined %} | {% if workspaces[workspace].activity is defined %} | ||||
{% if workspaces[workspace].activity %} | |||||
~/bin/timer begin_activity "{{workspaces[workspace].activity}}" | ~/bin/timer begin_activity "{{workspaces[workspace].activity}}" | ||||
{% else %} | |||||
~/bin/timer end_activity | |||||
{% endif %} | |||||
{% endif %} | {% endif %} |
@@ -11,9 +11,7 @@ xkbset nullify lock | |||||
# background | # background | ||||
xsetroot -solid black | xsetroot -solid black | ||||
{% if background_image is defined %} | |||||
{{background_command}} | {{background_command}} | ||||
{% endif %} | |||||
# Xresources | # Xresources | ||||
xrdb -merge ~/.Xresources | xrdb -merge ~/.Xresources | ||||
@@ -23,3 +21,8 @@ rofi -theme ~/.config/rofi/theme -dump-xresources > ~/.config/rofi/config | |||||
# screensaver settings | # screensaver settings | ||||
/usr/local/bin/screensaver-settings | /usr/local/bin/screensaver-settings | ||||
# allow hosts | |||||
{% for xhost in home_xhosts_allow %} | |||||
xhost +{{xhost}} | |||||
{% endfor %} |
@@ -133,3 +133,8 @@ background_command: feh --no-fehbg --bg-fill {{background_image_path}} | |||||
timer_folder: ~/.timer | timer_folder: ~/.timer | ||||
timer_config: {} | timer_config: {} | ||||
vncserver_options: | | |||||
{% if not home_vncserver_allow_resize %} | |||||
-AcceptSetDesktopSize=0 | |||||
{% endif %} |