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 # Boot with a GUI in VirtualBox
config.vm.provider "virtualbox" do |vbox| 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.memory = 4096
vbox.cpus = 2 vbox.cpus = 2
vbox.gui = true vbox.gui = true

View File

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

View File

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

View File

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

View File

@ -1,5 +1,12 @@
#!/bin/bash #!/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 sqlite3 ~/.local/share/kactivitymanagerd/resources/database <<-EOF
CREATE TEMPORARY TABLE FavoritesList (usedActivity TEXT, initiatingAgent TEXT, targettedResource TEXT); CREATE TEMPORARY TABLE FavoritesList (usedActivity TEXT, initiatingAgent TEXT, targettedResource TEXT);
INSERT INTO FavoritesList (usedActivity, initiatingAgent, targettedResource) INSERT INTO FavoritesList (usedActivity, initiatingAgent, targettedResource)