Set graphics settings and order favorites

This commit is contained in:
Kris Lamoureux 2021-12-08 20:02:49 -05:00
parent 203e6f58dd
commit 8228b78c4c
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
5 changed files with 18 additions and 5 deletions

4
Vagrantfile vendored
View File

@ -5,7 +5,9 @@ Vagrant.configure("2") do |config|
# Boot with a GUI in VirtualBox
config.vm.provider "virtualbox" do |vbox|
vbox.customize ["modifyvm", :id, "--vram", "128"]
vbox.customize ["modifyvm", :id, "--vram", "128",
"--graphicscontroller", "vboxvga",
"--accelerate3d", "on"]
vbox.memory = 4096
vbox.cpus = 2
vbox.gui = true

View File

@ -7,4 +7,5 @@ users:
favorites:
- firefox-esr.desktop
- terminator.desktop
- org.kde.dolphin.desktop
- org.remmina.Remmina.desktop

View File

@ -1,3 +1,5 @@
homedir: "/home/{{ item.name }}"
# Follows homelab package list:
# https://github.com/krislamo/moxie/blob/master/roles/base/defaults/main.yml
moxie_packages:

View File

@ -6,13 +6,15 @@
- name: Create autostart-scripts directory
file:
path: "/home/{{ item.name }}/.config/autostart-scripts/"
path: "{{ homedir }}/.config/autostart-scripts/"
state: directory
owner: "{{ item.name }}"
group: "{{ item.name }}"
loop: "{{ users }}"
- name: Enable KDE dark theme
copy:
dest: "/home/{{ item.name }}/.config/autostart-scripts/darkmode.sh"
dest: "{{ homedir }}/.config/autostart-scripts/darkmode.sh"
mode: a+x
content: |
#!/bin/bash
@ -34,7 +36,6 @@
- name: Change favorites menu
template:
src: favorites.sh.j2
dest: "/home/{{ item.name }}/.config/autostart-scripts/favorites.sh"
dest: "{{ homedir }}/.config/autostart-scripts/favorites.sh"
mode: a+x
loop: "{{ users }}"
tags: debug

View File

@ -1,5 +1,12 @@
#!/bin/bash
FAVORITES="{% for item in favorites %}{{ item }}{{ ',' if not loop.last else '' }}{% endfor %}"
if [ -f ~/.config/kactivitymanagerd-statsrc ]; then
if ! grep -q "$FAVORITES" ~/.config/kactivitymanagerd-statsrc; then
sed -i "/^ordering/s/=.*/=$FAVORITES/" ~/.config/kactivitymanagerd-statsrc
fi
fi
sqlite3 ~/.local/share/kactivitymanagerd/resources/database <<-EOF
CREATE TEMPORARY TABLE FavoritesList (usedActivity TEXT, initiatingAgent TEXT, targettedResource TEXT);
INSERT INTO FavoritesList (usedActivity, initiatingAgent, targettedResource)