Compare commits

...

2 Commits

Author SHA1 Message Date
7d4487dd9f Add more packages to install 2023-11-07 18:36:43 +01:00
c3aec9f626 Add timekpr 2023-11-07 18:09:29 +01:00
5 changed files with 131 additions and 31 deletions

View File

@ -64,11 +64,14 @@
- firefox
- flameshot
- gnome-backgrounds
- gnome-text-editor
- gnome-themes-extra
- gsimplecal
- network-manager-applet
- nm-connection-editor
- nautilus
- numlockx
- openscad
- pavucontrol
- pasystray
- picom
@ -83,7 +86,10 @@
community.general.pacman:
name:
- ttf-dejavu
- ttf-fira-code
- ttf-font-awesome
- ttf-liberation
- ttf-symbola
- ttf-ubuntu-font-family
- name: "Enable network manager"

View File

@ -8,4 +8,4 @@
- import_tasks: dotfiles.yml
- import_tasks: signal.yml
#- import_tasks: timekpr.yml
- import_tasks: timekpr.yml

View File

@ -0,0 +1,34 @@
- become: yes
block:
- name: add ppa [Ubuntu]
when: ansible_distribution == "Ubuntu"
apt_repository:
repo: ppa:mjasnik/ppa
- name: install timekpr [Ubuntu]
when: ansible_distribution == "Ubuntu"
apt:
update_cache: yes
state: latest
pkg:
- timekpr-next
- name: install timekpr [Arch]
shell:
cmd:
yay -S --needed --noconfirm timekpr-next
when: ansible_distribution == "Archlinux"
- name: configure
template:
src: var/lib/timekpr/config/timekpr.USER.conf.j2
dest: /var/lib/timekpr/config/timekpr.{{ansible_user_id}}.conf
vars:
user: "{{ ansible_user_id }}"
- name: "Enable service"
become: yes
ansible.builtin.systemd:
name: timekpr
state: started
enabled: yes

View File

@ -0,0 +1,51 @@
[DOCUMENTATION]
#### this is the user configuration file for timekpr-next
#### if this file cannot be read properly, it will be overwritten with defaults
#### all numeric time values are specified in seconds
#### days and hours should be configured as per ISO 8601 (i.e. Monday is the first day of week (1-7) and hours are in 24h format (0-23))
[{{ user }}]
# this defines which hours are allowed (remove or add hours to limit access), configure limits for start/end minutes for hour in brackets,
# optionally enter ! in front of hour to mark it non-accountable, example: !22[00-15]
ALLOWED_HOURS_1 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
ALLOWED_HOURS_2 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
ALLOWED_HOURS_3 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
ALLOWED_HOURS_4 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
ALLOWED_HOURS_5 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
ALLOWED_HOURS_6 = 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
ALLOWED_HOURS_7 = 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
# this defines which days of the week a user can use computer (remove or add days to limit access)
ALLOWED_WEEKDAYS = 1;2;3;4;5;6;7
# this defines allowed time in seconds per week day a user can use the computer (number of values must match the number of values for option ALLOWED_WEEKDAYS)
LIMITS_PER_WEEKDAYS = 86400;86400;86400;86400;86400;86400;86400
# this defines allowed time per week in seconds (in addition to other limits)
LIMIT_PER_WEEK = 604800
# this defines allowed time per month in seconds (in addition to other limits)
LIMIT_PER_MONTH = 2678400
# this defines whether to account sessions which are inactive (locked screen, user switched away from desktop, etc.)
TRACK_INACTIVE = False
# this defines whether to show icon and notifications for user
HIDE_TRAY_ICON = False
# this defines user restriction / lockout mode: lock - lock screen, suspend - put computer to sleep, suspendwake - put computer to sleep and wake it up,
# terminate - terminate sessions, shutdown - shutdown the computer
LOCKOUT_TYPE = terminate
# this defines wakeup hour interval in format xn;yn where xn / yn are hours from 0 to 23, wakeup itself must be supported by BIOS / UEFI and enabled,
# this is effective only when lockout type is suspendwake
WAKEUP_HOUR_INTERVAL = 0;23
[{{ user }}.PLAYTIME]
# whether PlayTime is enabled for this user
PLAYTIME_ENABLED = False
# whether PlayTime is enabled to override existing time accounting, i.e. time ticks only when PlayTime processes / activities are running,
# in this case explicit PlayTime limits are ignored
PLAYTIME_LIMIT_OVERRIDE_ENABLED = False
# whether PlayTime activities are allowed during unaccounted time intervals
PLAYTIME_UNACCOUNTED_INTERVALS_ENABLED = True
# specify on which days PlayTime is enabled
PLAYTIME_ALLOWED_WEEKDAYS = 1;2;3;4;5;6;7
# how much PlayTime is allowed per allowed days (number of values must match the number of values for option PLAYTIME_ALLOWED_WEEKDAYS)
PLAYTIME_LIMITS_PER_WEEKDAYS = 0;0;0;0;0;0;0
# this defines which activities / processes are monitored, pattern: PLAYTIME_ACTIVITY_NNN = PROCESS_MASK[DESCRIPTION],
# where NNN is number left padded with 0 (keys must be unique and ordered), optionally it's possible to add user
# friendly description in [] brackets. Process mask supports regexp, except symbols [], please be careful entering it!
##PLAYTIME_ACTIVITIES## Do NOT remove or alter this line!

View File

@ -1,34 +1,43 @@
- name: "Get PrusaSlicer version"
uri:
url: https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest
body_format: json
register: git_info
- name: Install prusa-slicer [Ubuntu]
when: ansible_distribution == "Ubuntu"
block:
- name: "Get PrusaSlicer version"
uri:
url: https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest
body_format: json
register: git_info
- name: Install on amd64
become: yes
when: ansible_architecture == "x86_64"
get_url:
url: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*x64-GTK3.*AppImage'))[0] }}"
dest: /usr/local/bin/prusa-slicer.real
mode: 0755
- name: Install on amd64
become: yes
when: ansible_architecture == "x86_64"
get_url:
url: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*x64-GTK3.*AppImage'))[0] }}"
dest: /usr/local/bin/prusa-slicer.real
mode: 0755
- name: Install on arm64
when: ansible_architecture == "arm64"
become: yes
get_url:
url: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*armv7l-GTK2.*AppImage'))[0] }}"
dest: /usr/local/bin/prusa-slicer.real
mode: 0755
- name: Install on arm64
when: ansible_architecture == "arm64"
become: yes
get_url:
url: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*armv7l-GTK2.*AppImage'))[0] }}"
dest: /usr/local/bin/prusa-slicer.real
mode: 0755
- name: Clean symbolic link
become: yes
file:
path: "/usr/local/bin/prusa-slicer"
state: absent
- name: Clean symbolic link
become: yes
file:
path: "/usr/local/bin/prusa-slicer"
state: absent
- name: Create symbolic link to real app
become: yes
file:
src: "/usr/local/bin/prusa-slicer.real"
dest: "/usr/local/bin/prusa-slicer"
state: link
- name: Create symbolic link to real app
become: yes
file:
src: "/usr/local/bin/prusa-slicer.real"
dest: "/usr/local/bin/prusa-slicer"
state: link
- name: Install prusa-slicer [Arch]
when: ansible_distribution == "Archlinux"
shell:
cmd:
yay -S --needed --noconfirm prusa-slicer