450 Commits
Author SHA1 Message Date
me f97c2708fa setup, fix a double newline instance. 2026-09-29 15:57:21 -07:00
me 3d1b0791b3 android, change comment location. 2026-09-29 15:54:33 -07:00
me f7a260c722 setup, continue working on log output. 2026-09-29 15:52:59 -07:00
me 65d0c3c45e android, use proper if statements. 2026-09-29 15:52:38 -07:00
me e094ec7143 android, fix churn caused by flutter. 2026-09-29 15:52:19 -07:00
me 772c2906dd setup, make the output a bit more consistent. 2026-09-29 14:34:38 -07:00
me eb54844618 android, add comments to versions. 2026-09-29 14:34:16 -07:00
me f8226c07c3 android, fix grep quotes. 2026-09-29 14:34:01 -07:00
me ee461bee2d android, if the version says unknown try to install it again rather than skipping. 2026-09-29 14:22:15 -07:00
me f5d65ba192 android, move 37 to additional and keep 36 as required. 2026-09-29 14:18:27 -07:00
me 5e7279e497 ansible, fix false booleans. 2026-09-29 13:56:11 -07:00
me ba5a142339 packages, automatically install ansible-lint on coding machines. 2026-09-29 13:55:42 -07:00
me e11c6e1e64 setup, enhance output when no concurrent processes found. 2026-09-29 13:50:50 -07:00
me 7ad7edc82c android, attempt to add fail condition for sdk installs and removals. 2026-09-29 13:50:17 -07:00
me 63e7e97076 android, use boolean rather than deprecated yes/no. 2026-09-29 13:49:24 -07:00
me 19821939e2 android, list ALL packages, even the ones not installed. 2026-09-29 13:48:51 -07:00
me 07c2f352f1 android, fix download churn. 2026-09-29 13:48:05 -07:00
me 1c8c237bac android, make the removals idempotent too. 2026-09-29 12:29:36 -07:00
me c6875551b2 android, fix variable names, add idempotency to module changes. 2026-09-29 12:22:03 -07:00
me 3d61a7619c android, more thorough switch to android sdk from sdkmanager. 2026-09-29 11:51:19 -07:00
me 2d6bba789c setup, ensure variables are quoted. 2026-09-29 10:32:04 -07:00
me 5be56dd7f8 android, use the new sdk manager android. 2026-09-29 10:31:45 -07:00
me 7fe9f650a6 setup, remove lock file if we have verified there are no other runs. 2026-09-29 10:23:45 -07:00
me 6285f02214 bashrc, fix EOF and add note so it does not happen again. 2026-09-29 10:21:32 -07:00
me 1c20173b8b main, add lock file scripts and clean some areas up. 2026-09-29 09:48:33 -07:00
me 2dbfffafd0 lock, add files which handle checking, creating, and then removing a temporary lock file. 2026-09-29 09:48:21 -07:00
me 3aa1819440 cron, put timestamp in log file name. 2026-09-29 09:00:46 -07:00
me 68f7c91cdc workstation, add gimp and libreoffice to packages. 2026-09-29 08:45:01 -07:00
me 1e3f1e82cf flatpak, begin removing a few apps. 2026-09-29 08:39:36 -07:00
me adab73ff82 i3, have workspace 4 open Android Studio. 2026-09-29 08:32:04 -07:00
me 8daf385422 android, change semi-colons to be / to work better with the newer android sdk command. 2026-09-29 08:21:06 -07:00
me 8ead4b4e6d bashrc, add explicit () to functions. 2026-09-29 07:52:58 -07:00
me 5b6f1a5b64 bashrc, change functions to have underscore names. 2026-09-29 07:48:20 -07:00
me e9d6a41c7f vscode, change settings file to allow trailing json commas, refactor like settings into groups. 2026-09-29 07:37:28 -07:00
me 081818451b i3, keep Jetbrains apps on WS4. 2026-09-29 07:32:19 -07:00
me f48555f859 bashrc, move the project seeding to its own functions and have code-reseed call it, check if the dir exists before cloning. 2026-09-29 06:42:30 -07:00
me de6e2d711d bashrc, change list of seeded projects. 2026-09-29 06:37:04 -07:00
me 5080dd9112 android, install VM 16 on all systems. 2026-09-28 17:01:53 -07:00
me 5e863999e5 i3, change FLT to AND (workspace 4). 2026-09-28 16:50:18 -07:00
me ceaa6c77af android, overhaul required and additional, remove Images comment and only pull sources and platform for the compile SDK version (36), upgrade build-tools to 37 and pull SDK 24 as new minimum. 2026-09-28 03:03:51 -07:00
me 2a5ee62a5e bashrc, forgot the pipe for the new variable. 2026-09-28 01:56:35 -07:00
me 21e1ee1708 bashrc, add shortcut to nuke Android Studio settings. 2026-09-25 11:50:37 -07:00
me fc49d68d01 update, pacman, handle the noconfirm differently so that things like update-firmware still get the -y. 2026-09-19 09:47:32 -07:00
me f19bc454e4 readme, remove Devuan from the supported list. 2026-09-14 07:20:20 -07:00
me 83e77e421d i3, add redshift. 2026-09-12 20:37:25 -07:00
me 77ecb21d00 Add the java playbook. 2026-09-12 19:56:22 -07:00
me 3708528c44 java, fix workstation variable coding. 2026-09-12 19:56:05 -07:00
me 079ccb77b5 java, add output that this is for pacman. 2026-09-12 18:53:58 -07:00
me dbd588fc27 Add potential playbook for managing JDKs. 2026-09-12 18:51:25 -07:00
me baa841c8cf i3, open flutter apps in WS4. 2026-09-12 17:01:23 -07:00
me a66384a2d7 flutter, update archived version which gets pulled. 2026-09-12 16:20:51 -07:00
me ca24d37e34 packages, add jq. 2026-09-12 07:30:14 -07:00
me 8b3c4fd36c i3, add system monitor to workspace 1 defaults. 2026-09-11 18:35:47 -07:00
me e02c188a18 update, add newline after NPM to match the previous output style. 2026-09-11 18:20:14 -07:00
me ebc8c5c690 update, add updating of global NPM packages. 2026-09-11 18:17:27 -07:00
me 5231fedcdc Add hugo playbook after testing it in combination with the nodejs changes. 2026-09-11 18:16:52 -07:00
me 5770998ef5 i3, add virtualization software to workspace 6. 2026-09-11 17:14:58 -07:00
me e90cc22255 packages, fix extra space in a name. 2026-09-11 17:01:46 -07:00
me b8e46a05f1 flatpak, name some of the executables a bit more appropriately. 2026-09-11 17:01:06 -07:00
me 49f363b80c Add file for dependencies needed to develop Hugo sites. 2026-09-11 13:22:53 -07:00
me cc9350347a reconnect, be more patient waiting for network to come back up. 2026-09-11 08:10:12 -07:00
me 5153d68230 mullvad, set more settings via CLI for consistency. 2026-09-11 08:09:55 -07:00
me baab102be8 artix, add changes and fixes while getting newer Intel workstation going properly. 2026-09-11 07:56:50 -07:00
me 197bbc2b03 update, fix the accept var from being changed for other functions like update-firmware. 2026-09-08 09:29:45 -07:00
me 433e354638 packages, add fwupdmgr. 2026-09-08 09:23:10 -07:00
me 7bcd537855 i3, nuke dmenu cache every reload. 2026-09-07 20:33:13 -07:00
me 6614dd386c i3, also start system monitor on login. 2026-08-30 13:26:03 -07:00
me 6820591482 update, continue fixing the pacman auto acceptance. 2026-08-25 08:39:12 -07:00
me 0f88b83790 i3, add a default volume for new sessions. 2026-08-24 17:33:01 -07:00
me 645e2b02cb i3, reduce the backlight on login and reduce the amount of lines light takes up in the config. 2026-08-24 17:19:17 -07:00
me 31c2615c69 Merge branch 'dev-device-offline' into dev. 2026-08-24 15:32:09 -07:00
me c36dd8756c mullvad, correct the location for pacman distros since it installs it directly. 2026-08-24 15:20:12 -07:00
me 74a65af640 update, fix the auto accepting of pacman, currently always doing yes. 2026-08-24 15:04:24 -07:00
me c4964a1a1e i3 and battery_nag, reached a point where it successfully kills then restarts on each reload. 2026-08-22 12:12:43 -07:00
me f59a4f90ba i3, use pkill to stop battery nag with the full option which looks through the entire command. 2026-08-20 17:35:10 -07:00
me df622a175b battery_nag, add log output on what battery percentage caused the notification. 2026-08-20 17:26:09 -07:00
me 7f6110a3f9 battery_nag, ensure 'killall battery_nag.sh' doesn't make the program think it's already running. 2026-08-20 17:24:04 -07:00
me 3965f0a587 i3, add a log for battery_nag. 2026-08-20 17:22:11 -07:00
me 9bd7cb59b5 i3, restart dunst on reloads. 2026-08-20 09:39:43 -07:00
me 83104fac25 profile, add variable and function for using preferred notification executable. 2026-08-20 09:39:23 -07:00
me 36f8aa3649 i3, change brightness and volume to use different timing and steps after all. 2026-08-20 09:32:41 -07:00
me d2b8cac45d i3, drastically reduce the time that notify-send lingers on the screen, variablize the step counts for going up and down in brightness and volume. 2026-08-20 09:20:13 -07:00
me 7764260639 packages, fix name for pipewire now that it exists in workstation. 2026-08-19 18:37:37 -07:00
me 154bb01c0e packages, add stress to general, move pipewire to workstation. 2026-08-19 18:37:04 -07:00
me bb9ac37d9c battery_nag, add comments. 2026-08-19 18:34:41 -07:00
me 4d1c461fcf battery_nag, simplify the acceleration and allow it to be turned off. 2026-08-19 18:30:45 -07:00
me f1a7025e07 i3, add note that the killall here is not actually working as desired since the process name is bash, not battery_nag.sh. 2026-08-19 16:07:04 -07:00
me d5ef919e6d battery_nag, improve the active process checker and enhance edge case handling. 2026-08-19 16:06:32 -07:00
me 8ec82bd3f1 battery_nag.sh, only run if not already running. 2026-08-19 14:47:06 -07:00
me b0620734b6 battery_nag.sh, add additional output as well as speeding up the nags as the percentage goes down. 2026-08-19 14:43:39 -07:00
me d58d830206 battery_nag,sh, enhance the comment section. 2026-08-19 14:17:47 -07:00
me 5f50b3d1d7 battery_nag.sh, add output. 2026-08-19 14:14:13 -07:00
me ab2d39c700 i3, add a battery nagging notification which expands upon existing functions. 2026-08-19 14:01:41 -07:00
me eb06cf62c5 tlp, improve the on and off output, expecially in relation to Mullvad. 2026-08-15 19:08:20 -07:00
me 0b59b1c401 .bashrc, remove redundant PATH setting. 2026-08-15 17:02:18 -07:00
me 4a21321318 tlp, add shortcuts for monitoring and switching wireless modules. 2026-08-15 17:01:26 -07:00
me 8db5389c6d i3, kill all 3 audio services at the same time. 2026-08-15 15:42:33 -07:00
me cdf11a8dc1 i3, force pavu and bluman to open on WS6. 2026-08-15 15:13:58 -07:00
me c95ae2512e i3, fix keybindings for default workspace sessions. 2026-08-15 15:05:35 -07:00
me 8591ad23ff i3, add final workspace defaults, set a few more programs to exec on reloads. 2026-08-15 15:03:49 -07:00
me 51c649798e i3, picom does not launch on Devuan without specifying a backend.Worked fine in Artix without any config. 2026-08-15 14:50:23 -07:00
me 2e2c81fe9d i3, also keep mpv on ws 9. 2026-08-15 14:27:56 -07:00
me 0bffef28a8 packages, workstation, add blueman and mpv. 2026-08-14 16:25:15 -07:00
me a7f1ad232b packages, workstation, ensure VLC is installed with all codecs. 2026-08-14 15:14:16 -07:00
me b83812f1b9 cron, log the reports directly to Ansible's home directory, cannot assess user even if added to their group. 2026-08-14 12:35:29 -07:00
me f415100314 i3, add compositor to help prevent video tearing, plus for LOL factor since it fades transitions by default. 2026-08-14 12:29:20 -07:00
me 10a6c6c0ff workstation packages, add rhythmbox which typically comes with distros but didn't on Artix. 2026-08-14 11:30:48 -07:00
me 3c97226143 pacman, fix -y for flatpak, variables were a bit jumbled. 2026-08-14 11:21:12 -07:00
me e167a3018e pacman, yay stuff was getting too complicated with password stuff, just don't do it unless not root. 2026-08-14 11:14:46 -07:00
me df449282e4 pacman, make the spacing more consistent and agnostic to whether Flatpak is run. 2026-08-14 11:09:28 -07:00
me 0f346af760 pacman, correct the su command. 2026-08-14 11:06:59 -07:00
me 674b3a4d03 Save some time by not forcing the pacman cache refresh. 2026-08-14 11:02:45 -07:00
me 3997f9e79f Go ahead and adjust the group for the rc files pulled out of env-shared. 2026-08-14 11:01:49 -07:00
me 3a905a5608 Download the env-shared project to a more suitable place, /usr/local/src. 2026-08-14 11:01:10 -07:00
me eb239616e7 PATH, move /usr/local/bin closer to the end, after /usr/bin. 2026-08-14 10:55:03 -07:00
me 59fa66a3b1 xdg, use an echo command rather than returns, otherwise the task complains. 2026-08-14 10:45:02 -07:00
me 8199ee0eeb cron, add hostname to ansible-pull report. 2026-08-14 10:41:54 -07:00
me 88ed007218 pacman, fix how yay is run when logged in as root. 2026-08-14 10:39:25 -07:00
me d9a6007af3 i3, add to the workspace classes. 2026-08-14 10:39:00 -07:00
me ee3339bb99 ansible-pull cron jobs, log the output to the Reports folder rather than relying on cron to submit mail. 2026-08-14 10:09:33 -07:00
me 3ae1b49348 i3, single quotes were not working around i3-msg exit, use doubles. 2026-08-13 20:22:36 -07:00
me 098a4b054b i3, properly exit i3 rather than just killing the session. 2026-08-13 20:18:55 -07:00
me 1510a681b1 i3, remove the glob from finding wallpapers now that it's recursive. 2026-08-13 20:06:04 -07:00
me 9cc0715362 i3, allow grouping wallpapers in directories. 2026-08-13 20:02:42 -07:00
me abde0204f4 i3, finally add setting the wallpaper! :D 2026-08-13 19:58:30 -07:00
me 8911aeaed7 xdg, add comments and a clause which only applies this to runit systems. 2026-08-13 19:43:22 -07:00
me 9557b7d99e xdg, disable all desktop files. Do it all via runit, xsessionrc, and i3 config so that nothing conflicts. 2026-08-13 17:07:56 -07:00
me f090bcc727 i3, do not chain audio commands since the killall's may not kill anything. 2026-08-13 16:31:15 -07:00
me 3fc7423f3c i3, add volume control program to the key next to volume adjustments. Also kill all audio servers before starting them. 2026-08-13 16:16:43 -07:00
me 70f1a1443e i3, start the audio services quicker. 2026-08-13 16:07:18 -07:00
me 418fa5dc47 i3, fix the order of the audio services and add log files. 2026-08-13 15:01:22 -07:00
me fe10d1661f Ensure the audio commands are chained properly by increasing the sleep commands and quoting the shell portions. 2026-08-13 14:57:08 -07:00
me fa3bb09637 README, update notes on the supported distros. 2026-08-13 14:29:13 -07:00
me f64ed9ebda vpn, correct the name of the service to match what some distros automatically add, that way two daemons are not running at once. 2026-08-13 14:24:22 -07:00
me 66987a59ce vpn, allow the script removal to fail since it may not exist yet. 2026-08-12 16:29:57 -07:00
me 38f9c82137 tlp, go back to originals battery charge percentages. 2026-08-12 16:25:02 -07:00
me 6022bf4499 packages, put the audio programs in a list. 2026-08-12 16:21:10 -07:00
me 20db768906 vscode, prevent double quotes from duplicating and causing issues. Just wanting Codium to be a dumb editor with a file explorer. 2026-08-12 16:00:47 -07:00
me bc01040ce6 Undo random change. 2026-08-12 13:27:52 -07:00
me 86a04aba75 Attempt to get an error pushing. 2026-08-12 13:27:14 -07:00
me b44611928a local.yml, put android back after flutter since android uses a few flutter varibles to update that SDK. 2026-08-12 11:45:19 -07:00
me b9452b98aa pacman, fix autoconfirm and run yay as local user. 2026-08-11 17:01:57 -07:00
me 7bff244be0 aur, change install dir of yay to global area. 2026-08-11 16:58:11 -07:00
me 2533f80f40 Variablize /usr/local/src. Add quotes for facts with variables. Change how Mullvad is installed on Devuan. 2026-08-11 16:34:35 -07:00
me 451bf41b50 tlp, do not explicitly start if using runit. 2026-08-11 16:22:23 -07:00
me 0a90c5cca1 vpn, change symlink to a script. 2026-08-11 15:42:17 -07:00
me 9555012353 Remove 'ansible.builtin' from modules. 2026-08-11 15:17:32 -07:00
me 3e048e5159 vpn, symlink the command for all systems and move the runit enable outside the distro block. 2026-08-11 15:13:29 -07:00
me 355d8c819a setup.sh, improve output. 2026-08-11 14:39:50 -07:00
me cf5439cf73 setup.sh, ensure only one instance of ansible-playbook runs at a time. 2026-08-11 14:35:42 -07:00
me aac6eb6374 tlp, lower the battery levels to see how it goes. 2026-08-11 13:41:59 -07:00
me 7a2ccfa229 local.yml, change the order of slow workstation software tasks. 2026-08-11 13:32:43 -07:00
me 85afd25697 i3, fix the duplicate name fields. 2026-08-11 11:51:54 -07:00
me e526bd09e8 tlp, final fixes for Devuan with runit. 2026-08-11 11:49:37 -07:00
me 2541652153 tlp, use bash to enable and start for runit. 2026-08-11 11:42:05 -07:00
me afec44e8cb system, add the Devuan service directory back. Had been looking at /etc/services on accident. 2026-08-11 11:20:56 -07:00
me b4be986c0d users, add folders for torrenting. 2026-08-11 11:16:37 -07:00
me 4b394c4923 packages, fix ncurses for apt. 2026-08-11 11:09:12 -07:00
me c481b74b5d tlp, add tasks to enable TLP on Devuan using runit. 2026-08-11 11:06:35 -07:00
me 60e685529d system, fix service directory for Devuan. 2026-08-11 10:46:40 -07:00
me 3035840bb2 mullvad, fill out full task names for Devuan. 2026-08-11 10:37:14 -07:00
me 2eeccd5cf5 packages, prevent gnome-boxes install on Devuan with runit. 2026-08-11 10:35:41 -07:00
Hyperling 5776308513 mullvad, add the shell commands used to successfully install Mullvad VPN. 2026-08-11 10:31:34 -07:00
me 8f1cd20374 i3, fix audio not working and fix Firefox + Transmission variables not working. 2026-08-10 13:13:50 -07:00
me aff14c7fae packages, ensure Artix has the proper audio programs. 2026-08-10 12:45:00 -07:00
me 1aa64f3c13 packages, fix typo in alsa. 2026-08-10 10:32:21 -07:00
me 7663185265 packages, ensure alsa gets installed. 2026-08-10 10:31:53 -07:00
me a6f4b06677 Artix, add yay to the update command. 2026-08-10 09:53:34 -07:00
me 8e46cb16a5 arch, change checks for Archlinux to looking for pacman in case forks decide to use their own name in the future. 2026-08-05 16:21:41 -07:00
me 785db7e893 setup, if BRANCH is already set, don't use main. 2026-08-05 15:40:35 -07:00
me 94431dff43 setup, refactor and reword a few sections, especially related to the getopts and hosts file. 2026-08-05 14:12:29 -07:00
me dcf4b3d451 setup, handle the lowercase branch variable more properly. 2026-08-05 13:40:21 -07:00
me 58f5f13b28 bash env, change how Firefox is found. 2026-08-05 13:29:31 -07:00
me fe022d7a9c setup, lowercase branch was not being set properly due to scope. 2026-08-05 12:38:28 -07:00
me 0ef5e0cc6a bash env, only run the keymap command if the X session is set. 2026-08-05 12:30:53 -07:00
me ccabad9c30 packages, move base-devel to general in the task section. 2026-08-05 12:25:02 -07:00
me f83fe61296 packages, move base-devel to general in the task section, indent all the lists. 2026-08-05 12:22:01 -07:00
me da9c34a9da base-devel, move back to General, it's for AUR which is done for all pacman-using devices. 2026-08-04 18:06:13 -07:00
me 8c3c3fb381 msmtp, mta version does not exist on Fedora. 2026-08-04 18:02:53 -07:00
me d617334a54 locate, put value back for apt. 2026-08-04 18:00:28 -07:00
me 52c6dba409 dig, add package name for OpenSUSE and Fedora. 2026-08-04 17:32:42 -07:00
me 21d69f230b README, update the supported distro list. 2026-08-04 17:23:25 -07:00
me 3a815d319c fedora, change all package managers to use fastfetch. 2026-08-04 17:23:02 -07:00
me 94b6db2000 setup, freebsd, allow pkg to see globs. 2026-08-04 14:47:53 -07:00
me 564485145e vscode, settings, hide release notes and fix dart indents to tabs. 2026-08-04 14:26:05 -07:00
me 814451fa44 Change i3 to be a shared playbook. Group more playbooks in blocks. 2026-08-04 14:09:03 -07:00
me bd9460c8bb i3, prepare to move playbook to shared from linux. 2026-08-04 14:02:31 -07:00
me 55a531f1b4 setup, change FreeBSD to take any version of Python. 2026-08-04 13:33:31 -07:00
me c2f910aabc mullvad, only link sv if runit is being used. 2026-08-04 11:09:27 -07:00
me ccfa27fcaf tlp, fix missing quote. 2026-08-04 10:59:45 -07:00
me 3c6c7de5e1 i3, allow the backlight checks to fail (such as VMs). 2026-08-04 10:47:43 -07:00
me 24c5a2973f pacman, fix the when clause for package names. 2026-08-04 10:45:03 -07:00
me 262cfa002e TLP, try a few more changes. 2026-08-04 10:37:01 -07:00
me 4fe8daf347 TLP, wifi, do not let the card go to sleep. 2026-08-04 10:15:16 -07:00
me ea589d09b2 reconnect, fix the connection test return status. 2026-08-04 10:05:51 -07:00
me dd0412d821 AUR, use shell rather than command, change user's name. 2026-08-04 10:04:45 -07:00
me 14a0d21633 sendmail, fix typo in mta variable. 2026-08-04 09:57:18 -07:00
me 0d42c2419c workstation, move the base-devel requirement from generic. 2026-08-04 09:55:43 -07:00
me ccd87b92bb service report, don't create the enabled file for inits other than systemd. 2026-08-04 09:52:13 -07:00
me 82e32c0f95 sendmail, ensure something is installed so that cronie can log mail. 2026-08-04 09:46:49 -07:00
me 73dfdce734 bashrc, reconnect, add a reboot of the wifi if rebooting Mullvad doesn't work. 2026-08-04 09:35:33 -07:00
me bf57faaac5 workstation, move development package names to the proper fact playbook. 2026-08-04 09:26:28 -07:00
me 9406d4aca2 AUR, only install if using pacman. 2026-08-04 09:08:21 -07:00
me 4cf848d4a9 workstation, add gnome-boxes. 2026-08-04 09:00:21 -07:00
me 09f6a1e96b firefox, add the BROWSER env variable. 2026-08-04 08:45:46 -07:00
me 2d5fa52294 flutter, fix fact task numbering. 2026-08-04 08:42:03 -07:00
me d54131a1b2 android, fix playbook to also work on Artix. 2026-08-04 08:41:07 -07:00
me 8a79822ae5 dunst, add program which handled DBUS for notify-send and fyi on non-systemd machines. 2026-08-04 08:15:08 -07:00
me c66938f738 flutter, get it installing on Artix by converting the rest of the package names to variables. 2026-08-04 08:05:20 -07:00
me be849d9c70 bashrc, add a reconnect function with aliases. 2026-08-04 07:35:46 -07:00
me b69be78382 workstation packages, use fyi and notify-send side by side. 2026-08-04 06:56:13 -07:00
me 845b042d21 Add notify-send as a workstation pre-req. 2026-08-03 11:55:40 -07:00
me 42b88fb8bd flutter, change ni ja to be a variable. Others will likely need changed too. 2026-08-03 11:49:57 -07:00
me e98ad94a90 flutter, fix the mesa variable to only hold one variable, create another for the utils. 2026-08-03 11:39:24 -07:00
me dfb72122a0 i3, ensure the flatpak version of firefox is last. 2026-08-03 11:33:30 -07:00
me 671d21b9d3 i3, add shortcut to start transmission if it gets closed. 2026-08-02 13:48:26 -07:00
me edec84400e runit, fix the enabling and disabling for services and tlp playbooks. 2026-08-02 13:47:44 -07:00
me b4eeff4386 services, fix the disabling of cupsd on runit. 2026-08-02 13:22:08 -07:00
me 331cf32737 flatpak, do the executable extension more programatically. 2026-08-02 13:10:22 -07:00
me 9fb39f8503 flatpak, add -flatpak to all the executable names. 2026-08-02 13:04:10 -07:00
me b1cc1473db android, only worry about adb and fastboot for apt distros. 2026-08-02 12:46:03 -07:00
me d0580925ac service tests, change runit to use the new variable. 2026-08-02 12:45:39 -07:00
me 5732c36d1d tlp, fix the -runit package installation. 2026-08-02 12:39:55 -07:00
me 29435e43e2 android, refactor and allow the removal on non-coding devices to fail. 2026-08-02 12:34:49 -07:00
me b051bce767 tlp, attempt to automate enabling with runit. 2026-08-02 12:28:24 -07:00
me fa732599fe Flutter, allow the facts to be set and registered so that the SDK and download can be deleted. 2026-08-02 12:07:39 -07:00
me bed26990bd Flutter, ensure all tasks have coding == true while refactoring. 2026-08-02 12:02:57 -07:00
me bcfc716b46 Flutter, change a few dependencies to be handled better across different distros. 2026-08-02 11:58:52 -07:00
me 33a645fea0 yay, change the command modules to shell so that || works properly. 2026-08-02 11:50:58 -07:00
me 8e0cc7fa45 TLP, change the package manager variable to be correct (pkg not package). 2026-08-02 11:46:39 -07:00
me 13459f8f4b Packages, firefox-esr exists on Artix, allow it to be installed too. 2026-08-02 11:40:53 -07:00
me 5155952dc7 Packages, last commit also changed yay to allow errors. This one fixes a messup in how the Firefox listings were pasted. 2026-08-02 11:39:50 -07:00
me 19970515ca Install the repo version of Firefox and uninstall mail clients. 2026-08-02 11:36:25 -07:00
me 1aaf64404f i3, change Internet shortcut to also prefer local Firefoxes over Flatpak. 2026-08-02 11:30:17 -07:00
me 65a0d8b670 Changes from 2 days ago to keep getting Artix closer to a complete provision. 2026-08-02 11:26:38 -07:00
me b6b0e620cf GNOME, fix the DELETEME note to be a comment. 2026-08-02 11:25:53 -07:00
me a10480c692 i3, remove old rogue yay attempt. 2026-07-31 15:18:44 -07:00
me 00218a447f i3, allow the AUR step to be skipped. 2026-07-31 15:10:31 -07:00
me b9d0e31631 i3, allow yay to run without prompts. 2026-07-31 15:09:52 -07:00
me 5435da309a i3, correct the syntax for the list to loop over. 2026-07-31 15:07:33 -07:00
me 5ebfa7e8bb Continue fixing i3 installation for Artix. 2026-07-31 14:59:31 -07:00
me 712b0b8ffe Begin adding yay as a package manager so that themes^Can be installed seamlessly. 2026-07-31 14:53:03 -07:00
me 99cf761528 Add commands to get Mullvad SUCCESSFULLY working on Artixgit add tasks/workstation/linux/software/vpn.yml :D 2026-07-31 12:57:23 -07:00
me dbb9528f26 Fix typo. 2026-07-31 12:56:53 -07:00
me 0122f086b2 Just remove the metasploit package, don't do autoremove since it does not work in non-interactive shells very well. 2026-07-31 11:36:11 -07:00
me 0b878674d3 Change how removal is done to properly handle multiple packages. 2026-07-31 11:35:36 -07:00
me 6e86149f59 Article had the wrong package name, use ttf-font-awesome. 2026-07-31 10:06:20 -07:00
me a2ec622582 Don't charge laptops unless the battery falls under 60%. 2026-07-31 10:04:38 -07:00
me ab478153ec Fix package name for font-awesome on Arch distros and also enable flatpak for Artix (and any Arch forks). 2026-07-31 10:02:25 -07:00
me caa7bd9285 Dig command is in the bind package on Arch. 2026-07-31 09:56:40 -07:00
me 19ce3dde3b Add notes of new distros being tested. 2026-07-31 09:12:19 -07:00
me 1bd66a0df9 Fix the dconf block from referencing NixOS. 2026-07-31 09:12:05 -07:00
me 73a6ea092b Add a configuration file for Cinnamon. 2026-07-31 09:10:13 -07:00
me 85c2a4d4b1 Do not enable tlp with runit (yet). 2026-07-30 13:39:03 -07:00
me 063928ebb8 Bulk of changes to continue getting Devuan to work. 2026-07-30 13:22:55 -07:00
me 1679eb2522 Change tabs to spaces. 2026-07-30 13:06:23 -07:00
Hyperling 65cf20f932 Allow firefox-esr to stay. 2026-07-30 12:42:47 -07:00
me a1935588a4 Refactor when clauses. 2026-07-30 11:06:39 -07:00
me 44060a6d1d Do not require runit to enable cron. It's already working anyways. 2026-07-30 11:06:28 -07:00
me f756182d12 Change spacing of services task. 2026-07-30 10:51:23 -07:00
me b41a381385 Refactor the services task to better handle systemd vs runit. 2026-07-30 10:50:38 -07:00
me faddea7492 Fix typo in ansible_service_mgr. 2026-07-30 09:41:41 -07:00
me a85cbf277f Fix quotes. 2026-07-30 09:39:02 -07:00
me 15a79578e6 Add a report for runit to list all services and their status. 2026-07-30 09:36:47 -07:00
me 57e8824d16 Only try removing Metasploit if it exists. 2026-07-30 09:25:46 -07:00
me f46b0bad96 Change services to properly handle runit now that fact has been found. 2026-07-30 09:23:08 -07:00
me f76b635e40 Also patch the other two modules which check if the service is running. 2026-07-30 09:16:24 -07:00
me 0fc27e94b0 Allow the service module to no longer have a state header. 2026-07-30 09:14:36 -07:00
me 08fbce5f44 Add nodejs playbook for having a more recent version on development machines with apt. 2026-07-30 07:58:38 -07:00
me 1ea368184d Change neofetch to fastfetch for all apt distros. 2026-07-29 17:34:03 -07:00
me 5710f284ba Add automatic removal of metasploit if it is no longer true. 2026-07-26 18:35:20 -07:00
me b4e8bf6f15 Use mullvad-vpn, not going to create an alias for mullvad-gui after all. 2026-07-26 18:18:02 -07:00
me e0395dda04 Add symlinks for the Mullvad GUI. 2026-07-26 18:15:20 -07:00
me 625f4c899f Remove Mullvad from PATH. 2026-07-26 18:10:29 -07:00
me f324589c65 Add execution of the Mullvad GUI. 2026-07-26 17:58:42 -07:00
me 3fe18ef9dc Add path for the Mullvad GUI. 2026-07-26 17:58:19 -07:00
me 57f5473c2f Add more aliases for shutdown. 2026-07-26 17:48:07 -07:00
me e517a8c3e8 Change 6 to be other and 7 to be Torrents. 2026-07-26 17:34:03 -07:00
me 751cbbc055 Add a comment about the xev command. 2026-07-26 17:30:56 -07:00
me 5175b7ff0c Change WS6 to be for Torrents. 2026-07-26 17:25:15 -07:00
me 6d0b0f52f5 Add two additional ways to do it since ctrl+alt+l is not working on NovaCustom. The new 2 do. 2026-07-26 17:06:57 -07:00
me 203d8a1ef4 Trying to figure out why screen locking is no longer working. Add sudo to the shutdown call. 2026-07-26 17:04:18 -07:00
me c9370553fb Cannot add files to PATH, so add all the sbin locations. 2026-07-24 15:29:14 -07:00
me e3e9418a12 Add the proper shutdown command since dbus was not working and shutdown was added to sudoers. 2026-07-24 15:21:41 -07:00
me 398541fa54 Include shutdown and reboot paths for common users. 2026-07-24 15:20:38 -07:00
me e031be406e Include other possibilities for shutdown and reboot. 2026-07-24 15:20:18 -07:00
me 4c0639e862 Ansible actually prefers tildes. Fails with $HOME. 2026-07-24 15:10:07 -07:00
me 07047f140e Ensure keyboard settings are correct on all terminals. 2026-07-24 15:04:12 -07:00
me 1493d76352 Ensure keyboard settings are correct on all terminals. 2026-07-24 15:03:28 -07:00
me b0a7a03542 Change scripts to not use tilde, prefer $HOME. 2026-07-24 15:00:04 -07:00
me b8b7ca1851 Change another variable used in PATH to not have tilde. 2026-07-24 14:59:49 -07:00
me 184ec96395 Change all other ~'s to $HOME. Reserve tilde for interactive shells. 2026-07-24 14:54:13 -07:00
me 4adc2d2e7e Configure keyboard to always be International AltGr. 2026-07-24 14:52:03 -07:00
me fb4386b418 Ensure keyboard is set to AltGr when i3 is used. 2026-07-24 14:34:36 -07:00
me ed2b678228 Change a few instances of ~ to $HOME. 2026-07-24 14:32:49 -07:00
me 4ce049b3ea Allow sudo group to run shutdown commands. 2026-07-24 12:46:26 -07:00
me d48f6d1572 Add notes about laptop backlights. 2026-07-24 10:36:58 -07:00
me a0582c7483 Add a shutdown shortcut. 2026-07-24 07:33:24 -07:00
me 1917b087c9 Add note on where to look with other laptop. 2026-07-24 06:01:09 -07:00
me c2b32c6d3e Move workflows and begin adding more section headers. 2026-07-24 05:59:31 -07:00
me aa0522ee67 Add keys for changing keyboard brightness. Disable syms previously using semicolon. Refactor the volume and brightness commands a bit more. Add more meta workflows. 2026-07-24 05:54:05 -07:00
me 04d9498c72 Fix the brightness commands, switching quote types did not work. 2026-07-23 18:45:31 -07:00
me 481f8fa5d1 Now that volume executable exists the numbers are appearing. Use single quotes on the outside so that the subshell is not parsed too early. Also refactor the volume and brightness code to be easier to view and edit. 2026-07-23 17:50:44 -07:00
me a2edee0857 Add an XMPP client. 2026-07-23 14:50:00 -07:00
me a9352773a7 Create an executable script which calls the volume function. Hoping it works better with i3 than the function was. 2026-07-23 13:00:28 -07:00
me 3b1502f6c1 Set some workspace-specific flows. 2026-07-23 12:55:10 -07:00
me 4dba89dba2 Allow WiFi to stay on, otherwise TLP disables it at login, not at boot, which can be annoying if suspending often or logging between different DEs. 2026-07-23 12:34:28 -07:00
me 69bf1c25fb Add some fixes that may have been what got light to work. 2026-07-17 19:37:35 -07:00
me bf4b6951ac Ensure the new profile related files have the correct permissions. 2026-07-17 19:25:12 -07:00
me de29d33042 Automate creating the udev rules which allow light to work for the video group. 2026-07-17 19:04:30 -07:00
me 2de2fb1966 Don't allow the env files to fail. Fix which user the profile files are created for. 2026-07-17 18:39:38 -07:00
me 99966ea0c4 Add profile exports to RC files too, otherwise PATH was getting weird. 2026-07-17 18:35:13 -07:00
me 90d4a22431 Switch to using kitty for better color and text display. Meow! 2026-07-17 18:15:21 -07:00
me 28829018cd Add shortcut for coding. 2026-07-17 18:13:42 -07:00
me 62b59f4e8a Add variables for other mod keys. Use for lock screen. 2026-07-17 18:11:15 -07:00
me 9010a7dc7c Add locking with Ctrl+Alt+L. 2026-07-17 18:10:17 -07:00
me e8eb5c68a7 Add shortcuts for a few more programs. Change from hardcoded st to variable currently holding 'alacritty'. 2026-07-17 17:34:31 -07:00
me 0887a3bdf0 Add more packages to make i3 more pleasant. 2026-07-17 17:32:23 -07:00
me 3861f2fad4 Add alacritty as the main terminal. 2026-07-17 17:32:01 -07:00
me d8d5f001f2 Change volume to be back at 5% increments, 2 was too small, but is still great for brightness. 2026-07-17 16:52:56 -07:00
me 91996885e9 Also put the PATH in .xprofile and .xsessionrc so that lightdm, i3, and dmenu all get the values. 2026-07-17 16:52:29 -07:00
me a8d0e2c7bb Fix mod+period having the wrong symbol. 2026-07-17 14:52:53 -07:00
me ae20dec6f1 Change volume and brightness in smaller increments. 2026-07-17 14:49:28 -07:00
me 88717f745b Add a playbook but do not call it yet and comment its contents for now. 2026-07-16 20:07:59 -07:00
me 1972cd4b9e Make sure small and large vol and light changes do not stack notifications. 2026-07-16 19:21:43 -07:00
me fbc8e62872 Fix typo. 2026-07-16 19:18:53 -07:00
me dac6240b92 Add tmux. 2026-07-16 19:18:41 -07:00
me 3faa49c290 Add spacing between a few sections. 2026-07-16 19:03:41 -07:00
me d2356a5780 Add volume keys using personal volume wrapper. Message is not getting content though, unsure why. 2026-07-16 19:02:57 -07:00
me 862b36d537 Add notes on how light was made to work with a non-root user. 2026-07-16 19:02:08 -07:00
me e3f2d42017 Add i3 binds for changing brightness with light. 2026-07-16 18:02:49 -07:00
me 2b40012443 Ensure the light package is installed for i3. 2026-07-16 17:46:38 -07:00
me 70114784a5 Move path changes to .profile so that display managers see it. 2026-07-16 17:37:33 -07:00
me 3823aa438a i3 does not like coments at the end of lines! 2026-07-16 17:27:21 -07:00
me 2f3109d113 Enforce using st in i3! 2026-07-16 17:19:04 -07:00
me 7e891fac9d Improve readability of DWM workspaces. Modify the shortcuts to be what I was thinking they were (closer to i3). Also change to Super (Mod4) rather than Alt (Mod1). 2026-07-16 17:16:22 -07:00
me a94b8cdd72 Add rest of titles to i3 workspaces. 2026-07-16 17:14:00 -07:00
me b1ae3a7587 Add calls to multiple desktop environment playbooks on workstations. 2026-07-16 16:51:57 -07:00
me 4f20bdfa1b Add display manager packages which may be referenced by multiple desktop environment playbooks. 2026-07-16 16:50:32 -07:00
me c43e589235 LXQt tested successfully. 2026-07-16 16:49:59 -07:00
me f3a3ac63ea Cinnamon playbook has been tested successfully. 2026-07-16 16:28:52 -07:00
me 4f31769802 i3 playbook has been tested successfully. 2026-07-16 16:10:28 -07:00
me ab5a35a133 Move bulk of code-check to shared as git-check so that it can be used anywhere (such as ZZ_INACTIVE). Reference the new function and pass the dir we want to check. 2026-07-16 15:35:26 -07:00
me faeef04ca4 Add commented fields for new playbooks while they're being tested. 2026-07-16 14:50:01 -07:00
me 87f5c39a9a Add a playbook and config file for i3. 2026-07-16 14:45:52 -07:00
me bd29c74d21 Begin adding a file for Cinnamon. 2026-07-16 13:45:57 -07:00
me eb70ee7a34 Finalize the TLP setup and add it to provisioning. 2026-07-16 13:38:34 -07:00
me 816ff990b3 Ensure auto-cpufreq is also not installed. Only do the battery config if the device is listed as having a battery. 2026-07-16 12:41:30 -07:00
me cda28a2c4e Use variables in the TLP configuration. 2026-07-16 12:31:31 -07:00
me 1ff0e3624f Create a playbook for installing and configuring TLP. 2026-07-16 12:26:36 -07:00
me f70ebba7e7 Export the cache busting build timestamp so it is seen by later commands. 2026-07-04 17:14:38 -07:00
me ca482245cc Add a timestamp to heal break cache in Docker. 2026-07-04 17:11:23 -07:00
me e4d66c9d33 Ensure that prep.sh gets run in docker aliases, like manage.sh does. 2026-07-04 16:49:54 -07:00
me 98cc0c08df Alter the recorded section, and add the template in case editing is done on a different day. 2026-05-29 13:04:05 -07:00
me 27d66493e4 Move the download-website function to shared. 2026-05-27 08:10:17 -07:00
me 6056038b75 Add some extra commands in case a download fails and needs continued. 2026-05-26 17:49:07 -07:00
me 728c68443f Fix brackets on new function. 2026-05-26 17:39:20 -07:00
me ddd5693145 Adjust the website downloading command. Enhance the error output. 2026-05-26 16:54:35 -07:00
me d6295f8ffe Add source for command. 2026-05-26 16:14:12 -07:00
me 014b9ef105 Add function to pull entire websites. 2026-05-26 16:12:58 -07:00
me c8973bf074 Fix typo in the templates directory name. 2026-05-26 15:35:18 -07:00
me 9cc6be2325 Call the new templates playbook for workstations. 2026-05-26 15:34:55 -07:00
me f6d9521865 Add playbook which copies the templates to '$HOME/Templates/'. 2026-05-26 15:34:38 -07:00
me 3a53fbb0c6 Add templates for keeping in workstation home directories. 2026-05-26 15:05:11 -07:00
me 8d74bee2ff Stop the GNOME software store from giving pop-ups every boot. 2026-05-26 14:28:37 -07:00
me 4b359afdd0 Change night light to be from 7PM and 7AM. 2026-05-13 21:58:24 -07:00
me 465ba8e053 Create notification system for workstations to know when Ansible has been run. 2026-05-08 09:25:10 -07:00
me edb1db9a9a OK, go back up to 1700, 1200 is very difficult to see well. 2026-05-07 19:34:19 -07:00
me cc22d3e9bd Add comments about the different light levels. Go for 1200 for now, best balance for health and can still read fine just not see colors the absolute best, not necessary before bed anyways. 2026-05-06 21:17:57 -07:00
me 3376d6fef1 Move from 1200 to 1700 for a little better readability. 2026-05-06 20:49:22 -07:00
me 654e944da4 Nevermind, the notifications don't work since not run in the user's scope. 2026-05-06 19:51:32 -07:00
me 5cf45dfeaf Change the night light temperature to remove almost all blue light rather than resetting to the middle of the road. 2026-05-06 19:46:38 -07:00
me 1bbb64f38e Also add a notification for when it starts. 2026-05-06 19:37:33 -07:00
me 64a9fc4de1 Add a notification for when an Ansible run completes. 2026-05-06 19:35:57 -07:00
me 2d95d3be8f Do not allow errors in env-snhared install. 2026-05-06 18:32:35 -07:00
me 3c9c23736e Ansible was also failing to update envp-shared!! Fixed now, do not use $HOME in path, ~ works better. 2026-05-06 18:32:04 -07:00
me 94ef15e9c7 Stop creating all the rc backups. 2026-05-06 17:06:32 -07:00
me f2ee698fee Massive refactor of dconf chain while bug hunting a failure. 2026-05-06 16:58:31 -07:00
me d5aa46dcfd Add more notes for trying to run SC2. 2026-05-06 16:45:06 -07:00
me c62b6f3b59 Fix typo in Update. 2026-05-06 15:30:45 -07:00
me 2813734dda Fix typo in dconf. 2026-05-06 14:51:58 -07:00
me 942bc475e0 Note that the git command is also updating. 2026-05-06 09:53:02 -07:00
me 28be7abaf1 Add some screen space by shrinking and hiding the dock. 2026-05-06 09:45:12 -07:00
me 4f96f32c1c Fix directory name for env-shared. 2026-05-06 09:27:40 -07:00
me 248f352e16 Add time before the gray out. 2026-05-06 08:52:52 -07:00
me 163a649dc7 Add note for how to run SC2 on Lutris. 2026-05-06 08:49:03 -07:00
me c30490aa1d Add header to env-shared area. 2026-05-05 15:29:58 -07:00
me c11d9ec25e Change env-shared to be a local hidden directory. 2026-05-05 15:28:36 -07:00
me c3fb8f360f Re-enable Do Not Disturb. 2026-05-05 09:19:49 -07:00
me ed2535b802 Disable the notifications on Wellbeing more properly. 2026-04-30 19:42:51 -07:00
me fb140bea72 Disable breaks from Wellbeing, still seems to be in development, activates when laptop is locked, pop-ups do not always do their action buttons properly, and generally just annoying at this point. 2026-04-30 13:54:25 -07:00
me 33ef2544dc Increment Debian version for Lutris. 2026-04-30 06:49:07 -07:00
me 4b8f122376 Deprecate trash related code. 2026-04-25 10:33:31 -07:00
me df6dc122f2 Remove uninstall of packages also listed in additional section at every run. 2026-04-25 08:55:34 -07:00
me b765c5cdae Rather than overwrite the Android SDKs every run, only do them if they are not listed. update-sdk function can update these manually rather than wasting bandwidth through Ansible. 2026-04-25 08:53:12 -07:00
me 3629d24b1b Remove the countdown since it blocks screen real estate and does not allow starting the break early. 2026-04-25 08:30:33 -07:00
me 9339b24808 Add flatpak for Organic Maps. 2026-04-24 08:50:17 -07:00
me 5e8d188871 Add exporting of all functions, same as done in env-shared. 2026-04-13 19:28:41 -07:00
me 4fd3e43e0d Add unofficial flatpak for Anki Desktop. 2026-04-11 18:37:59 -07:00
me d8bc4a66cf Move log functions to shared. 2026-04-10 13:11:23 -07:00
me 30f9aff49e Stop killing bluetooth service. 2026-04-06 19:23:34 -07:00
me 190b3d921b Change settings to all be true since did not get any reminders after these changes. 2026-04-06 18:58:30 -07:00
me 11632e72d7 Tweak the Wellbeing settings a bit more. 2026-04-06 15:38:27 -07:00
me fa0ea0098e Only do the metasploit activities if it is not already installed. 2026-04-06 15:24:33 -07:00
me 579764ca76 Add a TBD for not reinstalling metasploit every run (will save time and bandwidth). 2026-04-06 15:16:57 -07:00
me 51b3161124 Add the cron jobs to shutdown automatically at night, but debating whether it's a good idea. 2026-04-01 20:20:35 -07:00
me 18a1defd65 Add Brave Browser for using WDP. Session seems to have worked itself out, remove TBD. 2026-03-31 16:47:41 -07:00
me f7ac9cc7e7 Add gnome-boxes for development systems. 2026-03-30 11:01:48 -07:00
me c40019a72d Use the vimrc from env-shared. 2026-03-28 16:25:37 -07:00
me 2d1f720578 Move now and today t shared env. 2026-03-28 14:24:21 -07:00
me 119b8aa669 Move scan to be in shared env. 2026-03-28 14:18:54 -07:00
me 2b7447ba26 Move clone and ls aliases to shared. 2026-03-28 13:34:31 -07:00
me e0bb2b3c66 Add missing section of PROD variables to RC file. 2026-03-28 13:29:19 -07:00
me e70fdaabd5 Use source keyword to be more explicit. 2026-03-28 13:24:33 -07:00
me 4522811da1 Allow banners to pop up, such as Wellbeing and USB prompts. 2026-03-28 12:53:12 -07:00
me ec22eacbdb Move the import of shared RC up so that variables are available. 2026-03-28 12:23:49 -07:00
me 4031be218c Remove colors since they are now shared. 2026-03-28 12:08:51 -07:00
me e280bd7a49 Change the break time to only be 3 minutes. 2026-03-28 11:09:11 -07:00
me 2954ce5af9 Add screen time limits and break reminders in GNOME Wellbeing. 2026-03-28 11:07:57 -07:00
me cd7a290d61 Use the same branch as env-ansible, so that servers do not use dev branch unless requested. 2026-03-27 18:32:55 -07:00
me 89982bae39 Add branch to env-shared download. Remove the bin script copy and add it to PATH instead. 2026-03-27 18:29:39 -07:00
me 9327ed23ac Add location of env-shared bin. 2026-03-27 18:29:03 -07:00
me 79a2c832b4 Also install all the bin scripts. Split the permissions command so that .rc_shared is allowed to fail. 2026-03-27 18:22:27 -07:00
me 6a36811590 Add tasks to download and install env-shared project's bashrc addition. 2026-03-27 18:16:54 -07:00
me 2e0dd78f68 Add location to pull env-shared project. 2026-03-27 18:16:07 -07:00
me 861a9c6257 Add all the production server information to environment variables so that env-shared can access them. 2026-03-27 18:07:29 -07:00
me 210e409428 Add env setup to get the data server information. 2026-03-27 18:06:52 -07:00
me 44039bbd1b Add an explicit bye since goodbye does not seem to be working still. 2026-03-27 17:13:39 -07:00
me a1bbcdc804 Add sourcing of the shared RC file if it exists. 2026-03-23 12:14:58 -07:00
me 22a74506fd Add a TBD for getting Session to work properly. 2026-02-01 15:41:15 -07:00
me 5d7318ec32 Add note for which bitrate is used by default. 2026-01-18 07:03:42 -07:00
me cf676808c9 Fix header comment. 2026-01-18 07:01:59 -07:00
me 66ca4dcb98 Add the Session messenger to faves for now. 2025-12-20 21:42:42 -07:00
me ea1716957b Add the messenger "Session". 2025-12-20 20:41:49 -07:00
me 2e560c9f2b Ignore files which are ignored by clone alias. 2025-12-20 20:05:25 -07:00
me c21d7415f5 Add a gap in output and timing between the two backup files. 2025-12-20 20:01:52 -07:00
me e3c61c5bcd Add a backup of data directories. 2025-12-20 19:59:32 -07:00
me af3c665a43 Do not fail if no functions exist yet. 2025-12-20 19:50:51 -07:00
me 8b52914683 Edit the show facts parameter to exit after it runs. Also fix its spacing in the usage. 2025-12-18 10:46:26 -07:00
me b3e9f7584f Also add boolean check for swap_block. 2025-12-18 10:37:56 -07:00
me 1a2572870f Ensure that the editing variable is interpreted as a boolean if it is true or false. 2025-12-18 10:36:45 -07:00
me d32c913a40 Add music tagger for audio editing machines. 2025-12-18 10:03:07 -07:00
me b8fa688e52 Add a parameter to image compressing which does not use a big fancy tag. 2025-12-08 15:15:11 -07:00
me ea3ce8d023 Change the t parameter to do what the e parameter does, and finish what the e parameter is supposed to do. 2025-12-08 14:54:08 -07:00
me dd7325da39 Prevent date formatting if the time flag is not set. 2025-12-08 14:48:32 -07:00
me 195c315714 Add shortcut for running a command in a loop. 2025-12-02 16:38:57 -07:00
me b91b43b56d Add wireless-tools package for workstations. 2025-12-02 16:29:35 -07:00
me a64f2253b6 Add colors to PS2. 2025-12-01 19:19:06 -07:00
me 7f21a0fc7b Refactor the prompt colors. 2025-12-01 19:14:04 -07:00
me 87aca38811 Add time and colors to PS1. 2025-12-01 19:11:24 -07:00
59 changed files with 3280 additions and 683 deletions
+25 -5
View File
@@ -17,17 +17,27 @@ This information is as of 2025-11-21.
### Primary
These are the operating systems used as my daily driver.
These are the operating systems used as my dailies.
#### Artix (`runit`)
2026-08-04: Completed adapting playbooks and now using this as a daily driver.
2026-07-31: Began experimenting and adapting playbooks using VMs.
#### Debian Trixie
This has been used as my primary server and workstation OS since at least 2024.
The `apt` version of `ansible` in both Bookworm and Trixie are sufficient,
no longer need to use `ansible` out of `pip`.
Stopped using as a workstation on all devices by August 2026, still using as a server.
### Secondary
These are tested via my Docker project's `ProvisionsTests` container but not currently used as daily drivers.
These are tested via my Docker project's `ProvisionsTests` containers
but not currently used as daily drivers. [TBD: Link]()
#### Arch
@@ -54,6 +64,14 @@ TBD
100%, but only if using a recent enough version of Ansible. `pip` usually has a
better version than `apt`.
#### Devuan (`runit`)
2026-09-14: Abandoned, did not support virtualization on runit and felt slow / clunky to Artix.
2026-08-13: Distribution is nearly fully dunctional.
2026-07-30: Distribution has beed added with a few caveats:
#### Ubuntu
100%, both server and desktop.
@@ -88,14 +106,14 @@ terrible while updating. Ubuntu Rolling Rhino filled the gap.
Workstation: 100%,
Server: 100%
## Suse Family
### Suse Family
### openSUSE Tumbleweed v2022-02-17
#### openSUSE Tumbleweed v2022-02-17
Generic: 100%,
Workstation: 100%
### openSUSE Leap 15.4
#### openSUSE Leap 15.4
Generic: 100%
Workstation: Currently failing at `[Workstation | Linux | Flatpak Distro | Package Manager | Install From Repo]` with message `Problem: nothing provides libedataserver-1.2.so.24 needed by the to be installed evolution-data-server-32bit-3.34.4-3.3.1.x86_64`.
@@ -127,6 +145,8 @@ after update problems due to a long computer hiatus.
Specifically for the Pinephone.
## Unsupported
## Future Goals
Eventually some of the scripts and install files will be put into the files
+1
View File
@@ -1,6 +1,7 @@
[defaults]
inventory=hosts
interpreter_python=auto_silent
inject_facts_as_vars=True
[inventory]
localhost_warning=False
+41 -19
View File
@@ -10,7 +10,18 @@
nethogs: nethogs
ntp_server: chrony
dig: dig
neofetch: neofetch
neofetch: fastfetch
lightdm: lightdm
sddm: sddm
tmux: tmux
base_devel: htop # Placeholder for Arch package.
sendmail: msmtp
sendmail_mta: msmtp-mta
ca_certificates: ca-certificates
locate: mlocate
alsa: alsa-utils
stress: stress
jq: jq
- name: General | Facts | Package | Parrot OS Fixes
set_fact:
@@ -29,11 +40,6 @@
dig: dnsutils
when: ansible_pkg_mgr == "apt"
- name: General | Facts | Package | apt | Debian Trixie
set_fact:
neofetch: fastfetch
when: ansible_pkg_mgr == "apt" and ansible_distribution_release == "trixie"
- name: General | Facts | Package | pacman
set_fact:
locate: mlocate
@@ -42,6 +48,8 @@
microcode_intel: intel-ucode
cron: cronie
encfs: encfs
dig: bind
base_devel: base-devel
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Package | FreeBSD
@@ -56,7 +64,7 @@
encfs: fusefs-encfs
when: ansible_system == "FreeBSD"
- name: General | Facts | Package | dnf (Fixes) # TBD: Fix + test package names: mlocate, dig, neofetch
- name: General | Facts | Package | dnf (Fixes)
set_fact:
ansible_pkg_mgr: dnf
when: ansible_pkg_mgr in ("dnf5")
@@ -70,6 +78,8 @@
microcode_intel: microcode_ctl
cron: cronie
encfs: fuse-encfs
dig: bind-utils
sendmail_mta: msmtp
when: ansible_pkg_mgr == "dnf"
- name: General | Facts | Package | zypper
@@ -80,6 +90,7 @@
microcode_intel: ucode-intel
cron: cronie
encfs: encfs
dig: bind-utils
when: ansible_pkg_mgr == "zypper"
@@ -90,11 +101,6 @@
ansible_distribution_file: "{{ prov_dir }}/ansible_distribution.txt"
ansible_pkg_mgr_file: "{{ prov_dir }}/ansible_pkg_mgr.txt"
- name: General | Facts | Package | Update Command | Helpers | pacman
set_fact:
update_accept_var: '--noconfirm'
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Package | Update Command | Store Variables
shell: "{{ item }}"
loop:
@@ -148,11 +154,22 @@
pacman)
echo "*** Pacman ***"
if [[ "$accept" == "Y" ]]; then
auto_accept="{{ update_accept_var }}"
auto_accept="{{ update_accept_var }}"
if [[ "$auto_accept" == "-y" ]]; then
auto_accept="--noconfirm"
fi
sudo pacman -Syyu $auto_accept ||
sudo pacman -Syu $auto_accept ||
return 1
echo -e "\n"
if [[ "$LOGNAME" != "root" ]]; then
echo "*** AUR (yay) ***"
yay -Syu $auto_accept || return 2
else
echo "*** User is root, skipping AUR (yay) ***"
fi
echo -e "\n"
;;
pkg | pkgng)
@@ -243,7 +260,12 @@
fi
;;
esac
# End of update_package_manager
update_npm: |
if [[ `which npm` ]]; then
echo "*** NPM ***" &&
sudo npm update -g
echo -e "\n"
fi
# Flatpaks
- name: General | Facts | Package | Update Command | Flatpak | Check
@@ -255,9 +277,9 @@
set_fact:
update_flatpak: |
echo "*** Flatpak ***"
[[ -n {{ update_accept_var }} ]] && sudo flatpak repair
sudo flatpak uninstall --unused {{ update_accept_var }} &&
sudo flatpak update {{ update_accept_var }} ||
[[ -n "$accept" ]] && sudo flatpak repair
sudo flatpak uninstall --unused $accept &&
sudo flatpak update $accept ||
return 1
when: flatpak_exec is defined
and flatpak_exec.failed is defined
+1 -1
View File
@@ -21,7 +21,7 @@
set_fact:
crond: cronie
crond_pattern: cronie
when: ansible_distribution in ("Archlinux")
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Service | Fedora
set_fact:
+25 -9
View File
@@ -1,16 +1,29 @@
---
# Define file, folder, and other facts per OS.
- name: General | Facts | System | Global
- name: General | Facts | System | Global 01
set_fact:
lynis_install_dir: /usr/local/src/lynis
dwm_install_dir: /usr/local/src/dwm
st_install_dir: /usr/local/src/st
global_src: /usr/local/src
global_bin: /usr/local/bin
x_desktops: /usr/share/xsessions
git_repo_http: https://{{ git_host }}/{{ git_user }}/{{ git_project }}
git_repo_ssh: ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}
git_repo_http: "https://{{ git_host }}/{{ git_user }}/{{ git_project }}"
git_repo_ssh: "ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}"
notify_log: "ansible.notify.log"
runit_script_dir: /etc/runit/sv
runit_service_dir: /etc/runit/runsvdir/default
- name: General | Facts | System | Global 02
set_fact:
shared_rc_install_dir: "{{ global_src }}/env-shared"
notify_log_file: "/var/log/{{ notify_log }}"
notify_log_file_wip: "/tmp/{{ notify_log }}.wip"
lynis_install_dir: "{{ global_src }}/lynis"
dwm_install_dir: "{{ global_src }}/dwm"
st_install_dir: "{{ global_src }}/st"
- name: General | Facts | System | Global 03
set_fact:
shared_rc_bin: "{{ shared_rc_install_dir }}/bin-shared"
- name: General | Facts | System | Linux
set_fact:
@@ -20,7 +33,6 @@
shutdown_command: sudo shutdown -h now
when: ansible_system == "Linux"
- name: General | Facts | System | FreeBSD
set_fact:
rc_conf: /etc/rc.conf
@@ -28,14 +40,18 @@
shutdown_command: sudo shutdown -p now
when: ansible_system == "FreeBSD"
- name: General | Facts | System | Report File Names
set_fact:
lynis_report: "lynis_hardness_check.txt"
nmap_report: "nmap_port_check.txt"
- name: General | Facts | System | Ansible Branch
set_fact:
branch: main
when: branch is not defined
- name: General | Facts | System | runit (Devuan)
set_fact:
runit_script_dir: /etc/sv
runit_service_dir: /etc/service
when: ansible_pkg_mgr == "apt"
+75 -11
View File
@@ -26,15 +26,65 @@
dmenu: dmenu
sassc: sassc
ffmpeg: ffmpeg
wireless_tools: wireless-tools
macbook_wifi_driver: broadcom-sta-dkms
xz: xz
mesa: mesa
mesa_utils: mesa-utils
ninja: ninja
notify_send: libnotify
fyi: fyi
gtk3: gtk3
xz_libs: xz
cpp: libstdc++
c_libs: glibc
cpp_libs: libstdc++
z_libs: zlib
bzip: bzip2
dunst: dunst
android_jdk: openjdk
ncurses: ncurses
android_fastboot: fastboot
android_adb: adb
android_sdkmanager: sdkmanager
android_udev: android-udev
gnome_boxes: gnome-boxes
rhythmbox: rhythmbox
vlc: vlc
vlc_plugins: vlc-plugins-all
blueman: blueman
mpv: mpv
transmission_gtk: transmission-gtk
transmission_qt: transmission-qt
libreoffice: libreoffice
- name: Workstation | Facts | Package | apt (All Distros)
set_fact:
xz: xz-utils
mesa: libglu1-mesa
mesa_utils: libglu1-mesa
ninja: ninja-build
notify_send: libnotify-bin
gtk3: libgtk-3-dev
xz_libs: liblzma-dev
cpp: libstdc++-12-dev
c_libs: libc6:amd64
cpp_libs: libstdc++6
z_libs: lib32z1
bzip: libbz2-1.0
android_jdk: default-jdk
ncurses: libncurses-dev
android_udev: android-udev-rules
vlc_plugins: libavcodec-extra
when: ansible_pkg_mgr == "apt"
- name: Workstation | Facts | Package | Pop_OS!
set_fact:
flatpak_distro: true
firefox_esr: firefox
when: ansible_distribution == "Pop!_OS"
- name: Workstation | Facts | Package | Ubuntu
set_fact:
flatpak_distro: true
@@ -42,13 +92,12 @@
dmenu: suckless-tools
when: ansible_distribution == "Ubuntu"
- name: Workstation | Facts | Package | Debian
- name: Workstation | Facts | Package | Debian & Devuan
set_fact:
flatpak_distro: true
dmenu: suckless-tools
when: ansible_distribution == "Debian"
firefox: firefox-esr
when: ansible_distribution in ("Debian", "Devuan")
- name: Workstation | Facts | Package | Mint
set_fact:
@@ -56,21 +105,36 @@
firefox_esr: firefox
when: ansible_distribution == "Linux Mint"
- name: Workstation | Facts | Package | Parrot OS
set_fact:
flatpak_distro: true
firefox_esr: firefox-esr
when: ansible_distribution == "Parrot OS"
- name: Workstation | Facts | Package | Apt w/o LibVirt
set_fact:
gnome_boxes: htop
when: ansible_pkg_mgr == "apt"
and ansible_service_mgr not in ("systemd", "sysvinit")
- name: Workstation | Facts | Package | Arch + Manjaro
- name: Workstation | Facts | Package | pacman (All Distros)
set_fact:
macbook_wifi_driver: broadcom-wl-dkms
android_jdk: jdk-openjdk
android_fastboot: android-tools
android_adb: android-tools
libreoffice: libreoffice-still
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Facts | Package | Arch / Manjaro / Artix
set_fact:
flatpak_distro: true
firefox_esr: firefox
psutil: python-psutil
appimagelauncher: appimagelauncher
when: ansible_distribution == "Archlinux"
#appimagelauncher: appimagelauncher # No longer in the repos, AUR.
font_awesome: ttf-font-awesome
wireless_tools: wireless_tools
nfs: nfs-utils
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Facts | Package | FreeBSD
+9 -6
View File
@@ -20,7 +20,7 @@ static const char *colors[][3] = {
};
/* tagging */
static const char *tags[] = { "1:", "2:", "3:", "4:", "5:", "6:", "7:", "8:", "9:" };
static const char *tags[] = { "1 : ", "2 : ", "3 : ", "4 : ", "5 : ", "6 : ", "7 : ", "8 : ", "9 : " };
static const Rule rules[] = {
/* xprop(1):
@@ -46,7 +46,7 @@ static const Layout layouts[] = {
};
/* key definitions */
#define MODKEY Mod1Mask
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@@ -69,13 +69,16 @@ static const char *raisevolcmd[] = {"amixer","-q","sset","Master","1%+",NULL};
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_b, spawn, {.v = dmenucmd } },
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
//{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
//{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
@@ -84,8 +87,8 @@ static Key keys[] = {
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
//{ MODKEY, XK_space, setlayout, {0} },
//{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
+6 -6
View File
@@ -31,8 +31,8 @@ function volume-usage {
EOF
return $1
}
alias volume-help="volume-usage"
alias vol-h="volume-help"
#alias volume-help="volume-usage"
#alias vol-h="volume-help"
function volume {
@@ -135,9 +135,9 @@ function volume {
echo "$0 $1 $2"
return 7
}
alias vol="volume "
alias vol-="volume - "
alias vol+="volume + "
#alias vol="volume "
#alias vol-="volume - "
#alias vol+="volume + "
function volume-display {
if [[ "$1" == "-v" || "$1" == "--verbose" || "$1" == "verbose" ]]; then
@@ -146,7 +146,7 @@ function volume-display {
amixer sget Master | egrep -o '[0-9]{1,3}%' | head -n 1
fi
}
alias "vol-d"="volume-display"
#alias "vol-d"="volume-display"
## TBD/TODO ##
+33 -2
View File
@@ -12,12 +12,16 @@ if [[ -z "$HOSTNAME" ]]; then
fi
EXTRA="$1"
TAG="System"
DATE="`date "+%Y%m%d-%H%M%S"`"
BACKUP_DIR="/srv/backup"
BASENAME="Backup"
TAG="System"
BACKUP="$BACKUP_DIR/$BASENAME.$DATE.$HOSTNAME.$TAG.zip"
TAG2="Data"
BACKUP2="${BACKUP//$TAG/$TAG2}"
## Initialization ##
echo "*** Creating Backup Directory ***"
@@ -31,15 +35,19 @@ sudo chown -Rv root:root "$BACKUP_DIR"
echo "*** Removing Old Backups ***"
cd "$BACKUP_DIR"
sudo mv -v "$BASENAME"*"$TAG"* TRASH/
sudo mv -v "$BASENAME"*"$TAG2"* TRASH/
sudo rm -v TRASH/*
## Main
# System Backup
echo "*** Creating backup at '$BACKUP' ***"
sudo zip -rv "$BACKUP" \
/etc /var/{log,mail,spool} /srv /boot \
/usr/local/etc $EXTRA \
-x "/srv/backup/*" -x "/srv/sftp/*"
-x "/srv/backup/*" -x "/srv/sftp/*" \
-x "*/.gradle/" -x "*/app/build/*"
status="$?"
if [[ "$status" != 0 ]]; then
@@ -54,4 +62,27 @@ else
exit 1
fi
echo -e "\n\n"
sleep 5
# Data Backup
echo "*** Creating backup at '$BACKUP2' ***"
sudo zip -rv "$BACKUP2" \
/root /home /srv/sftp \
-x "*/.gradle/" -x "*/app/build/*"
status="$?"
if [[ "$status" != 0 ]]; then
echo "*** ERROR: Failed to create '$BACKUP2', file may be incorrect. ***"
fi
if [[ -e "$BACKUP2" ]]; then
ls -alh "$BACKUP2"
echo "*** '$BACKUP2' created successfully! ***"
else
echo "*** '$BACKUP2' not found! ***"
exit 1
fi
exit 0
+115
View File
@@ -0,0 +1,115 @@
#!/usr/bin/env bash
# 20260819 - Hyperling
# Alert the user every so often once the battery is low.
## Setup ##
echo "`date` - Checking Active Programs"
ps -ef | grep battery_nag.sh | grep -v grep | grep -v "sh -c" | grep -v kill | grep -v $$
active=`ps -ef | grep battery_nag.sh | grep -v grep | grep -v "sh -c" | grep -v kill | grep -vc $$`
if (( "$active" >= 1 )); then
echo "Program already running, exiting. Number of processes: $active"
exit 1
fi
echo "`date` - Loading Functions"
which battery.function || {
echo "ERROR: Battery function not found, exiting."
exit 2
}
source battery.function
## Params ##
echo "`date` - Parsing Parameters"
typeset -i alert sleep
# Default to 20%.
alert=20
if [[ -n "$1" ]]; then
echo -n "alert changed from '$alert' "
alert="$1"
echo "to '$alert'"
fi
# Default to 5 minutes.
sleep=300
if [[ -n "$2" ]]; then
echo -n "sleep changed from '$sleep' "
sleep="$2"
echo "to '$sleep'"
fi
# Default to true.
accelerate="Y"
if [[ -n "$3" ]]; then
echo -n "accelerate changed from '$accelerate' "
accelerate="$3"
echo "to '$accelerate'"
fi
echo "Alerting when under ${alert}%."
echo "Notifying every ${sleep} seconds."
if [[ "$accelerate" == "Y" ]]; then
echo -n "Speeding up notifications as % gets lower."
else
echo -n "Notifcations staying persistent."
fi
echo " (accelerate == $accelerate)"
## Main ##
echo "`date` - Starting Loop"
while true; do
batt=`battery-display`
batt=${batt//%/}
if (( batt <= alert )); then
title="Battery is below ${alert}%"
message="Currently at ${batt}%"
cmd="`which fyi 2>/dev/null || which notify-send 2>/dev/null`"
if [[ -z "$cmd" ]]; then
echo "ERROR: No command found to send notification, exiting."
echo "Please install 'fyi' or 'notify-send' to use this script."
echo "If not using a DE, also ensure 'dunst' or similar is running."
exit 3
fi
echo "`date` - Attempting to report battery level at ${batt}."
$cmd "$title" "$message"
status="$?"
if [[ "$status" == 0 ]]; then
echo -n "`date` - Success! "
else
echo -n "`date` - ERROR: "
fi
echo "Nag returned status ${status}."
else
echo "`date` - Battery at ${batt}%, did not nag."
fi
time=$sleep
if [[ "$accelerate" == "Y" && $batt -lt $alert ]]; then
# Bash only returns whole numbers, so things like 20/11 only provide 1.
# Likewise, if the battery is full, 20/100 returns 0, which is bad. :)
if (( batt > 0 )); then
time=$(( time / (alert / batt) ))
else
time=10
fi
fi
# Showing a notification every 10 seconds makes it persistent.
# Any more than that casues multiple to stack which is unnecessary.
if (( time < 10 )); then
time=10
fi
echo "`date` - Sleeping for ${time}."
sleep $time
done
+5 -4
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# 2023-12-04 Hyperling
# Lower resolution of audio and convert to mp3. Also
# Lower the resolution of audio and convert to mp3.
# Also see: compress-video.sh
## Setup ##
@@ -36,7 +36,8 @@ function usage() {
Compress audio to mp3. Can handle folders and work recursively.
Parameters:
-q QUALITY : Integer for the maximum length of either media dimension.
-q QUALITY : Integer for audio bitrate to transcode to.
Defaults to 256k. No lower than 192k suggested.
-l LOCATION : The specific media or folder which needs compressed.
-r : Recursively shrink media based on the location passed.
-f : Force the media to be shrunk even if a file already exists for it.
@@ -181,8 +182,8 @@ $search "$location" | sort | while read media; do
if [[ -n "$delete" ]]; then
echo -n " DELETE: "
if [[ -d ~/TRASH ]]; then
mv -v "$media" ~/TRASH/
if [[ -d $HOME/TRASH ]]; then
mv -v "$media" $HOME/TRASH/
else
rm -v "$media"
fi
+18 -11
View File
@@ -15,6 +15,7 @@ size=2000
# Strings
tag="shrunk"
use_tag="Y"
date_YYYYMMDD="`date "+%Y%m%d"`"
location="."
search="ls"
@@ -28,7 +29,7 @@ function usage() {
# Parameters:
# 1) The exit status to use.
status=$1
echo "Usage: $PROG [-s SIZE] [-l LOCATION] [-A | [-r] [-f] [-d] [-c]] [-h] [-x] [-t]" >&2
echo "Usage: $PROG [-s SIZE] [-l LOCATION] [-A | [-r] [-f] [-d] [-c] [-e | -t] [-h] [-x] [-n]" >&2
cat <<- EOF
Compress JPG or PNG image(s). Can handle folders and work recursively.
@@ -42,17 +43,18 @@ function usage() {
-F : FORCE the image to be shrunk even if the file is already shrunk.
-d : Delete the original image if the compressed image is smaller.
-c : Clean the filename of underscores, dashes, 'IMG', etc.
-e | -t : Format timestamp to the expanded model.
-A : Resursively Force, Delete, and Clean.
-h : Display this usage text.
-x : Enable BASH debugging.
-t : Format timestamp.
-n : No file extension.
EOF
exit $status
}
## Parameters ##
while getopts ":s:l:rfFdcAhxt" opt; do
while getopts ":s:l:rfFdcetAhxn" opt; do
case $opt in
s) in_size="$OPTARG" && size="$in_size" ;;
l) location="$OPTARG" ;;
@@ -62,10 +64,11 @@ while getopts ":s:l:rfFdcAhxt" opt; do
d) delete="Y" ;;
c) clean="Y" ;;
e) expand="Y" ;;
A) recurse="Y" && search="find" && force="Y" && delete="Y" && expand="Y" ;;
t) expand="Y" ;;
A) recurse="Y" && search="find" && force="Y" && delete="Y" ;;
h) usage 0 ;;
x) set -x ;;
t) format_time="Y" ;;
n) use_tag="N" ;;
*) echo "ERROR: Option $OPTARG not recognized." >&2 && usage 1 ;;
esac
done
@@ -114,6 +117,12 @@ $search "$location" | sort | while read image; do
fi
new_image="${image//.$extension/}.$tag-$date_YYYYMMDD.$size.$extension"
if [[ "$use_tag" == "N" ]]; then
new_image="$image"
new_image="${new_image//.$extension/}"
new_image="${new_image//.$tag/}"
new_image="$new_image.$tag.$extension"
fi
## Clean Filename ##
# Prevent directory from having its name cleaned too.
@@ -132,9 +141,7 @@ $search "$location" | sort | while read image; do
# Date Data
new_image_exp="${TEMP:0:4}-${TEMP:4:2}-${TEMP:6:2}"
# Time Data
if [[ "$format_time" == "Y" ]]; then
new_image_exp="${new_image_exp}_${TEMP:8:2}-${TEMP:10:2}-${TEMP:12:2}"
fi
new_image_exp="${new_image_exp}_${TEMP:8:2}-${TEMP:10:2}-${TEMP:12:2}"
# Remainder Data
if [[ "${TEMP:14:1}" == "." ]]; then
SEP=""
@@ -156,7 +163,7 @@ $search "$location" | sort | while read image; do
fi
# Skip if a compressed image was already created today.
if [[ -e "$new_image" || -e $new_image_clean ]]; then
if [[ (-e "$new_image" || -e $new_image_clean) && $use_tag == "Y" ]]; then
echo " SKIP: Image has already been shrunk previously, moving on."
continue
fi
@@ -208,8 +215,8 @@ $search "$location" | sort | while read image; do
if [[ -n "$delete" ]]; then
echo -n " DELETE: "
if [[ -d ~/TRASH ]]; then
mv -v "$image" ~/TRASH/
if [[ -d $HOME/TRASH ]]; then
mv -v "$image" $HOME/TRASH/
else
rm -v "$image"
fi
+4 -4
View File
@@ -225,8 +225,8 @@ $search_command "$input" | sort | while read file; do
if [[ -e "$newfile" || -e "$new_video_clean" ]]; then
if [[ "$force" == "Y" ]]; then
echo "FORCE: Removing '$newfile'."
if [[ -d ~/TRASH ]]; then
mv -v "$newfile" "$new_video_clean" ~/TRASH/ 2>/dev/null
if [[ -d $HOME/TRASH ]]; then
mv -v "$newfile" "$new_video_clean" $HOME/TRASH/ 2>/dev/null
else
rm -v "$newfile" "$new_video_clean" 2>/dev/null
fi
@@ -279,8 +279,8 @@ $search_command "$input" | sort | while read file; do
if [[ -n "$delete" ]]; then
echo -n "Original has been deleted: "
if [[ -d ~/TRASH ]]; then
mv -v "$file" ~/TRASH/
if [[ -d $HOME/TRASH ]]; then
mv -v "$file" $HOME/TRASH/
else
rm -v "$file"
fi
+1 -1
View File
@@ -7,7 +7,7 @@
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
PROG="$(basename -- "${BASH_SOURCE[0]}")"
nixos_working_dir=~/nixos-config-deleteme
nixos_working_dir=$HOME/nixos-config-deleteme
nixos_working_exe=activate.sh
## Functions ##
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
source /usr/local/bin/volume.function
volume $@
+404
View File
@@ -0,0 +1,404 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $FIREFOX "sh -c '(which firefox && firefox) || (which firefox-esr && firefox-esr) || (which firefox-flatpak && firefox-flatpak)'"
set $TRANSMISSION "sh -c '(which transmission && transmission) || (which transmission-qt && transmission-qt) || (which transmission-gtk && transmission-gtk) || (which transmission-flatpak && transmission-flatpak)'"
# Use the `xev` command to see the name and code of a keyboard key.
set $mod Mod4
set $alt Mod1
set $ctrl Control
set $shift Shift
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
#bindsym $mod+Return exec st
# kill focused window
#bindsym $mod+Shift+q kill
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+b exec --no-startup-id dmenu_run
bindsym $mod+space exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
#bindsym $mod+j focus left
#bindsym $mod+k focus down
#bindsym $mod+l focus up
#bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
#bindsym $mod+Shift+j move left
#bindsym $mod+Shift+k move down
#bindsym $mod+Shift+l move up
#bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
#bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
## Extra Program Shortcuts ##
# Theming.
bindsym $mod+t exec lxappearance
# Manage files.
bindsym $mod+m exec thunar
# Internet.
bindsym $mod+i exec $FIREFOX
# Code.
bindsym $mod+c exec codium-flatpak
## Brightness ##
# light requires sudo privileges unless video group and udev are configured.
set $b_time 3000
set $b_small 10
set $b_large 20
# Use the bracket keys to change the brightness.
bindsym $mod+bracketleft exec --no-startup-id "light -U $b_small && notify-send -t $b_time 'Brightness - ' $(light -G)"
bindsym $mod+bracketright exec --no-startup-id "light -A $b_small && notify-send -t $b_time 'Brightness + ' $(light -G)"
bindsym $shift+$mod+bracketleft exec --no-startup-id "light -U $b_large && notify-send -t $b_time 'Brightness ---' $(light -G)"
bindsym $shift+$mod+bracketright exec --no-startup-id "light -A $b_large && notify-send -t $b_time 'Brightness +++' $(light -G)"
# Also get the actual brightness keys to work!!
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A $b_small && notify-send -t $b_time 'Brightness + ' $(light -G)"
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U $b_small && notify-send -t $b_time 'Brightness - ' $(light -G)"
bindsym $shift+XF86MonBrightnessUp exec --no-startup-id "light -A $b_large && notify-send -t $b_time 'Brightness +++' $(light -G)"
bindsym $shift+XF86MonBrightnessDown exec --no-startup-id "light -U $b_large && notify-send -t $b_time 'Brightness ---' $(light -G)"
## Keyboard Brightness ##
# Use same timing and step size settings as above.
# Macbooks tend to use 'sysfs/leds/smc::kbd_backlight'
# NovaCustom laptop is 'sysfs/leds/system76_acpi::kbd_backlight'
# Some other laptops may be 'sysfs/class/leds/...', use ìght -L`to find out.
bindsym XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A $b_small && notify-send -t $b_time 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U $b_small && notify-send -t $b_time 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A $b_large && notify-send -t $b_time 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U $b_large && notify-send -t $b_time 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A $b_small && notify-send -t $b_time 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $b_small && notify-send -t $b_time 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+$mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A $b_large && notify-send -t $b_time 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+$mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $b_large && notify-send -t $b_time 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
## Volume ##
# The volume function is from https://git.hyperling.com/me/env-ansible
set $v_time 1500
set $v_small 5
set $v_large 25
# Use the comma and period keys to change volume.
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_small && notify-send -t $v_time "Volume - " $(volume)'
bindsym $mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_small && notify-send -t $v_time "Volume + " $(volume)'
bindsym $shift+$mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_large && notify-send -t $v_time "Volume ---" $(volume)'
bindsym $shift+$mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_large && notify-send -t $v_time "Volume +++" $(volume)'
# Actual volume keys.
bindsym XF86AudioMute exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume mute && notify-send -t $v_time "Volume Muted" $(volume)'
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_small && notify-send -t $v_time "Volume + " $(volume)'
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_small && notify-send -t $v_time "Volume - " $(volume)'
bindsym $shift+XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_large && notify-send -t $v_time "Volume +++ " $(volume)'
bindsym $shift+XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_large && notify-send -t $v_time "Volume --- " $(volume)'
bindsym $mod+slash exec pavucontrol
## Workspaces ##
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
# Command Line
set $ws1 "1 - CMD"
# Web Surfing
set $ws2 "2 - WEB"
# Programming
set $ws3 "3 - PRG"
# Android (Flutter, Qt, Kivy, etc)
set $ws4 "4 - AND"
# Chats
set $ws5 "5 - CHT"
# Other
set $ws6 "6 - OTH"
# Torrents
set $ws7 "7 - TOR"
# Music
set $ws8 "8 - MUS"
# Videos
set $ws9 "9 - VID"
# VPNs
set $ws10 "10 - VPN"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
## Keep certain programs in certain tabs. ##
# Use the `xprop` command to find the class of a program.
# (?i) makes the regex case insensitive.
assign [class="Navigator"] $ws2
assign [class="(?i).*navigator.*"] $ws2
assign [class="(?i).*firefox.*"] $ws2
assign [class="(?i).*librewolf.*"] $ws2
assign [class="(?i).*brave.*"] $ws2
assign [class="(?i).*codium.*"] $ws3
assign [class="(?i).*code.*"] $ws4
assign [class="(?i).*flutter.*"] $ws4
assign [class="(?i).*jetbrains.*"] $ws4
assign [class="(?i).*signal.*"] $ws5
assign [class="(?i).*telegram.*"] $ws5
assign [class="(?i).*session.*"] $ws5
assign [class="(?i).*dino.*"] $ws5
assign [class="(?i).*pavucontrol.*"] $ws6
assign [class="(?i).*blueman.*"] $ws6
assign [class="(?i).*boxes.*"] $ws6
assign [class="(?i).*waydroid.*"] $ws6
assign [class="(?i).*transmission.*"] $ws7
assign [class="(?i).*rhythmbox.*"] $ws8
assign [class="(?i).*vlc.*"] $ws9
assign [class="(?i).*mpv.*"] $ws9
assign [class="(?i).*vpn.*"] $ws10
assign [class="(?i).*mullvad.*"] $ws10
## Workspace Specific Workflows ##
bindsym $ctrl+$shift+1 workspace $ws1; exec "i3-sensible-terminal; gnome-system-monitor"
bindsym $ctrl+$shift+2 workspace $ws2; exec $FIREFOX
bindsym $ctrl+$shift+3 workspace $ws3; exec codium-flatpak
bindsym $ctrl+$shift+4 workspace $ws4; exec android-studio-flatpak
bindsym $ctrl+$shift+5 workspace $ws5; exec "session; dino"
bindsym $ctrl+$shift+6 workspace $ws6; exec "pavucontrol; blueman-manager"
bindsym $ctrl+$shift+7 workspace $ws7; exec $TRANSMISSION
bindsym $ctrl+$shift+8 workspace $ws8; exec rhythmbox
bindsym $ctrl+$shift+9 workspace $ws9; exec thunar
bindsym $ctrl+$shift+0 workspace $ws10; exec mullvad-vpn
## Reloads, Restarts, Exit ##
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+q exec "i3-msg exit"
# lock
bindsym $ctrl+$alt+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
bindsym $ctrl+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
bindsym $shift+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
# shutdown entire system.
#bindsym $ctrl+$shift+q exec dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
bindsym $ctrl+$alt+q exec sudo shutdown -h now
bindsym $shift+$alt+q exec sudo shutdown -h now
bindsym $shift+$ctrl+q exec sudo shutdown -h now
## Resizing (Disabled) ##
# resize window (you can also use the mouse for that)
#mode "resize" {
# # These bindings trigger as soon as you enter the resize mode
#
# # Pressing left will shrink the window’s width.
# # Pressing right will grow the window’s width.
# # Pressing up will shrink the window’s height.
# # Pressing down will grow the window’s height.
# bindsym j resize shrink width 10 px or 10 ppt
# bindsym k resize grow height 10 px or 10 ppt
# bindsym l resize shrink height 10 px or 10 ppt
# bindsym semicolon resize grow width 10 px or 10 ppt
#
# # same bindings, but for the arrow keys
# bindsym Left resize shrink width 10 px or 10 ppt
# bindsym Down resize grow height 10 px or 10 ppt
# bindsym Up resize shrink height 10 px or 10 ppt
# bindsym Right resize grow width 10 px or 10 ppt
#
# # back to normal: Enter or Escape or $mod+r
# bindsym Return mode "default"
# bindsym Escape mode "default"
# bindsym $mod+r mode "default"
#}
#
#bindsym $mod+r mode "resize"
## Taskbar ##
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
## Startup Applications ##
# Workspace 1
exec --no-startup-id i3-sensible-terminal
exec --no-startup-id gnome-system-monitor
# Respective Workspaces
exec --no-startup-id mullvad-vpn
exec --no-startup-id $TRANSMISSION
# Set defaults for laptop backlights.
exec --no-startup-id "light -S 20; light -N 5; light -O"
# Set the correct keymap.
exec_always --no-startup-id setxkbmap -layout us -variant altgr-intl
# Notifications (allows fyi and notify-send to work)
exec_always --no-startup-id "killall dunst; dunst"
# Audio
exec --no-startup-id "sleep 00; dbus-launch --exit-with-session i3"
exec_always --no-startup-id "sleep 00; killall pipewire wireplumber pipewire-pulse"
exec_always --no-startup-id "sleep 01; pipewire >~/Reports/pipewire.log 2>&1 &"
exec_always --no-startup-id "sleep 02; wireplumber >~/Reports/wireplumber.log 2>&1 &"
exec_always --no-startup-id "sleep 03; pipewire-pulse >~/Reports/pipewire-pulse.log 2>&1 &"
exec --no-startup-id "sleep 04; bash -c 'source /usr/local/bin/volume.function && volume 25'"
# Wallpaper
exec_always --no-startup-id feh --recursive --randomize --bg-fill ~/Pictures/Wallpapers
# Compositor
exec_always --no-startup-id "killall picom; picom -f --backend xrender"
# Battery
exec_always --no-startup-id bash -c 'pkill -ef "bash `which battery_nag.sh`" >~/Reports/battery_nag.log 2>&1; battery_nag.sh >>~/Reports/battery_nag.log 2>&1'
# Redshift
exec_always --no-startup-id redshift-gtk
exec_always --no-startup-id redshift -l 35.5:-111.5 -t 6500K:1800K
+35 -18
View File
@@ -4,25 +4,42 @@
"save_loc2": "~/.var/app/com.vscodium.codium/config/VSCodium/{{ user_desc }}/settings.json",
"END_COMMENTS": "",
"update.showReleaseNotes": false,
"workbench.startupEditor": "none",
"editor.rulers": [
80, 120, 200
],
"files.trimTrailingWhitespace": true,
"editor.tabSize": 3,
"editor.insertSpaces": false,
"files.insertFinalNewline": true,
"[html]": {
"files.insertFinalNewline": false
},
"files.trimFinalNewlines": true,
"git.confirmSync": false,
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.selectionHighlight": false,
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": "off"
}
"editor.rulers": [
80, 120, 200,
],
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.tabSize": 3,
"editor.insertSpaces": false,
"editor.autoClosingBrackets": "never",
"editor.autoClosingQuotes": "never",
"files.insertFinalNewline": true,
"[html]": {
"files.insertFinalNewline": false,
},
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.selectionHighlight": false,
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": "off",
},
"json.schemas": [
{
"fileMatch": ["*.json", "*.jsonc"],
"schema": {
"allowTrailingCommas": true,
}
}
],
}
+3
View File
@@ -1,2 +1,5 @@
%sudo ALL=(ALL) ALL
# Allow anyone in the sudo group to shutdown or reboot without a password.
%sudo ALL=(ALL) NOPASSWD: /sbin/shutdown, /usr/sbin/shutdown, /sbin/reboot, /usr/sbin/reboot
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
View File
+22
View File
@@ -0,0 +1,22 @@
# title
NAME
# desc
CONTENT
---
Recorded and edited YYYY-MM-DD.
Recorded YYYY-MM-DD, edited YYYY-MM-DD.
[blog.hyperling.com/TBD](https://blog.hyperling.com/TBD)
# tags
-
,
,
,
,
+102 -61
View File
@@ -9,27 +9,48 @@
tasks:
####### Lock #######
# Ensure a process is not already running.
- name: Main | Lock
block:
- include_tasks: tasks/general/tests/lock_check.yml
- include_tasks: tasks/general/tests/lock_create.yml
####### Gather #######
# Load facts for all systems.
- name: Main | Gather
block:
- include_tasks: facts/general/gather.yml
- include_tasks: tasks/general/acct_mgmt/provision_config.yml
- include_tasks: facts/general/gather.yml
- include_tasks: tasks/general/acct_mgmt/provision_config.yml
- include_tasks: facts/general/system.yml
- include_tasks: facts/general/package.yml
- include_tasks: facts/general/service.yml
- include_tasks: facts/general/user.yml
- include_tasks: facts/general/system.yml
- include_tasks: facts/general/package.yml
- include_tasks: facts/general/service.yml
- include_tasks: facts/general/user.yml
####### Start #######
- name: Main | Start
block:
- name: Main | Start | Notify | Touch File
include_tasks: tasks/general/acct_mgmt/notify.yml
- name: Main | Start | Notify | Add Message
shell : echo "'Ansible' 'Provisioning started @ `date`'" >> "{{ notify_log_file }}"
when: workstation == true
####### NixOS #######
# Install the .nix files and do a little data setup.
- name: Main | NixOS Setup
block:
- include_tasks: tasks/general/software/nixos.yml
# TBD if we are going to use this many, then just have IF statements
# and use blocks within the General area for NixOS vs not-NixOS.
- include_tasks: tasks/general/software/swap.yml
@@ -65,7 +86,6 @@
####### General #######
# Basic setup for all enabled systems.
- name: Main | General Setup
block:
@@ -75,9 +95,14 @@
- include_tasks: tasks/general/software/sendmail.yml
when: ansible_system == "FreeBSD"
- include_tasks: tasks/general/software/aur.yml
when: ansible_pkg_mgr == "pacman"
# Gather again in case missing programs have now been installed.
- include_tasks: facts/general/gather.yml
- include_tasks: tasks/general/settings/keyboard.yml
- include_tasks: tasks/general/acct_mgmt/groups.yml
- include_tasks: tasks/general/acct_mgmt/users.yml
- include_tasks: tasks/general/acct_mgmt/sudo.yml
@@ -94,45 +119,49 @@
when: ansible_system == "FreeBSD"
- include_tasks: tasks/general/software/metasploit.yml
when: pentesting == true
when: provision == true
####### Workstations #######
# Additional setup for systems with GUI.
- name: Main | Workstation Setup
block:
- include_tasks: facts/workstation/package.yml
# Set Up Desktop Environments #
## Desktop Environments ##
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
when: ansible_system == "FreeBSD" and bsd_gpu == true
# Window Managers without true Desktop Environments #
- include_tasks: tasks/workstation/shared/software/dwm.yml
- include_tasks: tasks/workstation/shared/software/i3.yml
# Polished Desktop Environments #
- include_tasks: tasks/workstation/freebsd/software/gnome.yml
when: ansible_system == "FreeBSD"
- include_tasks: tasks/workstation/linux/software/gnome.yml
- name: Main | Workstation | Fancy Desktop Environments
block:
- include_tasks: tasks/workstation/linux/software/gnome.yml
when: ansible_service_mgr == "systemd"
- include_tasks: tasks/workstation/linux/software/cinnamon.yml
- include_tasks: tasks/workstation/linux/software/lxqt.yml
when: ansible_system == "Linux"
# TBD: Implement this: and extra_desktops == true
- include_tasks: tasks/workstation/shared/software/dwm.yml
# Software Tasks #
- include_tasks: tasks/workstation/linux/software/packages.yml
when: ansible_system == "Linux"
- include_tasks: tasks/workstation/linux/software/lutris.yml
when: ansible_system == "Linux"
- include_tasks: tasks/workstation/linux/software/vscodium.yml
when: ansible_system == "Linux"
- include_tasks: tasks/workstation/linux/software/brave.yml
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
- include_tasks: tasks/workstation/linux/software/vpn.yml
## Software Tasks ##
- block:
- include_tasks: tasks/workstation/linux/software/packages.yml
- include_tasks: tasks/workstation/linux/software/tlp.yml
- include_tasks: tasks/workstation/linux/software/lutris.yml
- include_tasks: tasks/workstation/linux/software/vscodium.yml
- include_tasks: tasks/workstation/linux/software/vpn.yml
- include_tasks: tasks/workstation/linux/software/nodejs.yml
- include_tasks: tasks/workstation/linux/software/hugo.yml
- include_tasks: tasks/workstation/linux/software/brave.yml
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
when: ansible_system == "Linux"
- include_tasks: tasks/workstation/freebsd/software/packages.yml
@@ -141,12 +170,15 @@
- include_tasks: tasks/workstation/mac-os/software/brew.yml
when: ansible_system == "Darwin"
# Configuration Tasks #
- include_tasks: tasks/workstation/shared/settings/gnome.yml
when: not mobile
## Configuration Tasks ##
- block:
- include_tasks: tasks/workstation/shared/settings/gnome.yml
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
- include_tasks: tasks/workstation/shared/settings/xdg_autostart.yml
- include_tasks: tasks/workstation/linux/cron/ansible.yml
when: ansible_system == "Linux" and not mobile
- include_tasks: tasks/workstation/linux/cron/ansible.yml
when: ansible_system == "Linux"
when: not mobile
- include_tasks: tasks/workstation/shared/settings/nfs.yml
@@ -157,17 +189,17 @@
when: vnc == true
- include_tasks: tasks/workstation/shared/settings/services.yml
- include_tasks: tasks/workstation/shared/settings/templates.yml
# Final Tasks (SLOW) #
- include_tasks: tasks/workstation/linux/software/flutter.yml
## Final Tasks (SLOW) ##
- block:
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
when: flatpak_distro
- include_tasks: tasks/workstation/linux/software/java.yml
- include_tasks: tasks/workstation/linux/software/flutter.yml
- include_tasks: tasks/workstation/linux/software/android.yml
when: ansible_system == "Linux"
- include_tasks: tasks/workstation/linux/software/android.yml
when: ansible_system == "Linux"
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
when: ansible_system == "Linux" and flatpak_distro
when: workstation == true
@@ -214,28 +246,26 @@
####### Servers #######
# Easy to deploy server configurations.
- name: Main | Server Setup
block:
- include_tasks: tasks/server/software/services.yml
- include_tasks: tasks/server/software/certbot.yml
when: certbot == true
- include_tasks: tasks/server/cron/certbot.yml
- block:
- include_tasks: tasks/server/software/certbot.yml
- include_tasks: tasks/server/cron/certbot.yml
when: certbot == true
- include_tasks: tasks/server/software/onlyoffice.yml
when: onlyoffice == true and ansible_pkg_mgr == "apt"
- include_tasks: tasks/server/software/influxdb1.yml
when: influxdb1 == true and ansible_pkg_mgr == "apt"
- include_tasks: tasks/server/software/influxdb2.yml
when: influxdb2 == true and ansible_pkg_mgr == "apt"
- include_tasks: tasks/server/software/grafana.yml
when: grafana == true and ansible_pkg_mgr == "apt"
- block:
- include_tasks: tasks/server/software/onlyoffice.yml
when: onlyoffice == true
- include_tasks: tasks/server/software/influxdb1.yml
when: influxdb1 == true
- include_tasks: tasks/server/software/influxdb2.yml
when: influxdb2 == true
- include_tasks: tasks/server/software/grafana.yml
when: grafana == true
when: ansible_pkg_mgr == "apt"
- include_tasks: tasks/server/software/hugo.yml
when: hugo == true
@@ -245,9 +275,20 @@
####### Reporting #######
# Provide information for analysis.
- name: Main | Reporting
block:
- include_tasks: tasks/general/software/telegraf.yml
- include_tasks: tasks/general/software/telegraf.yml
- include_tasks: tasks/general/tests/services.yml
- include_tasks: tasks/general/tests/lynis.yml
- include_tasks: tasks/general/tests/nmap.yml
- include_tasks: tasks/general/tests/services.yml
- include_tasks: tasks/general/tests/lynis.yml
- include_tasks: tasks/general/tests/nmap.yml
####### Finish #######
- name: Main | Finish
block:
- include_tasks: tasks/general/acct_mgmt/notify.yml
- include_tasks: tasks/general/tests/lock_remove.yml
+70 -32
View File
@@ -5,14 +5,25 @@
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
PROG="$(basename -- "${BASH_SOURCE[0]}")"
LOCAL=$DIR/local.yml
LOCAL="$DIR/local.yml"
URL="https://git.hyperling.com/me/env-ansible"
BRANCH="main"
if [[ -z $BRANCH ]]; then
export BRANCH="main"
fi
LINUX_HOSTS_DIR=/etc/ansible
LINUX_HOSTS_FILE="$LINUX_HOSTS_DIR/hosts"
FREEBSD_HOSTS_DIR="/usr/local/etc/ansible"
FREEBSD_HOSTS_FILE="$FREEBSD_HOSTS_DIR/hosts"
HOSTS_DIR="$LINUX_HOSTS_DIR"
HOSTS_FILE="$LINUX_HOSTS_FILE"
config_dir="/usr/local/etc/hyperling-scm"
general_config="$config_dir/general.ini"
workstation_config="$config_dir/workstation.ini"
server_config="$config_dir/server.ini"
branch=""
## Functions ##
@@ -32,7 +43,7 @@ function usage {
-g : Enable the General config with test contents.
-w : Enable the Workstation config with test contents.
-s : Enable the Server config with test contents.
-f : Display this system's facts.
-f : Display this system's facts.
-h : Display this help text.
EOF
@@ -45,10 +56,10 @@ while getopts ":lb:gwsfh" arg; do
case $arg in
l) local="Y" && echo "Running $LOCAL as the playbook." ;;
b) branch="$OPTARG" && echo "Using branch $branch instead of $BRANCH." ;;
g) create_general="Y" && echo "Requested '$general_config'." ;;
w) create_workstation="Y" && echo "Requested '$workstation_config'." ;;
s) create_server="Y" && echo "Requested '$server_config'." ;;
f) show_facts="Y" ;;
g) create_general="Y" && echo "Generating test '$general_config'." ;;
w) create_workstation="Y" && echo "Generating test '$workstation_config'." ;;
s) create_server="Y" && echo "Generating test '$server_config'." ;;
f) show_facts="Y" && echo "Displaying ansible facts then exiting." ;;
h) usage ;;
*) echo "ERROR: Parameter $OPTARG was not recognized." && usage 1 ;;
esac
@@ -60,9 +71,14 @@ if [[ ! -z $1 && $1 != "-"* ]]; then
usage 1
fi
if [[ -z "$local" && "$branch" == "" ]]; then
echo "Using default branch $BRANCH."
if [[ "$branch" == "" ]]; then
branch="$BRANCH"
if [[ -z "$local" ]]; then
echo "Running against default branch '$branch'."
else
echo "Set branch to '$branch'."
fi
echo " "
fi
if [[ -n "$create_general" && -f "$general_config" ]]; then
@@ -92,52 +108,52 @@ if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
if [[ $os == *Debian* || $os == *Ubuntu* || $os == *"Pop!_OS"* || $os == *Mint* || $os == *Parrot* ]]; then
sudo apt update
sudo apt install -y ansible git <<< N
sudo mkdir -p /etc/ansible
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
elif [[ $os == *FreeBSD* ]]; then
sudo pkg install -y py38-ansible git
sudo mkdir -p /usr/local/etc/ansible
sudo sh -c 'echo "localhost ansible_connection=local" > /usr/local/etc/ansible/hosts'
sudo pkg install -y -g py*-ansible git
HOSTS_DIR="$FREEBSD_HOSTS_DIR"
HOSTS_FILE="$FREEBSD_HOSTS_FILE"
elif [[ $os == *Arch* || $os == *Manjaro* || $os == *Artix* ]]; then
sudo pacman -Sy --noconfirm ansible git
sudo mkdir -p /etc/ansible
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
elif [[ $os == *Darwin* ]]; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "TESTING - EXIT!"
exit 0
brew install ansible git
HOSTS_DIR=""
HOSTS_FILE=""
elif [[ $os == *Fedora* ]]; then
sudo dnf install -y ansible git python3-libselinux
sudo mkdir -p /etc/ansible
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
elif [[ $os == *openSUSE* ]]; then
sudo zypper install -y ansible git
sudo mkdir -p /etc/ansible
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
elif [[ $os == *NixOS* ]]; then
$DIR/files/scripts/nixos.sh -b $branch
sudo mkdir -p /etc/ansible
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
else
echo -e "ERROR: OS not detected."
echo -e "ERROR: OS not recognized."
echo -e "$os"
exit 1
fi
fi
echo "Installed!"
echo -e "- Installed!\n"
if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
echo "Ensuring hosts file exists..."
if [[ ! -e $HOSTS_FILE ]]; then
sudo mkdir -pv $HOSTS_DIR
sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE"
fi
echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'"
echo -e "- Hosts file created successfully!\n"
fi
if [[ "$show_facts" == "Y" ]]; then
echo "Showing Ansible Facts"
ansible localhost -m setup --connection=local
exit 0
fi
#echo "Adding Ansible Collections..."
#ansible-galaxy collection install community.general
#echo "Added!"
#echo "- Added!"
# Create basic layouts if configs do not exist and are requested.
if [[ -n "$create_general"
|| -n "$create_workstation"
|| -n "$create_server" ]]
@@ -145,6 +161,7 @@ then
sudo mkdir -pv "$config_dir"
MARK1="BEGIN"
MARK2="END"
echo "Creating placeholder config files..."
fi
if [[ -n "$create_general" && ! -f "$general_config" ]]; then
function print_general_contents {
@@ -191,20 +208,41 @@ if [[ -n "$create_server" && ! -f "$server_config" ]]; then
print_server_contents | sudo tee "$server_config"
ls -lh "$server_config"
fi
if [[ -n "$create_general"
|| -n "$create_workstation"
|| -n "$create_server" ]]
then
echo " "
fi
echo "Verifying this is the only run..."
ps -ef | grep ansible-playbook | grep -v grep
ansible_exists="$?"
lock_file=/tmp/ansible-playbook.lock
if [[ "$ansible_exists" == 0 ]]; then
echo "- Playbook is already being executed. Exiting."
exit 0
elif [[ -e "$lock_file" ]]; then
echo "- Removing lock file."
sudo mv -v "$lock_file" "${lock_file}.disabled"
else
echo "- No processes or lockfile found."
fi
echo " "
echo "Provisioning Ansible..."
if [[ $local == "Y" ]]; then
if [[ "$local" == "Y" ]]; then
sudo ansible-playbook $LOCAL
else
sudo ansible-pull -U $URL.git --checkout $branch
fi
echo "Provisioned!"
echo -e "- Provisioned!\n"
echo "Mounting all drives..."
mount -a
echo "Mounted!"
echo -e "- Mounted!\n"
echo "Don't forget to set any new users' passwords!"
echo -e "Don't forget to set any new users' passwords!\n"
## Finish ##
+11
View File
@@ -0,0 +1,11 @@
---
# Create and manage permissions for notify log.
- name: General | Notify | Update File
shell: "{{ item }}"
loop:
- touch "{{ notify_log_file }}"
- chmod 777 "{{ notify_log_file }}"
- name: General | Notify | Add Message
shell : echo "'Ansible' 'Provisioning finished @ `date`'" >> "{{ notify_log_file }}"
+48 -4
View File
@@ -101,22 +101,48 @@
; Slows down the rate of services such as telegraf and cron.
; Default: false
;
;;;;;;;;;;;;;;;;;;;; Server Shortcut ;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;; Server Shortcuts ;;;;;;;;;;;;;;;;;;;;
;
; For typing `prod` and getting straight to a server, like in env-termux.
;
; prod_host : Branch to use on this machine.
; Imagine the command:
; `ssh prod_user@prod_host:prod_port`
;
; prod_host : Hostname for the production server.
; Example: myserver.com, mywebhost.net
; Default: hyperling.com
;
; prod_port : Provide the git host that the machine should poll.
; prod_port : Port for the production server.
; Example: 22, 222, 2222
; Default: 22
;
; prod_user : Port of the server host to use for SSH requests.
; prod_user : Username for accessing the production server.
; Example: jim, bob, jeff, anne
; Default: user
;
; For pushing MASTER directories to an SFTP server with `send-master`.
;
; Imagine the command:
; `rsync -auPhz --delete -e 'ssh -p prod_data_port' ./mydata-MASTER/ \
; prod_data_user@prod_data_host:/prod_data_dir/mydata-clone
; `
;
; prod_data_host : Branch to use on this machine.
; Example: sftp.myserver.com, sftp.mywebhost.net
; Default: hyperling.com
;
; prod_data_port : Provide the git host that the machine should poll.
; Example: 22, 222, 2222
; Default: 22
;
; prod_data_user : Port of the server host to use for SSH requests.
; Example: jim, bob, jeff, anne
; Default: user
;
; prod_data_dir : Port of the server host to use for SSH requests.
; Example: /srv/sftp/
; Default: /srv/sftp/
;
[global]
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
state: present
@@ -143,6 +169,15 @@
prod_host: "{{ lookup('ini', 'prod_host file={{gen_file}} default=hyperling.com') }}"
prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') }}"
prod_user: "{{ lookup('ini', 'prod_user file={{gen_file}} default=user') }}"
prod_data_host: "{{ lookup('ini', 'prod_data_host file={{gen_file}} default=hyperling.com') }}"
prod_data_port: "{{ lookup('ini', 'prod_data_port file={{gen_file}} default=22') }}"
prod_data_user: "{{ lookup('ini', 'prod_data_user file={{gen_file}} default=user') }}"
prod_data_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}"
- name: General | Account Management | Provisioning Configuration | General | Boolean Check | Swap Block
set_fact:
swap_block: "{{ swap_block | bool }}"
when: swap_block in ("true", "false")
- name: General | Account Management | Provisioning Configuration | General | List
set_fact:
@@ -166,6 +201,10 @@
- { 'prod_host': "{{ prod_host }}" }
- { 'prod_port': "{{ prod_port }}" }
- { 'prod_user': "{{ prod_user }}" }
- { 'prod_data_host': "{{ prod_data_host }}" }
- { 'prod_data_port': "{{ prod_data_port }}" }
- { 'prod_data_user': "{{ prod_data_user }}" }
- { 'prod_data_dir': "{{ prod_data_dir }}" }
## Workstation ##
@@ -223,6 +262,11 @@
mobile: "{{ lookup('ini', 'mobile file={{wrk_file}} default=false') | bool }}"
redmode: "{{ lookup('ini', 'redmode file={{wrk_file}} default=true' ) | bool }}"
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | Editing
set_fact:
editing: "{{ editing | bool }}"
when: editing in ("true", "false")
- name: General | Account Management | Provisioning Configuration | Workstation | List
set_fact:
provision_variables: "{{ provision_variables | combine(item) }}"
+349 -137
View File
@@ -16,12 +16,12 @@
backup: yes
create: no
state: present
when: ansible_distribution == "Archlinux"
when: ansible_pkg_mgr == "pacman"
#- name: General | Account Management | Users | Use ZSH (Arch+Manjaro)
# set_fact:
# user_shell: "{{ zsh_exec.stdout }}"
# when: ansible_distribution == "Archlinux"
# when: ansible_pkg_mgr == "pacman"
#
#- name: General | Account Management | Users | Allow ZSH (Arch)
# lineinfile:
@@ -32,7 +32,7 @@
# backup: yes
# create: no
# state: present
# when: ansible_distribution == "Archlinux"
# when: ansible_pkg_mgr == "pacman"
## Root ##
@@ -103,6 +103,8 @@
- "{{ user_user.home }}/TRASH"
- "{{ user_user.home }}/Downloads"
- "{{ user_user.home }}/Reports"
- "{{ user_user.home }}/Torrentz"
- "{{ user_user.home }}/Seedz"
become_user: "{{ user }}"
when: user_user.home != ""
@@ -122,12 +124,34 @@
## Files ##
- name: General | Account Management | Users | Files | Profile Variables
set_fact:
export_path_additions: export PATH="$HOME/bin:{{ shared_rc_bin }}:$PATH:{{ global_bin }}"
export_path_sbin: export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
#export_terminal: export TERMINAL="alacritty" # colors look weird.
export_terminal: export TERMINAL="kitty"
export_browser: |
function find-firefox {
which firefox 2>/dev/null ||
which firefox-esr 2>/dev/null ||
which firefox-flatpak 2>/dev/null
}
export BROWSER="`find-firefox`"
keyboard_settings: |
if [[ -n "$XDG_SESSION_ID" ]]; then
setxkbmap -layout us -variant altgr-intl
fi
export_notify: |
export NOTIFY="`which fyi 2>/dev/null || which notify-send 2>/dev/null`"
function notify() {
$NOTIFY $@
}
- name: General | Account Management | Users | Files | RC Variables
set_fact:
alias_cp: alias cp='cp -v'
alias_mv: alias mv='mv -v'
alias_rm: alias rm='echo "Use mv ~/TRASH/ instead!"'
export_path_additions: export PATH="~/bin:"{{ global_bin }}":$PATH"
function_wttr: |
function weather() {
# 20210301 - Someone showed me an awesome weather API! Had to implement it!
@@ -145,7 +169,39 @@
fi
curl "https://wttr.in/${1//\ /+}"
}
export_PS1: export PS1='[\u@\h \w]\$ '
export_PS1: |
## Prompts ##
# Old Trusty
#export PS1='[\u@\h \w]\$ '
# 20251201 - Add time.
#export PS1='[\t \u@\h \w]\$ '
# 20251201 - Add colors.
# This helps to determine the color palette numbers:
# https://robotmoon.com/bash-prompt-generator/
# Colors have been moved to env-shared project's .rc_shared file.
if [[ "$USER" == "root" || $UID == 0 ]]; then
CLR_BRACKETS=$BOLD$YELLOW
CLR_TIME=$BOLD$ORANGE
CLR_USER=$BOLD$SCARLET
CLR_DIR=$BOLD$RED
CLR_PROMPT=$BOLD$GRAY
else
CLR_BRACKETS=$RESET
CLR_TIME=$BOLD$PURPLE
CLR_USER=$BOLD$ORANGE
CLR_DIR=$BOLD$GREEN
CLR_PROMPT=$RESET
fi
export PS1='\[$CLR_BRACKETS\][\[$CLR_TIME\]\t \[$CLR_USER\]\u@\h \[$CLR_DIR\]\w\[$CLR_BRACKETS\]]\[$CLR_PROMPT\]\$ \[$RESET\]'
export PS2='\[$CLR_BRACKETS\](\[$CLR_TIME\]>\[$CLR_USER\]^\[$CLR_DIR\].\[$CLR_USER\]^\[$CLR_BRACKETS\])\[$CLR_TIME\]> \[$RESET\]'
## End Prompts ##
alias_remount: |
alias remount='
sudo umount /mnt/*
@@ -192,6 +248,12 @@
{{ update_package_manager }}
fi
if [[ "$only_flat" != "Y" && "$only_sys" != "Y" ]]; then
{{ update_npm }}
else
echo -e "\n*** Skipping NPM ***\n\n"
fi
if [[ "$shutdown" == "Y" && "{{ battery }}" == "True" ]]; then
echo -e "\n*** Only System Updates - Skipping Flatpak ***\n\n"
elif [[ "$only_sys" == "Y" ]]; then
@@ -243,7 +305,7 @@
alias init-video='
mkdir -v raw
mkdir -v exports
cp ~/Templates/*video* ./
cp $HOME/Templates/*video* ./
'
alias init-vid=init-video
alias init-program='
@@ -259,6 +321,7 @@
}
function goodbye {
update -yg
bye
}
metasploit_aliases: |
alias metasploit="msfconsole"
@@ -297,7 +360,7 @@
alias trashed-cleanup="clean-trashed"
alias trashed-clean="clean-trashed"
function_check_trash: |
function check-trash() {
function check-trash-old() {
unset OPTIND
unset clean
unset network
@@ -392,14 +455,14 @@
echo "Checking but not cleaning /var/mail..."
du -ha /var/mail | sort -h
if [[ $clean == "Y" ]]; then
clean-trashed "~/"
clean-trashed "$HOME/"
fi
return 0
}
alias check_trash="check-trash"
alias_clean_trash: alias clean-trash='check-trash --clean'
alias_trash_check: alias trash-check='check-trash'
alias_trash_clean: alias trash-clean='trash-check --clean'
alias_trash_check: alias trash-check='check-trash-old'
alias_clean_trash: alias clean-trash='check-trash-old --clean'
alias_trash_clean: alias trash-clean='clean-trash'
alias_clean_dir: |
function clean-dir() {
sudo du -hs
@@ -453,6 +516,13 @@
return 0
fi
if [[ -f ./prep.sh ]]; then
echo "Running prep.sh first..."
./prep.sh
fi
export BUILD_TIMESTAMP="`date`"
docker compose build &&
docker compose down &&
docker compose up -d
@@ -475,6 +545,13 @@
return 0
fi
if [[ -f ./prep.sh ]]; then
echo "Running prep.sh first..."
./prep.sh
fi
export BUILD_TIMESTAMP="`date`"
docker compose pull &&
docker compose build &&
docker compose down &&
@@ -519,6 +596,14 @@
docker ps
return;
fi
if [[ -f ./prep.sh ]]; then
echo "Running prep.sh first..."
./prep.sh
fi
export BUILD_TIMESTAMP="`date`"
echo "*** Upgrading Images ***" &&
docker compose pull &&
echo "*** Building Containers ***" &&
@@ -544,6 +629,11 @@
return 0
fi
if [[ -f ./prep.sh ]]; then
echo "Running prep.sh first..."
./prep.sh
fi
docker compose down &&
docker compose up -d
@@ -559,37 +649,11 @@
alias docker-start="docker compose up -d && docker compose start"
alias docker-prep="docker compose pull && docker compose build"
alias_code_check: |
alias code-check='
echo "Checking ~/Code directory for git changes."
ls -d ~/Code/* | while read project; do
if [[ ! -d $project ]]; then
continue
fi
echo -e "\n*** `basename $project` ***"
cd $project
if [[ -d .git ]]; then
git ls-remote --exit-code --heads origin dev
dev_exists="$?"
if [[ "$dev_exists" == 0 ]]; then
git switch dev
elif [[ "$dev_exists" == 2 ]]; then
git switch main
else
echo "ERROR: Unknown status for dev_exists, '$dev_exists'."
continue
fi
git pull
git push
else
echo "Not a Git project, skipping!"
fi
done
echo -e "\nDone!"
'
alias code-check='git-check $HOME/Code'
alias code-sync='code-check'
alias_code_reset: |
alias code-reset='
ls -d ~/Code/* | while read project
ls -d $HOME/Code/* | while read project
do echo "*** `basename $project` ***"
cd $project
git stash
@@ -600,12 +664,13 @@
done
'
function_code_reseed: |
function git_projects_to_sync {
function git_projects_to_sync() {
# Projects should be followed by the current development branch name.
cat <<- EOF
env-ansible dev
env-docker dev
env-termux dev
env-shared dev
env-obtainium-hyperling dev
nodejs-website dev
ebook-health-protocol dev
@@ -614,11 +679,8 @@
ebook-narcissism-healing dev
ebook-forest-howto dev
ebook-template main
flutter-expense-tracker dev
flutter-social-traveler-app dev
nodejs-social-traveler-server dev
misc-spare-change main
flutter-buddy-website dev
flutter-expense-tracker dev
flutter-sunset-alarm dev
android-infinite-timer dev
android-carb-up dev
@@ -626,16 +688,14 @@
android-45-minute-rule dev
android-tictactoe dev
hugo-jackanope dev
hugo-website dev
hugo-recipes dev
hugo-rvr dev
nomadic-weather dev
nomadic-weather.wiki main
EOF
# Above EOF cannot be indented unless using a tab, which would be mixed with spaces.
}
function code-reseed {
# Unseed current projects.
echo -e "\n*** Move old projects to TRASH ***"
unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects"
mkdir -pv "$unseed_dir"
mv -v ~/Code/* "$unseed_dir"/ 2>/dev/null
function code_seed() {
# Git repo information.
git_repo_ssh={{ git_repo_ssh }}
git_main_project={{ git_project }}
@@ -645,18 +705,34 @@
git_projects_to_sync | while read git_project git_branch; do
echo -e "\n*** $git_project ***"
# Project folder manipulation.
# Project folder name manipulation.
dest_folder="$git_project"
if [[ "$dest_folder" == "flutter-"* ]]; then
echo "Using '_' for Flutter Project"
echo "FLUTTER: Removing 'flutter-' and using '_' rather than '-'."
dest_folder="${dest_folder//flutter-/}"
dest_folder="${dest_folder//-/_}"
fi
# Download of the project.
git clone ${git_repo_ssh_basename}${git_project} \
--branch $git_branch ~/Code/$dest_folder
# Download the project.
if [[ ! -d $HOME/Code/$dest_folder ]]; then
git clone ${git_repo_ssh_basename}${git_project} \
--branch $git_branch $HOME/Code/$dest_folder
else
echo "'$dest_folder' already exists, skipping."
fi
done
}
alias code-seed="code_seed "
function code_reseed() {
# Unseed current projects.
echo -e "\n*** Move old projects to TRASH ***"
unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects"
mkdir -pv "$unseed_dir"
mv -v $HOME/Code/* "$unseed_dir"/ 2>/dev/null
code_seed
}
alias code-reseed="code_reseed "
function_clean_filenames: |
function clean-filenames() {
# Must provide the directory you'd like to clean all the filenames in.
@@ -686,8 +762,6 @@
done
echo -e "\nDone!\n"
}
alias_clone: |
alias clone="rsync -auPhz --delete --exclude '.gradle' --exclude 'app/build'"
export_hyperling: |
export HYPERLING6="2a07:e03:3:80::1"
export HYPERLING4="185.130.47.173"
@@ -697,22 +771,33 @@
if [[ -e $DOCKER_SOURCE && $LOGNAME == "root" ]]; then
source $DOCKER_SOURCE
fi
alias_scan: |
alias scan="nmap -A -p- --script=vuln"
export_prod:
export PROD_HOST="{{ prod_host }}"
export PROD_PORT="{{ prod_port }}"
export PROD_USER="{{ prod_user }}"
export PROD_GIT_HOST="{{ git_host }}"
export PROD_GIT_PORT="{{ git_ssh_port }}"
export PROD_GIT_USER="{{ git_user }}"
export PROD_DATA_HOST="{{ prod_data_host }}"
export PROD_DATA_PORT="{{ prod_data_port }}"
export PROD_DATA_USER="{{ prod_data_user }}"
export PROD_DATA_DIR="{{ prod_data_dir }}"
alias_prod: |
alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}"
function_clean_code: |
function clean-code {
function clean-code() {
echo -e "******* Android *******\n*** Build Caches ***"
find ~/Code/android-*/app -maxdepth 1 -type d -name "build" \
find $HOME/Code/android-*/app -maxdepth 1 -type d -name "build" \
-exec du -hs {} \; -exec rm -rf {} \;
echo -e "\n*** Gradle Caches ***"
find ~/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \
find $HOME/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \
-exec du -hs {} \; -exec rm -rf {} \;
echo -e "******* Flutter *******"
ls ~/Code | grep flutter | while read project; do
cd ~/Code/$project
ls $HOME/Code | grep flutter | while read project; do
cd $HOME/Code/$project
pwd
flutter clean
echo -e "\n"
@@ -720,7 +805,7 @@
cd
echo -e "******* PDFs *******"
find ~/Code/ebook-* -name "*.pdf" -exec du -h {} \; -delete | sort -h
find $HOME/Code/ebook-* -name "*.pdf" -exec du -h {} \; -delete | sort -h
echo -e "\n*** Done! ***"
}
@@ -738,7 +823,7 @@
alias system-killer="kill-system"
function_update_sdks: |
if [[ "$workstation" == "true" && "$coding" == "true" ]]; then
function update-sdks {
function update-sdks() {
echo -e "******* Update SDKs *******\n*** Android - START ***"
yes | sdkmanager --update
yes | sdkmanager --licenses
@@ -756,7 +841,7 @@
alias sdk-updater="update-sdks"
fi
function_ansible_vars: |
function ansible-var-list {
function ansible-var-list() {
cat << EOF
provision
battery
@@ -769,7 +854,7 @@
domain
EOF
}
function ansible-vars {
function ansible-vars() {
ansible-var-list | while read var; do
echo "$var = ${!var}"
done
@@ -779,26 +864,15 @@
alias chmod='chmod -c'
alias_iftop: |
alias iftop='sudo iftop'
alias_ls: |
alias l='ls'
alias ll='ls -alh'
alias lh='ls -ash'
alias_progs: |
alias progs='ps -ef'
alias_nethogs: |
alias nethogs='sudo nethogs'
alias_ansible_facts: |
alias ansible-facts='ansible localhost -m setup --connection=local'
function_now: |
function now {
date "+%Y%m%d-%H%M%S"
}
function today {
date "+%Y%m%d"
}
function_backup: |
export BACKUP_DIR="/srv/backup"
function backup {
function backup() {
/usr/local/bin/backup_system.sh
}
alias backup-system="backup"
@@ -811,7 +885,7 @@
function_pull_prod_backups: |
export DOCKER="Docker"
export SYSTEM="System"
function pull_prod_backup {
function pull_prod_backup() {
if [[ -z "$1" || ("$1" != "$DOCKER" && "$1" != "$SYSTEM") ]]; then
echo "ERROR: Parameter 1 not correct, expecting '$DOCKER' or '$SYSTEM'."
return 1
@@ -836,10 +910,10 @@
rmdir -v tmp
else
echo "Failed!"
mv tmp ~/TRASH/"tmp_`now`"
mv tmp $HOME/TRASH/"tmp_`now`"
fi
}
function pull_prod_backups {
function pull_prod_backups() {
dir="ProductionBackups-Pulled`today`"
mkdir -pv "$dir"
cd "$dir"
@@ -861,15 +935,8 @@
alias prod-backup="pull_prod_backups"
alias pull-prod="pull_prod_backups"
alias prod-pull="pull_prod_backups"
function_log: |
function log {
echo -e "$1"
}
function blog {
echo -e "\n\n$1\n\n"
}
function_debian_upgrade: |
function debian-upgrade {
function debian-upgrade() {
typeset -l OLD NEW
OLD="$1"
NEW="$2"
@@ -940,9 +1007,9 @@
alias upgrade-debian="debian-upgrade"
function_ebook_convert: |
# Regenerate all eBook projects at once.
function ebook-convert {
find ~/Code/ebook-* -name "*.pdf" -print -delete
find ~/Code/ebook-* -name convert.sh -print -exec bash "{}" \;
function ebook-convert() {
find $HOME/Code/ebook-* -name "*.pdf" -print -delete
find $HOME/Code/ebook-* -name convert.sh -print -exec bash "{}" \;
}
alias ebooks="ebook-convert"
alias convert="ebook-convert"
@@ -951,7 +1018,7 @@
alias sudo="sudo "
function_load_branch: |
# Change a branch to point at another.
function load-branch {
function load-branch() {
rcvr="$1" # branch which we want to modify
base="$2" # branch with the changes we want
@@ -1012,7 +1079,7 @@
alias reset-stage="load-branch stage main"
alias reset-dev="load-branch dev main"
function check-code-branches {
for dir in ~/Code/*/; do
for dir in $HOME/Code/*/; do
cd $dir
pwd
git ls-remote --heads
@@ -1024,7 +1091,7 @@
alias check-branch="git ls-remote --heads"
alias branch-check="check-branch"
alias_reload_bash: |
alias reload-bash="source ~/.bashrc"
alias reload-bash="source $HOME/.bashrc"
alias bash-reload="reload-bash"
alias shell-reload="reload-bash"
alias reload-shell="reload-bash"
@@ -1043,10 +1110,10 @@
alias_flatpak_clean: |
alias flatpak-clean="flatpak uninstall --unused"
alias_commit: |
function commit_usage {
function commit_usage() {
echo 'Usage: commit "This is a commit message"'
}
function commit {
function commit() {
if [[ -z "$1" ]]; then
echo "ERROR: Message must be provided."
commit_usage
@@ -1063,9 +1130,106 @@
status="$?"
return "$status"
}
function_loop: |
function loop() {
cmd="$1"
while true; do
$cmd
done;
}
alias try="loop "
source_shared: |
if [ -f $HOME/.rc_shared ]; then
source $HOME/.rc_shared
fi
process_notify_log: |
if [[ -e {{ notify_log_file }} ]]; then
cp "{{ notify_log_file }}" "{{ notify_log_file_wip }}" 1>/dev/null
echo -n "" > "{{ notify_log_file }}"
cat "{{ notify_log_file_wip }}" | while read title message; do
notify-send "$title" "$message"
done
sh -c "rm '{{ notify_log_file_wip }}'"
fi
function_reconnect: |
function reconnect() {
test_domain="git.hyperling.com"
test_connection() {
ping -c 3 $test_domain
status="$?"
echo "* Status Returned: '$status'"
return $status
}
test_connection &&
echo -e "\n* Looks good! Not trying anything." &&
return 0 ||
echo -e "\n* Connection failed, troubleshooting..."
show_connection() {
ip addr | grep ' UP '
ip addr | grep ' inet'
#ip addr | grep -i 'mullvad'
}
echo -e "\n* Current Connections:"
show_connection
reset_mullvad() {
mullvad disconnect && sleep 5 && mullvad connect && sleep 10
}
echo -e "\n* Turning Mullvad Off & On Again"
reset_mullvad
echo "Done!"
echo -e "\n* Checking Connections"
show_connection
echo -e "\n* Testing Again..."
test_connection &&
echo -e "\n* Looks good! Not trying anything else." &&
return 0 ||
echo -e "\n* Connection failed, troubleshooting more..."
reset_wifi() {
wifi off
sleep 5
wifi on
sleep 10
}
echo -e "\n* Turning WiFi Off & On Again"
reset_wifi
echo "Done!"
echo -e "\n* Testing Again..."
test_connection &&
echo -e "\n* Looks good now!" &&
return 0 ||
echo -e "\n* Connection still failed, maybe try rebooting?"
}
alias test_wifi="reconnect"
alias test_network="reconnect"
alias test_connection="reconnect"
alias test_connections="reconnect"
alias fix_wifi="reconnect"
alias fix_network="reconnect"
alias fix_connection="reconnect"
alias fix_connections="reconnect"
function_reset_android_studio: |
# Useful after Android Studio is closed improperly. Resets all settings.
function reset_android_studio() {
mv -v ~/.var/app/com.google.AndroidStudio ~/TRASH/com.google.AndroidStudio-`date +"%Y%m%d"`
}
alias reset-android-studio="reset_android_studio "
- name: General | Account Management | Users | Files | Common Variable
set_fact:
profile_common: |
{{ export_path_additions }}
{{ export_path_sbin }}
{{ export_terminal }}
{{ export_browser }}
{{ keyboard_settings }}
{{ export_notify }}
rc_common: |
# Fixes "command not found" when using aliases within functions.
shopt -s expand_aliases
@@ -1082,7 +1246,7 @@
export server="{{ server }}"
export domain="{{ domain }}"
{{ export_path_additions }}
{{ source_shared }}
{{ alias_cp }}
{{ alias_mv }}
{{ alias_rm }}
@@ -1116,10 +1280,9 @@
{{ function_code_reseed }}
{{ function_clean_filenames }}
{{ function_clean_filenames_tree }}
{{ alias_clone }}
{{ export_hyperling }}
{{ source_docker_env }}
{{ alias_scan }}
{{ export_prod }}
{{ alias_prod }}
{{ function_clean_code }}
{{ alias_kill_battery }}
@@ -1128,14 +1291,11 @@
{{ function_ansible_vars }}
{{ alias_permission_commands }}
{{ alias_iftop }}
{{ alias_ls }}
{{ alias_progs }}
{{ alias_nethogs }}
{{ alias_ansible_facts }}
{{ function_now }}
{{ function_backup }}
{{ function_pull_prod_backups }}
{{ function_log }}
{{ function_debian_upgrade }}
{{ function_ebook_convert }}
{{ alias_sudo }}
@@ -1146,22 +1306,47 @@
{{ alias_docker_other }}
{{ alias_flatpak_clean }}
{{ alias_commit }}
{{ function_loop }}
{{ process_notify_log }}
{{ function_reconnect }}
{{ function_reset_android_studio }}
- name: General | Account Management | Users | Files | .profile + .xsessionrc
blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
{{ profile_common }}
[[ $(whoami) != "root" ]] &&
echo "`date` - Ansible .profile loaded successfully!"
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: no
loop:
- ".profile"
- ".xprofile"
- ".xsessionrc"
when: user_user.home != ""
- name: General | Account Management | Users | Files | .bashrc
blockinfile:
path: "{{ item }}/.bashrc"
block: |
{{ rc_common }}
# Export all functions! #
eval "$(declare -F | grep -v _ | sed 's/-f /-fx /')"
[[ $(whoami) != "root" ]] &&
echo "`date` - Ansible .bashrc loaded successfully!"
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: yes
backup: no
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | Files | .zshrc
@@ -1174,36 +1359,10 @@
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: yes
backup: no
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | Files | .vimrc
blockinfile:
path: "{{ item }}/.vimrc"
block: |
" Turn off syntax, flashy lights, etc. Make VIM into a basic editor.
syntax off
set nohlsearch
set noautoindent noautowrite noshowmatch wrapmargin=0 report=1 ts=3
set ignorecase
" Turn off auto-commenting.
autocmd Filetype * set fo-=c fo-=r fo-=o
" qq shortcut for immediately exiting all files without saving.
nnoremap qq :qa!<cr>
marker: '" {mark} MANAGED BY ANSIBLE | vimrc'
state: present
create: yes
backup: yes
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | Files | Ownership
@@ -1214,11 +1373,14 @@
loop:
- .bashrc
- .zshrc
- .vimrc
- .profile
- .xprofile
- .xsessionrc
- name: General | Account Management | Users | Files | Helper Functions (Reset)
shell: "rm -v {{ global_bin }}/*.function"
ignore_errors: yes
- name: General | Account Management | Users | Files | Helper Functions
copy:
@@ -1229,3 +1391,53 @@
mode: 0755
with_fileglob:
- "functions/*.function"
# Shared Environment Setup #
- name: General | Account Management | Users | env-shared | Download / Update
git:
repo: https://git.hyperling.com/me/env-shared
version: "{{ branch }}"
dest: "{{ shared_rc_install_dir }}"
clone: true
force: true
update: true
#ignore_errors: yes
- name: General | Account Management | Users | env-shared | Install | .rc_shared
copy:
src: "{{ shared_rc_install_dir }}/rc_shared.sh"
dest: "{{ item }}/.rc_shared"
owner: root
group: "{{ root_group }}"
mode: 0755
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
#ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | env-shared | Install | .vimrc
copy:
src: "{{ shared_rc_install_dir }}/vimrc.vim"
dest: "{{ item }}/.vimrc"
owner: root
group: "{{ root_group }}"
mode: 0755
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
#ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | env-shared | Permissions
file:
path: "{{ user_user.home }}/{{ item }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
loop:
- .rc_shared
- .vimrc
#ignore_errors: yes
+8 -3
View File
@@ -7,12 +7,17 @@
# $RANDOM / 50 can be up to about 650 seconds, or ~11 minutes.
# $RANDOM / 100 can be up to about 320 seconds, or ~5 minutes.
# This prevents multiple systems from hitting it at the exact same time.
- name: General | Cron | Ansible | Facts
set_fact:
ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.`date +'%Y%m%d-%H%M%S'`.log"
- name: General | Cron | Ansible | Create Subscriber Job
cron:
user: ansible
name: "Ansible Sync"
minute: "*/30"
job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }}'"
job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }} >{{ ansible_cron_log }} 2>&1'"
state: present
disabled: "{{ 'yes' if no_telem else 'no' }}"
@@ -20,7 +25,7 @@
cron:
user: ansible
name: "Ansible Weekly Forced Sync"
special_time: daily
job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }}'"
special_time: weekly
job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }} >{{ ansible_cron_log }} 2>&1'"
state: present
disabled: "{{ 'yes' if no_telem else 'no' }}"
+1 -1
View File
@@ -2,7 +2,7 @@
# Copy everything from PROJECT/files/scripts/ to /usr/local/bin/.
- name: General | Scripts | Install | Ensure Directory Exists
ansible.builtin.file:
file:
path: '{{ global_bin }}'
state: directory
mode: '0755'
+16
View File
@@ -0,0 +1,16 @@
---
# 20260716 - Hyperling
# Ensure the correct International AltGr keyboard setting is always chosen.
- name: General | Settings | Keyboard | Default Config
lineinfile:
path: "/etc/default/keyboard"
regexp: '{{ item.key }}'
line: '{{ item.value }}'
state: present
create: yes
backup: yes
loop:
#- { "key": '^[\#]?XKBMODEL', "value": 'XKBMODEL="pc105"'}
- { "key": '^[\#]?XKBLAYOUT', "value": 'XKBLAYOUT="us"'}
- { "key": '^[\#]?XKBVARIANT', "value": 'XKBVARIANT="altgr-intl"'}
+54
View File
@@ -0,0 +1,54 @@
---
# 20260731 - Hyperling
# Install the AUR on pacman-related distros.
- name: General | Software | AUR | Facts 01
set_fact:
aur_user: aurbuilder
aur_build_dir: "{{ global_src }}"
aur_helper: yay
aur_helper_url: https://aur.archlinux.org/yay-bin.git
- name: General | Software | AUR | Facts 02
set_fact:
aur_helper_dir: "{{ aur_build_dir }}/{{ aur_helper }}"
aur_sudoers: "/etc/sudoers.d/sudoers_{{ aur_user }}"
- name: General | Software | AUR | User
user:
name: "{{ aur_user }}"
groups: wheel
create_home: true
- name: General | Software | AUR | Sudoers
lineinfile:
path: "{{ aur_sudoers }}"
line: "{{ aur_user }} ALL=(ALL) NOPASSWD: /usr/bin/pacman"
create: true
mode: '0440'
validate: 'visudo -cf %s'
- name: General | Software | AUR | Check
command: "which {{ aur_helper }}"
register: yay_check
changed_when: false
failed_when: false
- name: General | Software | AUR | Install
block:
- name: General | Software | AUR | Install | Clone Repo
git:
repo: "{{ aur_helper_url }}"
dest: "{{ aur_helper_dir }}"
- name: General | Software | AUR | Install | Change Permissions
shell: "chown -Rc {{ aur_user }}:wheel {{ aur_helper_dir }}"
- name: General | Software | AUR | Install | Build & Integrate
shell: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
become_user: "{{ aur_user }}"
changed_when: true
when: yay_check.rc != 0
+28 -2
View File
@@ -5,6 +5,12 @@
set_fact:
metasploit_installer: msfinstall
when: ansible_system in ("Linux", "Darwin")
and pentesting == true
- name: General | Software | Metasploit | Check Install Status
stat:
path: /usr/bin/msfconsole
register: metasploit_status
- name: General | Software | Metasploit | Refresh Apt Files
shell: "{{ item }}"
@@ -13,7 +19,9 @@
- "mv -fv /usr/share/keyrings/metasploit-framework.gpg /tmp/apt/metasploit-framework.gpg.old"
- "mv -fv /etc/apt/sources.list.d/metasploit-framework.list /tmp/apt/metasploit-framework.list.old"
- "mv -fv /etc/apt/preferences.d/pin-metasploit.pref /tmp/apt/pin-metasploit.pref.old"
when: ansible_system in ("Linux")
when: ansible_system in ("Linux") and ansible_pkg_mgr == "apt"
and not metasploit_status.stat.exists
and pentesting == true
ignore_errors: true
- name: General | Software | Metasploit | Install
@@ -22,6 +30,24 @@
- "curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > {{ metasploit_installer }}"
- "chmod 755 {{ metasploit_installer }}"
- "mkdir -p {{ global_bin }}"
- "mv -fv ./msfinstall {{ global_bin }}/{{ metasploit_installer }}"
- "mv -fv ./{{ metasploit_installer }} {{ global_bin }}/{{ metasploit_installer }}"
- yes y | "{{ global_bin }}/{{ metasploit_installer }}"
when: ansible_system in ("Linux", "Darwin")
and not metasploit_status.stat.exists
and pentesting == true
- name: General | Software | Metasploit | Remove (Darwin)
shell: "{{ item }}"
loop:
- "/opt/metasploit-framework/bin/msfremove"
when: ansible_system in ("Darwin")
and not metasploit_status.stat.exists
and pentesting == false
- name: General | Software | Metasploit | Remove
package:
name: "metasploit-framework"
state: absent
when: ansible_system in ("Linux")
and metasploit_status.stat.exists
and pentesting == false
+51 -42
View File
@@ -40,33 +40,41 @@
- name: General | Software | Packages | Install Software
package:
name:
- bash
- sudo
- nmap
- "{{ neofetch }}"
- "{{ sshfs }}"
- "{{ locate }}"
- zsh
- "{{ opensshd }}"
- "{{ tar }}"
- curl
- at
- gcc
- vim
- "{{ cron }}"
- "{{ encfs }}"
- rsync
- "{{ iftop }}"
- "{{ nethogs }}"
- "{{ ntp_server }}"
- "{{ dig }}"
- bash
- sudo
- nmap
- "{{ neofetch }}"
- "{{ sshfs }}"
- "{{ locate }}"
- zsh
- "{{ opensshd }}"
- "{{ tar }}"
- curl
- at
- gcc
- vim
- "{{ cron }}"
- "{{ encfs }}"
- rsync
- "{{ iftop }}"
- "{{ nethogs }}"
- "{{ ntp_server }}"
- "{{ dig }}"
- "{{ tmux }}"
- "{{ base_devel }}"
- "{{ sendmail }}"
- "{{ sendmail_mta }}"
- "{{ ca_certificates }}"
- "{{ alsa }}"
- "{{ stress }}"
- "{{ jq }}"
state: present
- name: General | Software | Packages | Install Software (DEV)
package:
name:
- "{{ microcode_amd }}"
- "{{ microcode_intel }}"
- "{{ microcode_amd }}"
- "{{ microcode_intel }}"
state: present
when: branch == "dev"
ignore_errors: yes
@@ -74,10 +82,10 @@
- name: General | Software | Packages | Add Generic Kernel + Tools (Ubuntu)
package:
name:
- linux-image-generic
- linux-headers-generic
- linux-tools-generic
- linux-tools-common
- linux-image-generic
- linux-headers-generic
- linux-tools-generic
- linux-tools-common
state: present
when: ansible_distribution == "Ubuntu"
ignore_errors: yes
@@ -85,27 +93,28 @@
- name: General | Software | Packages | Add Generic Kernel + Headers (Debian)
package:
name:
- linux-image-amd64
- linux-headers-amd64
- linux-image-amd64
- linux-headers-amd64
state: present
when: ansible_distribution == "Debian"
ignore_errors: yes
- name: General | Software | Services | Install killall (Looking at you, Debian)
- name: General | Software | Packages | Install killall (Looking at you, Debian)
package:
name: psmisc
state: present
when: ansible_distribution == "Debian"
- name: General | Software | Services | Install "Bloat" (Looking at you, Arch Base)
- name: General | Software | Packages | Install "Bloat" (Looking at you, Arch Base)
package:
name:
- which
- "{{ cron }}"
- which
- "{{ cron }}"
- pacman-contrib
state: present
when: ansible_distribution == "Archlinux"
when: ansible_pkg_mgr == "pacman"
- name: General | Software | Services | Install Fix (Looking at you, openSUSE)
- name: General | Software | Packages | Install Fix (Looking at you, openSUSE)
package:
name:
# openSUSE Tumbleweed comes without gnome-control-center being able to open
@@ -120,21 +129,21 @@
- name: General | Software | Packages | Update Software (Disabled)
package:
name:
- ansible
- git
- ansible
- git
state: latest
when: 1 == 0
- name: General | Software | Packages | Remove Software
package:
name:
- cowsay # Sorry ;)
- chromium
- chromium-browser
- cowsay # Sorry ;)
- chromium
- chromium-browser
state: absent
# Ubuntu still uses snap for critical components like GNOME, must keep.
- name: General | Software | Services | Disable Snap Daemon
- name: General | Software | Packages | Disable Snap Daemon
service:
name: snapd
pattern: snapd
@@ -146,7 +155,7 @@
- name: General | Software | Packages | Remove Snap (Besides Ubuntu)
package:
name:
- snapd
- snapd
state: absent
when: ansible_distribution != "Ubuntu"
ignore_errors: yes
@@ -154,7 +163,7 @@
- name: General | Software | Packages | Other Debian Packages
package:
name:
- usbutils
- usbutils
state: present
when: ansible_distribution in ("Debian")
ignore_errors: yes
+47 -27
View File
@@ -10,30 +10,20 @@
state: started
enabled: yes
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr != "runit"
register: cron_status
until: cron_status.state == "started"
retries: 3
delay: 3
## CUPS ##
- name: General | Software | Services | CUPS | Disable
- name: General | Software | Services | CROND | Enable (runit)
service:
name: "{{ cups }}"
pattern: "{{ cups_pattern }}"
state: stopped
enabled: no
ignore_errors: yes
- name: General | Software | Services | CUPS-Browse | Disable
service:
name: "{{ cups_browse }}"
pattern: "{{ cups_browse_pattern }}"
state: stopped
enabled: no
ignore_errors: yes
name: "{{ crond }}"
state: started
enabled: yes
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr == "runit"
ignore_errors: true # Service module seems experimental for this init system.
## SSHD ##
@@ -82,30 +72,31 @@
state: reloaded
enabled: yes
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr != "runit"
register: sshd_status
until: sshd_status.state == "started"
retries: 3
delay: 3
## JournalCTL ##
- name: General | Software | Services | JournalCTL | Reduce Log Size
shell: journalctl --vacuum-size=100M
when: ansible_system == "Linux"
and ansible_service_mgr == "systemd"
ignore_errors: yes
## Bluetooth ##
# Do people seriously depend on Bluetooth? Plug your devices in, silly!
# Hehe, I use it now for a few rare things so disabling this for now.
- name: General | Software | Services | Bluetooth | Disable
service:
name: "{{ bluetooth }}"
pattern: "{{ bluetooth_pattern }}"
state: stopped
enabled: no
ignore_errors: yes
#- name: General | Software | Services | Bluetooth | Disable
# service:
# name: "{{ bluetooth }}"
# pattern: "{{ bluetooth_pattern }}"
# state: stopped
# enabled: no
# ignore_errors: yes
## NTP ##
@@ -116,6 +107,7 @@
state: started
enabled: yes
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr != "runit"
register: ntp_status
until: ntp_status.state == "started"
retries: 3
@@ -127,3 +119,31 @@
# Add a field to general.yml config file which gets applied via timedatectl and /etc/localtime.
# Example of what to do to file:
# /etc/localtime -> ../usr/share/zoneinfo/America/Phoenix
## Disable ##
- name: General | Software | Services | Disable
service:
name: "{{ item.name }}"
pattern: "{{ item.pattern }}"
state: stopped
enabled: no
ignore_errors: yes
loop:
- {name: "{{ cups }}" , pattern: "{{ cups_pattern }}"}
- {name: "{{ cups_browse }}", pattern: "{{ cups_browse_pattern }}"}
when: ansible_service_mgr != "runit"
- name: General | Software | Services | Disable (runit)
shell: |
if [[ -e {{ runit_service_dir }}/{{ item.name }} ]]; then
rm -v {{ runit_service_dir }}/{{ item.name }}
fi
ignore_errors: yes
loop:
- {name: "{{ cups }}" }
- {name: "{{ cups_pattern }}" }
- {name: "{{ cups_browse }}" }
- {name: "{{ cups_browse_pattern }}"}
when: ansible_service_mgr == "runit"
+16
View File
@@ -0,0 +1,16 @@
---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Facts
set_fact:
lock_file: "/tmp/ansible-playbook.lock"
- name: General | Tests | Existing Run | Check
stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Exit
meta: end_play
when: lock_exists.stat.exists
+22
View File
@@ -0,0 +1,22 @@
---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Lock | Create
shell: "date +'%Y-%m-%d %H:%M:%S' >> {{lock_file }}"
- name: General | Tests | Existing Run | Lock | Create
file:
name: "{{ lock_file }}"
mode: '0777'
- name: General | Tests | Existing Run | Lock | Create | Check
stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Lock | Create | Fail
fail:
msg: "ERROR: Lock file does not exist."
when: not lock_exists.stat.exists
+18
View File
@@ -0,0 +1,18 @@
---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Lock | Remove
file:
name: "{{ lock_file }}"
state: absent
- name: General | Tests | Existing Run | Lock | Remove | Check
stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Lock | Remove | Fail
fail:
msg: "ERROR: Lock file still exists!"
when: lock_exists.stat.exists
+11
View File
@@ -5,7 +5,17 @@
set_fact:
services_report_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.services.txt"
services_enabled_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.services-enabled.txt"
services_command: "echo 'Service Manager {{ ansible_service_mgr }} Not Recognized'"
- name: General | Tests | Services | Set Facts | SystemD
set_fact:
services_command: "systemctl list-unit-files"
when: ansible_service_mgr == "systemd"
- name: General | Tests | Services | Set Facts | runit
set_fact:
services_command: 'for s in {{ runit_service_dir }}/*; do sv status "$s"; done'
when: ansible_service_mgr == "runit"
- name: General | Tests | Services | Create Main Report
shell: "{{ item }}"
@@ -20,6 +30,7 @@
- "date > {{ services_enabled_file }}"
- "echo '\n-= Enabled + Sorted =-\n' >> {{ services_enabled_file }}"
- "grep 'enabled' {{ services_report_file }} | sort >> {{ services_enabled_file }}"
when: ansible_service_mgr == "systemd"
- name: General | Tests | Services | Make Viewable
file:
+155 -90
View File
@@ -12,23 +12,34 @@
# Command-line tools is all Flutter actually needs:
# https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
- name: Workstation | Linux | Software | Android | Facts [1/3]
- name: Workstation | Linux | Software | Android | Facts [01]
set_fact:
android_url: "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip"
android_download_file: "{{ user_user.home }}/Downloads/android-cmdline-tools.tar.xz"
android_sdk_location: "{{ user_user.home }}/SDKs/Android/Sdk"
android_report_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.sdk.android.txt"
- name: Workstation | Linux | Software | Android | Facts [2/3]
- name: Workstation | Linux | Software | Android | Facts [02]
set_fact:
android_bin_location: "{{ android_sdk_location }}/platform-tools"
android_sdk_cmdline_temp: "{{ android_sdk_location }}/ansible"
android_sdk_cmdline_final: "{{ android_sdk_location }}/cmdline-tools/latest/bin"
- name: Workstation | Linux | Software | Android | Facts [3/3]
- name: Workstation | Linux | Software | Android | Facts [03]
set_fact:
android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager"
android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/sdkmanager"
android_sdkmanager_final2: "{{ android_sdk_cmdline_final }}/android"
- name: Workstation | Linux | Software | Android | Facts [04]
set_fact:
android_sdkmanager2: "{{ android_sdkmanager_final2 }} sdk --sdk={{ android_sdk_location }}"
- name: Workstation | Linux | Software | Android | Facts [05]
set_fact:
android_sdkmanager2_list: "{{ android_sdkmanager2 }} list"
android_sdkmanager2_install: "{{ android_sdkmanager2 }} install"
android_sdkmanager2_remove: "{{ android_sdkmanager2 }} remove"
# Regarding images to download; the `default` is the smallest, then `playstore`.
# The `google_apis` images are significantly larger than the `playstore` option.
@@ -70,75 +81,71 @@
- name: Workstation | Linux | Software | Android | Facts [Downloads]
set_fact:
android_downloads_required:
### 36 ###
- build-tools;36.0.0
- platforms;android-36
- sources;android-36
# Images
#- system-images;android-35;default;x86_64 # TODO: Switch once it exists.
- system-images;android-36;google_apis_playstore;x86_64
### 16 ###
- platforms;android-16
- sources;android-16
# Images
- system-images;android-16;default;x86
### 36 ### - Recommended by Android Studio and Flutter, deprecating August 2027.
- build-tools/36.0.0
- platforms/android-36
- sources/android-36
- system-images/android-36/default/x86_64
### 35 ###
# Still used by Flutter to do Sunset Alarm compilations, even targeting 36, likely due to plugins.
- platforms/android-35
### 24 ### - Base for Flutter.
- system-images/android-24/default/x86_64
### 16 ### - Base for Android Studio.
- system-images/android-16/default/x86
android_downloads_additional:
### 35 ###
- platforms;android-35
- sources;android-35
# Images
- system-images;android-35;default;x86_64
### 34 ###
- platforms;android-34
- sources;android-34
# Images
- system-images;android-34;default;x86_64
### 33 ###
- platforms;android-33
- sources;android-33
# Images
- system-images;android-33;default;x86_64
### 37 ### - Upcoming version, required by August 2027.
- build-tools/37.0.0
- platforms/android-37.0
- sources/android-37.0
### 30 ###
- platforms;android-30
- sources;android-30
# Images
- system-images;android-30;default;x86_64
### 27 ###
- platforms;android-27
- sources;android-27
# Images
- system-images;android-27;default;x86_64
### 21 ###
- platforms;android-21
- sources;android-21
# Images
- system-images;android-21;default;x86_64
- system-images/android-30/default/x86_64
android_downloads_unused:
### 37 ###
### 36 ###
# Images
- system-images;android-36;google_apis;x86_64
- system-images/android-36/google_apis_playstore/x86_64
- system-images/android-36/google_apis/x86_64
### 35 ###
- build-tools;35.0.0
- build-tools;35.0.1
# Images
- system-images;android-35;aosp_atd;x86_64 # ATD = Automated Test Device
- system-images;android-35;google_apis;x86_64
- system-images;android-35;google_apis_playstore;x86_64
- build-tools/35.0.0
- build-tools/35.0.1
- sources/android-35
- system-images/android-35/default/x86_64
- system-images/android-35/aosp_atd/x86_64 # ATD = Automated Test Device
- system-images/android-35/google_apis/x86_64
- system-images/android-35/google_apis_playstore/x86_64
### 34 ###
- build-tools;34.0.0
- platforms;android-34
- sources;android-34
# Images
- system-images;android-34;google_apis;x86_64
- system-images;android-34;google_apis_playstore;x86_64
- build-tools/34.0.0
- platforms/android-34
- sources/android-34
- system-images/android-34/default/x86_64
- system-images/android-34/google_apis/x86_64
- system-images/android-34/google_apis_playstore/x86_64
### 33 ###
- platforms/android-33
- sources/android-33
- system-images/android-33/default/x86_64
### 30 ###
- platforms/android-30
- sources/android-30
### 27 ###
- platforms/android-27
- sources/android-27
- system-images/android-27/default/x86_64
### 24 ###
- platforms/android-24
- sources/android-24
### 21 ###
- platforms/android-21
- sources/android-21
- system-images/android-21/default/x86_64
### 16 ###
# Images
- system-images;android-16;google_apis;x86
- platforms/android-16
- sources/android-16
- system-images/android-16/google_apis/x86
### 15 ###
- platforms;android-15
- sources;android-15
# Images
- system-images;android-15;default;x86 # Not working in Android AVDs
- platforms/android-15
- sources/android-15
- system-images/android-15/default/x86 # Not working in Android AVDs
## Checks ##
@@ -157,7 +164,7 @@
get_attributes: false
get_checksum: false
get_mime: false
register: android_sdkmanager_final_stat
register: android_sdkmanager_check
when: coding == true
- name: Workstation | Linux | Software | Android | Check Download Exists
@@ -175,21 +182,23 @@
- name: Workstation | Linux | Software | Android | Dependencies [Install]
package:
name:
- default-jdk
- libc6
- libncurses5
- libstdc++6
- lib32z1
- libbz2-1.0
- "{{ android_jdk }}"
- "{{ c_libs }}"
- "{{ ncurses }}"
- "{{ cpp_libs }}"
- "{{ z_libs }}"
- "{{ bzip }}"
- "{{ android_udev }}"
state: present
when: coding == true
- name: Workstation | Linux | Software | Android | Dependencies [Remove]
package:
name:
- sdkmanager
- "{{ android_sdkmanager }}"
state: absent
when: coding == true
and ansible_pkg_mgr == "apt"
## Install SDK ##
@@ -221,7 +230,8 @@
group: "{{ user }}"
become_user: "{{ user }}"
when: coding == true and not android_sdkmanager_temp_stat.stat.exists
when: coding == true
and not android_sdkmanager_temp_stat.stat.exists
- name: Workstation | Linux | Software | Android | Delete Archive
file:
@@ -235,43 +245,94 @@
shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
loop:
# Current
- cmdline-tools;latest
- cmdline-tools/latest
- platform-tools
- emulator
become_user: "{{ user }}"
when: coding == true and not android_sdkmanager_final_stat.stat.exists
when: coding == true
and not android_sdkmanager_check.stat.exists
# These are safe to run multiple times, and uses the new `latest` version.
- name: Workstation | Linux | Software | Android | Install | Required Modules
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: |
if [[ {{ android_sdkmanager2_list }} | grep -v 'unknown' | grep -q '{{ item }}' == 1 ]]; then
yes | {{ android_sdkmanager2_install }} '{{ item }}'
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then
echo "INSTALLED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_required }}"
register: install_required
changed_when: "'INSTALLED' in install_required.stdout"
failed_when: "'FAILED' in install_required.stdout"
become_user: "{{ user }}"
when: coding == true
# Add more versions for testing across all the important platforms.
- name: Workstation | Linux | Software | Android | Install | Additional Modules
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: |
if [[ {{ android_sdkmanager2_list }} | grep -v 'unknown' | grep -q '{{ item }}' == 1 ]]; then
yes | {{ android_sdkmanager2_install }} '{{ item }}'
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then
echo "INSTALLED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_additional }}"
register: install_additional
changed_when: "'INSTALLED' in install_additional.stdout"
failed_when: "'FAILED' in install_additional.stdout"
become_user: "{{ user }}"
when: coding == true and sdks == true
when: coding == true
and sdks == true
# Remove extra downloads if system is not meant for full amount of testing.
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: |
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then
yes | {{ android_sdkmanager2_remove }} '{{ item }}'
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 1 ]]; then
echo "REMOVED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_additional }}"
register: remove_additional
changed_when: "'REMOVED' in remove_additional.stdout"
failed_when: "'FAILED' in remove_additional.stdout"
become_user: "{{ user }}"
when: coding != true or sdks != true
when: coding != true
or sdks != true
# Remove any versions which used to be part of this script and no longer used.
- name: Workstation | Linux | Software | Android | Uninstall | Unused Modules
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: |
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then
yes | {{ android_sdkmanager2_remove }} '{{ item }}'
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 1 ]]; then
echo "REMOVED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_unused }}"
register: remove_unused
changed_when: "'REMOVED' in remove_unused.stdout"
failed_when: "'FAILED' in remove_unused.stdout"
become_user: "{{ user }}"
when: coding == true
# Report the currently installed packges.
- name: Workstation | Linux | Software | Android | Report Modules
shell: "{{ android_sdkmanager_final }} --list_installed --sdk_root={{ android_sdk_location }} > {{ android_report_file }}"
shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
become_user: "{{ user }}"
when: coding == true
@@ -312,8 +373,10 @@
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true and user_root.home != "" and user_user.home != ""
ignore_errors: true
when: coding == true
and user_root.home != ""
and user_user.home != ""
- name: Workstation | Linux | Software | Android | Modify PATH (.zshrc)
blockinfile:
@@ -327,8 +390,10 @@
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true and user_root.home != "" and user_user.home != ""
ignore_errors: true
when: coding == true
and user_root.home != ""
and user_user.home != ""
## Uninstall SDK ##
@@ -345,15 +410,15 @@
- name: Workstation | Linux | Software | Android | System Tools [Install]
package:
name:
- fastboot
- adb
- "{{ android_fastboot }}"
- "{{ android_adb }}"
state: present
when: not coding == true
- name: Workstation | Linux | Software | Android | System Tools [Remove]
package:
name:
- fastboot
- adb
- "{{ android_fastboot }}"
- "{{ android_adb }}"
state: absent
when: coding == true
@@ -0,0 +1,24 @@
---
# 20260716 - Hyperling
# Begin customizing Cinnamon's dconf similar to GNOME.
# Favorites are handled in .config/cinnamon/spices/group*/*.json files.
# Does not seem as easy as GNOME and its dconf settings.
# Cinnamon does use some dconf though.
- name: Workstation | Linux | Software | Cinnamon | Facts | Defaults
set_fact:
cinnamon_package: cinnamon
- name: Workstation | Linux | Software | Cinnamon | Facts | Debian Derivitives
set_fact:
cinnamon_package: task-cinnamon-desktop
when: ansible_distribution in ("Debian", "Devuan")
- name: Workstation | Linux | Software | Cinnamon | Install
package:
name:
- "{{ cinnamon_package }}"
- "{{ lightdm }}"
state: present
update_cache: yes
+36 -23
View File
@@ -10,6 +10,10 @@
# Then remove, autoremove, and purge flatpak executable with package manager.
# Source: https://softhints.com/how-to-completely-remove-flatpak-linux-mint/
- name: Workstation | Linux | Flatpak Distro | Flatpak | Facts
set_fact:
flatpak_extension: "-flatpak"
## Flatpak Pre-reqs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Install
@@ -34,29 +38,30 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Arrays
set_fact:
flatpaks_generic:
- { app: "org.mozilla.firefox", name: "firefox-flatpak", extra: "" }
- { app: "io.gitlab.librewolf-community", name: "librewolf", extra: "" }
- { app: "org.signal.Signal", name: "signal", extra: "" }
- { app: "im.riot.Riot", name: "element", extra: "" }
- { app: "org.telegram.desktop", name: "telegram", extra: "" }
- { app: "org.gimp.GIMP", name: "gimp", extra: "" }
- { app: "org.libreoffice.LibreOffice", name: "office", extra: "" }
- { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" }
- { app: "app.grayjay.Grayjay", name: "grayjay", extra: "" }
- { app: "com.github.xournalpp.xournalpp", name: "xournal", extra: "" }
- { app: "network.loki.Session", name: "session", extra: "" }
- { app: "com.brave.Browser", name: "brave", extra: "" }
- { app: "net.ankiweb.Anki", name: "anki", extra: "" }
- { app: "app.organicmaps.desktop", name: "organic-maps", extra: "" }
- { app: "im.dino.Dino", name: "dino", extra: "" }
flatpaks_coding:
- { app: "com.vscodium.codium", name: "codium-flatpak", extra: "" }
- { app: "com.vscodium.codium", name: "codium", extra: "" }
- { app: "com.google.AndroidStudio", name: "android-studio", extra: "" }
- { app: "io.dbeaver.DBeaverCommunity", name: "dbeaver", extra: "" }
- { app: "com.visualstudio.code-oss", name: "code-flatpak", extra: "" }
- { app: "org.gnome.Boxes", name: "gnome-boxes", extra: "" }
flatpaks_editing_video:
- { app: "org.shotcut.Shotcut", name: "shotcut", extra: "" }
- { app: "com.obsproject.Studio", name: "obs", extra: "" }
- { app: "com.obsproject.Studio", name: "obs-studio", extra: "" }
- { app: "org.openshot.OpenShot", name: "openshot", extra: "" }
flatpaks_editing_audio:
- { app: "org.tenacityaudio.Tenacity", name: "tenacity", extra: "" }
- { app: "io.lmms.LMMS", name: "lmms", extra: "" }
- { app: "net.sourceforge.VMPK", name: "vmpk", extra: "" }
- { app: "org.musicbrainz.Picard", name: "picard", extra: "" }
flatpaks_gaming:
- { app: "com.valvesoftware.Steam", name: "steam", extra: "" }
- { app: "com.play0ad.zeroad", name: "zeroad", extra: "" }
@@ -78,6 +83,14 @@
- { app: "org.rncbc.qsynth", name: "qsynth", extra: "" } # 2024-12-15, Not worth the setup, use LMMS or VMPK.
- { app: "org.godotengine.Godot", name: "godot", extra: "" } # 2025-08-31, Stopped playing with this months / years ago. Seemed cool but Flutter is working well for this purpose.
- { app: "chat.simplex.simplex", name: "simplex", extra: "" } # 2025-11-22, Takes a ton of space and does not work without interacting with phone.
- { app: "com.visualstudio.code-oss", name: "code", extra: "" } # 2026-09-29, reached end of life a few years ago.
# 2026-09-29, Preferring local versions of apps even if they are not as up to date. #
- { app: "org.mozilla.firefox", name: "firefox", extra: "" }
- { app: "org.gimp.GIMP", name: "gimp", extra: "" }
- { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" }
- { app: "org.libreoffice.LibreOffice", name: "libreoffice", extra: "" }
- { app: "com.github.xournalpp.xournalpp", name: "xournal", extra: "" }
# End 2026-09-29 #
# Generic #
@@ -91,7 +104,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
@@ -104,7 +117,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_generic }}"
@@ -122,7 +135,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
@@ -136,7 +149,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_coding }}"
@@ -153,7 +166,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
@@ -172,7 +185,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Video Editors | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
@@ -186,7 +199,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Video Editors | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_editing_video }}"
@@ -203,7 +216,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Video Editors | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_editing_video }}"
ignore_errors: yes
@@ -220,7 +233,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
@@ -234,7 +247,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_editing_audio }}"
@@ -251,7 +264,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_editing_audio }}"
ignore_errors: yes
@@ -270,7 +283,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
@@ -284,7 +297,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_gaming }}"
@@ -301,7 +314,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
@@ -319,7 +332,7 @@
- name: Workstation | Linux | Flatpak Distro | Flatpak | Uninstalls | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_remove }}"
ignore_errors: yes
+25 -24
View File
@@ -3,25 +3,22 @@
## Facts ##
- name: Workstation | Linux | Software | Flutter | Facts [1/4]
- name: Workstation | Linux | Software | Flutter | Facts 1
set_fact:
flutter_url: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.27.2-stable.tar.xz"
flutter_url: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.47.4-stable.tar.xz"
flutter_download_file: "{{ user_user.home }}/Downloads/flutter.tar.xz"
flutter_sdk_location: "{{ user_user.home }}/SDKs/Flutter"
flutter_report: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.sdk.flutter.txt"
when: coding == true
- name: Workstation | Linux | Software | Flutter | Facts [2/4]
- name: Workstation | Linux | Software | Flutter | Facts 2
set_fact:
flutter_bin_location: "{{ flutter_sdk_location }}/flutter/bin"
when: coding == true
- name: Workstation | Linux | Software | Flutter | Facts [3/4]
- name: Workstation | Linux | Software | Flutter | Facts 3
set_fact:
flutter: "{{ flutter_bin_location }}/flutter"
when: coding == true
- name: Workstation | Linux | Software | Flutter | Facts [3/3]
- name: Workstation | Linux | Software | Flutter | Facts 4
set_fact:
flutter_report_commands:
- "date > {{ flutter_report }}"
@@ -29,7 +26,6 @@
- "date >> {{ flutter_report }}"
- "{{ flutter }} doctor -v >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
when: coding == true
## Checks ##
@@ -40,7 +36,6 @@
get_checksum: false
get_mime: false
register: flutter_sdk_stat
when: coding == true
- name: Workstation | Linux | Software | Flutter | Check Download Exists
stat:
@@ -49,7 +44,6 @@
get_checksum: false
get_mime: false
register: flutter_download_stat
when: coding == true
## Packages ##
@@ -59,9 +53,10 @@
- curl
- git
- unzip
- xz-utils
- "{{ xz }}"
- zip
- libglu1-mesa
- "{{ mesa }}"
- "{{ mesa_utils }}"
state: present
when: coding == true
@@ -72,11 +67,11 @@
- clang
- cmake
- git
- ninja-build
- "{{ ninja }}"
- pkg-config
- libgtk-3-dev
- liblzma-dev
- libstdc++-12-dev
- "{{ gtk3 }}"
- "{{ xz_libs }}"
- "{{ cpp }}"
state: present
when: coding == true
@@ -84,10 +79,10 @@
- name: Workstation | Linux | Software | Flutter | Android App Dependencies
package:
name:
- libc6:amd64
- libstdc++6
- lib32z1
- libbz2-1.0
- "{{ c_libs }}"
- "{{ cpp_libs }}"
- "{{ z_libs }}"
- "{{ bzip }}"
state: present
when: coding == true
@@ -121,12 +116,14 @@
group: "{{ user }}"
become_user: "{{ user }}"
when: coding == true and not flutter_sdk_stat.stat.exists
when: coding == true
and not flutter_sdk_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Delete Archive
file:
path: "{{ flutter_download_file }}"
state: absent
when: coding == true
## Configure Environment ##
@@ -143,7 +140,9 @@
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true and user_root.home != "" and user_user.home != ""
when: coding == true
and user_root.home != ""
and user_user.home != ""
- name: Workstation | Linux | Software | Flutter | Modify PATH (.zshrc)
blockinfile:
@@ -158,7 +157,9 @@
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true and user_root.home != "" and user_user.home != ""
when: coding == true
and user_root.home != ""
and user_user.home != ""
## Test SDK ##
+56
View File
@@ -0,0 +1,56 @@
---
# 2026-09-11 Hyperling
# Move all Hugo development needs to a specific place.
- name: Workstation | Linux | Software | Hugo
block:
- name: Workstation | Linux | Software | Hugo | pacman
block:
- name: Workstation | Linux | Software | Hugo | pacman | Facts
set_fact:
sass_old: ruby-sass
sass_current: dart-sass
- name: Workstation | Linux | Software | Hugo | pacman | Remove Old
package:
name:
- "{{ sass_old }}"
state: absent
- name: Workstation | Linux | Software | Hugo | pacman | Install New
package:
name:
- "{{ sass_current }}"
state: present
when: ansible_pkg_mgr == "pacman"
# This must exist after nodejs.yml so that NPM is installed.
- name: Workstation | Linux | Software | Hugo | npm
block:
- name: Workstation | Linux | Software | Hugo | npm | Facts
set_fact:
sass_old: node-sass
sass_current: sass
- name: Workstation | Linux | Software | Hugo | npm | Gather
shell: npm prefix -g
register: npm_bin_dir # Provides /usr/local/ on Devuan, /usr/ on Artix.
changed_when: false
- name: Workstation | Linux | Software | Hugo | npm | Remove Old
shell: "npm remove -g {{ sass_old }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
- name: Workstation | Linux | Software | Hugo | npm | Install New
shell: "npm install -g {{ sass_current }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
when: ansible_pkg_mgr == "apt"
when: coding is true
+34
View File
@@ -0,0 +1,34 @@
---
# 20260912 - Hyperling
# Arch has too new of Java for Android / Gradle to even run AGP Assistant on.
- name: Workstation | Linux | Software | Java | pacman
block:
- name: Workstation | Linux | Software | Java | pacman | Facts
set_fact:
jdk_version: 21
jdk_dir: ~/SDKs/Java
- name: Workstation | Linux | Software | Java | pacman | Install
package:
name:
- "jdk{{ item }}-openjdk"
state: present
loop:
- "{{ jdk_version }}"
- 25
- 21
- 17
- name: Workstation | Linux | Software | Java | pacman | Set
shell: "archlinux-java set java-{{ jdk_version }}-openjdk"
- name: Workstation | Linux | Software | Java | pacman | Link
shell: "ln -sf /usr/lib/jvm {{ jdk_dir }}"
args:
creates: "{{ jdk_dir }}"
become_user: "{{ user }}"
when: coding is true
and ansible_pkg_mgr == "pacman"
+13 -2
View File
@@ -2,6 +2,17 @@
# Lutris for running Windows games not in Steam.
# https://lutris.net/downloads
## Starcraft 2 ##
# 2026-05-06: #
# Using "System (10.0 (Debian 10.0-repack-6))" works, not Proton.
# - Fails to actually open SC2, but Battle.net worss great, lol.
# does not get to login, pop-up freezes
# - wine 8
# - proton hotfix
# - proton exp
# - proton GE stabele / default
# - proton 9 (beta)
# Paths
- name: Workstation | Linux | Software | Lutris | Facts
@@ -34,10 +45,10 @@
- name: Workstation | Linux | Software | Lutris | Add PPA (Debian)
shell: "{{ item }}"
loop:
- "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_12/Release.key \
- "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_13/Release.key \
| gpg --dearmor \
| sudo tee {{ lutris_keyfile }} > /dev/null"
- "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./' \
- "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_13/ ./' \
| sudo tee {{ lutris_source_list }} > /dev/null"
- "sudo apt update"
when: ansible_distribution in ("Debian") and gaming == true and not lutris_source_exists.stat.exists
+20
View File
@@ -0,0 +1,20 @@
---
# 20260716 - Hyperling
# Giving this DE a shot but not liking it as much as others.
- name: Workstation | Linux | Software | LXQt | Facts | Defaults
set_fact:
lxqt_package: lxqt
- name: Workstation | Linux | Software | LXQt | Facts | Debian Derivitives
set_fact:
lxqt_package: task-lxqt-desktop
when: ansible_distribution in ("Debian", "Devuan")
- name: Workstation | Linux | Software | LXQt | Install
package:
name:
- "{{ lxqt_package }}"
- "{{ sddm }}"
state: present
update_cache: yes
@@ -0,0 +1,47 @@
---
# 20260730 - Hyperling
# Install much more recent Node versions.
# https://linuxcapable.com/how-to-install-node-js-on-debian-linux/
- name: Workstation | Software | NodeJS
block:
- name: Workstation | Software | NodeJS | apt
block:
- name: Workstation | Software | NodeJS | apt | Facts
set_fact:
node_version: node_24.x
- name: Workstation | Software | NodeJS | apt | Old | Remove
package:
name: npm
state: absent
- name: Workstation | Software | NodeJS | apt | extrepo | Install
package:
name: extrepo
state: present
update_cache: yes
- name: Workstation | Software | NodeJS | apt | extrepo | Enable
shell: "extrepo enable {{ node_version }}"
- name: Workstation | Software | NodeJS | apt | Install
package:
name: nodejs
state: latest
update_cache: yes
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | NodeJS | All Others | Install
package:
name:
- nodejs
- npm
state: present
when: ansible_pkg_mgr != "apt"
when: coding == true
+61 -16
View File
@@ -22,7 +22,7 @@
- name: Workstation | Linux | Software | Packages | Install Software (Editing)
package:
name:
- "{{ ffmpeg }}"
- "{{ ffmpeg }}"
state: present
when: editing in (true, "video", "audio")
@@ -34,35 +34,80 @@
- name: Workstation | Linux | Software | Packages | Install From Repo
package:
name:
- vlc
- "{{ vlc }}"
- "{{ vlc_plugins }}"
- "{{ appimagelauncher }}"
- "{{ evolution }}"
- "{{ evolution }}*"
- gparted
- hugo
- "{{ firefox }}"
- "{{ firefox_esr }}"
- "{{ wireless_tools }}"
- "{{ notify_send }}"
- "{{ fyi }}"
- "{{ gnome_boxes }}"
- "{{ rhythmbox }}"
- "{{ blueman }}"
- "{{ mpv }}"
- "{{ transmission_gtk }}"
- "{{ transmission_qt }}"
- gimp
- "{{ libreoffice }}"
state: present
- name: Workstation | Linux | Software | Packages | Install Audio (Looking at you, Artix)
package:
name:
- pipewire
- pipewire-pulse
- wireplumber
- pipewire-alsa
state: present
when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | Packages | Extra For Liberated Init Systems
package:
name:
- "{{ dunst }}"
state: present
when: ansible_service_mgr != "systemd"
- name: Workstation | Linux | Software | Packages | Install From AUR
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop:
- appimagelauncher
when: ansible_pkg_mgr == "pacman"
become_user: "{{ aur_user }}"
ignore_errors: true
- name: Workstation | Linux | Software | Packages | GS Connect (KDE Connect, Android Tool)
package:
name:
- gnome-shell-extension-gsconnect
- gnome-shell-extension-gsconnect
state: present
when: ansible_distribution in ("Debian")
ignore_errors: yes
ignore_errors: true
- name: Workstation | Linux | Software | Packages | Coding
package:
name:
- ansible-lint
state: present
when: coding == true
# Remove Repo Software #
- name: Workstation | Linux | Software | Packages | Remove Applications
package:
name:
- "{{ firefox }}"
- "{{ firefox_esr }}"
- "{{ thunderbird }}"
- steam
- vscode
- code
- libreoffice
- "*libreoffice*"
- '*libreoffice*'
- gimp
- "{{ thunderbird }}"
- "{{ evolution }}"
- steam
- vscode
- code
- libreoffice
- "*libreoffice*"
- '*libreoffice*'
- gimp
state: absent
+194
View File
@@ -0,0 +1,194 @@
---
# 20260716 - Hyperling
# Attempt to save battery life by having a daemon tune the CPU and disable
# unneeded components like USB, Bluetooth, WiFi, etc when not in use.
## Variables ##
- name: Workstation | Linux | Software | TLP | Facts
set_fact:
tlp_package: "tlp"
tlp_rdw: "tlp-rdw"
tlp_smart: "smartmontools"
tlp_config: "/etc/tlp.conf"
tlp_service: "tlp"
tlp_run_script: "tlp"
ppd_package: "power-profiles-daemon"
ppd_service: "power-profiles-daemon"
acf_package: "auto-cpufreq"
acf_service: "auto-cpufreq"
- name: Workstation | Linux | Software | TLP | Facts (Artix)
set_fact:
ppd_package: "power-profiles-daemon power-profiles-daemon-runit"
tlp_run_script: tlp-runit
when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit"
## Conflicts ##
#- name: Workstation | Linux | Software | TLP | Conflicts | Disable
# service:
# name: "{{ item }}"
# state: stopped
# enabled: false
# loop:
# - "{{ ppd_service }}"
# - "{{ acf_service }}"
# ignore_errors: yes
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
package:
name:
- "{{ ppd_package }}"
- "{{ acf_package }}"
state: absent
## Install TLP + Associated Software ##
- name: Workstation | Linux | Software | TLP | Install
package:
name:
- "{{ tlp_package }}"
- "{{ tlp_rdw }}"
- "{{ tlp_smart }}"
- "{{ tlp_run_script }}"
update_cache: yes
## Configuration ##
# Device choices:
# - bluetooth
# - nfc
# - wifi
# - wwan
# Bluetooth and WiFi are not always used so disable on boot.
# NFC and WWAN (cellular) are never used so always disable.
- name: Workstation | Linux | Software | TLP | Config
lineinfile:
path: "{{ tlp_config }}"
regexp: '{{ item.key }}'
line: '{{ item.value }} # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
loop:
- { "key": '^[\#]?TLP_ENABLE', "value": 'TLP_ENABLE=1'}
- { "key": '^[\#]?TLP_DEFAULT_MODE', "value": 'TLP_DEFAULT_MODE=SAV'}
## Device Controls ##
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_STARTUP', "value": 'DEVICES_TO_DISABLE_ON_STARTUP="bluetooth nfc wwan"'}
# Ensure these stay commented, once the device is booted the user is in control. #
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_STARTUP', "value": '#DEVICES_TO_ENABLE_ON_STARTUP=""'}
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
# Help preserve battery life by not fully charging. #
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT0=60'}
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=80'}
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=60'}
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=80'}
# Do not let the WiFi device go DORMANT.
- { "key": '^[\#]?WIFI_PWR_ON_AC', "value": 'WIFI_PWR_ON_AC=off'}
- { "key": '^[\#]?WIFI_PWR_ON_BAT', "value": 'WIFI_PWR_ON_BAT=off'}
# Do not let USB devices go dormant.
- { "key": '^[\#]?USB_AUTOSUSPEND', "value": 'USB_AUTOSUSPEND=0'}
## Enable + Start ##
# Ensure the service is running and will run after reboot.
- name: Workstation | Linux | Software | TLP | Enable + Start
service:
name: "{{ tlp_service }}"
state: started
enabled: true
when: ansible_service_mgr not in ("runit")
- name: Workstation | Linux | Software | TLP | runit | Devuan Block
block:
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 01
set_fact:
devuan_tlp_dir: "{{ runit_script_dir }}/{{ tlp_service }}"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 02
set_fact:
devuan_tlp_run: "{{ devuan_tlp_dir }}/run"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Create Script
shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_tlp_dir }}"
- "echo '#!/bin/sh' > {{ devuan_tlp_run }}"
- "echo 'exec /usr/sbin/{{ tlp_service }} start' >> {{ devuan_tlp_run }}"
- "chmod +x {{ devuan_tlp_run }}"
when: ansible_service_mgr == "runit"
and ansible_pkg_mgr == "apt"
- name: Workstation | Linux | Software | TLP | runit | Enable + Start
command: "{{ item }}"
loop:
- "ln -sf {{ runit_script_dir }}/{{ tlp_service }} {{ runit_service_dir }}/{{ tlp_service }}"
#- "sv start {{ tlp_service }}" # Not necessary and sometimes gives a false negative.
when: ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | TLP | runit | Functions & Aliases
blockinfile:
path: "{{ item }}"
block: |
function tlp-devices {
if [[ ! -z "$@" ]]; then
tlp-devices
echo -e "\n Applying '$@'...\n"
fi
wifi $@
bluetooth $@
nfc $@
wwan $@
}
alias devices="tlp-devices "
function devices-off {
echo -e "\n Checking Mullvad Status...\n"
mullvad status
echo -e "\n Checking Hardware Status...\n"
tlp-devices off
echo -e "\n Disconnecting Mullvad...\n"
mullvad disconnect
sleep 3
mullvad status
}
alias off="devices-off "
function devices-on {
echo -e "\n Checking Mullvad Status...\n"
mullvad status
echo -e "\n Checking Hardware Status...\n"
tlp-devices on
echo -e "\n Connecting Mullvad...\n"
mullvad connect
mullvad reconnect
sleep 3
mullvad status
echo -e "\n Rehecking Mullvad Status...\n"
sleep 12
mullvad status
}
alias on="devices-on "
marker: '# {mark} MANAGED BY ANSIBLE | tlp'
state: present
create: yes
backup: no
loop:
- "{{ user_user.home }}/.bashrc"
- "{{ user_user.home }}/.zshrc"
- "{{ user_root.home }}/.bashrc"
- "{{ user_root.home }}/.zshrc"
+114 -15
View File
@@ -1,23 +1,122 @@
---
# Install VPN client(s).
# https://mullvad.net/en/help/install-mullvad-app-linux
- name: Workstation | Software | VPN | Add Mullvad Repo [apt]
shell: "{{ item }}"
loop:
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
- apt update
- name: Workstation | Software | VPN | Mullvad
block:
# https://mullvad.net/en/help/install-mullvad-app-linux
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
shell: "{{ item }}"
loop:
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
- apt update
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
shell: "{{ item }}"
loop:
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
when: ansible_pkg_mgr == "dnf"
- name: Workstation | Software | VPN | Install
package:
name:
- mullvad-vpn
state: present
- name: Workstation | Software | VPN | Install (Artix, runit)
package:
name:
- mullvad-vpn-runit
state: present
when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit"
when: ansible_distribution in ("Debian", "Ubuntu")
or ansible_pkg_mgr in ("pacman", "dnf")
## Specific Distros ##
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
block:
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
set_fact:
devuan_mullvad_dir: "{{ global_src }}/mullvad-installer"
mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest
mullvad_repack_url: https://github.com/sys-fs/mullvad-repack
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02
set_fact:
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
stat:
path: '/opt/Mullvad VPN'
register: mullvad_installed
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_mullvad_dir }}"
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
- "rm -rfv {{ mullvad_repack_dir }}"
- "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}"
- "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb"
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
when: not mullvad_installed.stat.exists
when: ansible_pkg_mgr == "apt"
and ansible_service_mgr != "systemd"
- name: Workstation | Software | VPN | Add Mullvad Repo [dnf]
## Link & Enable ##
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 01
set_fact:
mullvad_exe: 'mullvad-vpn'
mullvad_exe_dir: '/opt/Mullvad\ VPN'
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 02
set_fact:
mullvad_exe_new: "{{ global_bin }}/{{ mullvad_exe }}"
- name: Workstation | Software | VPN | Mullvad | PATH | Facts (pacman)
set_fact:
mullvad_exe_dir: '/usr/bin'
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Software | VPN | Mullvad | PATH | Install
shell: "{{ item }}"
loop:
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
when: ansible_pkg_mgr == "dnf"
- rm {{ mullvad_exe_new }} || echo "File does not exist."
- echo "#!/usr/bin/env sh" > {{ mullvad_exe_new }}
- echo "cd {{ mullvad_exe_dir }}" >> {{ mullvad_exe_new }}
- echo "./{{ mullvad_exe }}" >> {{ mullvad_exe_new }}
- chmod +x {{ mullvad_exe_new }}
- name: Workstation | Software | VPN | Install
package:
name:
- mullvad-vpn
state: present
- name: Workstation | Software | VPN | Mullvad | runit | Enable Service (mullvad-daemon)
file:
src: "{{ runit_script_dir }}/mullvad-daemon"
dest: "{{ runit_service_dir }}/mullvad-daemon"
state: link
force: true
when: ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Mullvad | runit | Remove Old Service (mullvad)
file:
path: "{{ runit_service_dir }}/mullvad"
state: absent
when: ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Mullvad | PATH | Enable Lockdown
shell: "{{ item }}"
loop:
- mullvad lan set block
- mullvad tunnel set ipv6 on
- mullvad dns set default --block-ads --block-trackers --block-malware --block-gambling --block-adult-content --block-social-media
- mullvad auto-connect set on
- mullvad lockdown-mode set on
- mullvad beta-program set off
become_user: "{{ user }}"
+67 -59
View File
@@ -7,64 +7,72 @@
# This also exists but was not utilized:
# https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo
## Facts ##
- name: Workstation | Linux | Software | VS Codium
block:
## Facts ##
# Paths
- name: Workstation | Linux | Software | VS Codium | Facts
set_fact:
vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list"
vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg"
# Checks
- name: Workstation | Linux | Software | VS Codium | Check PPA
stat:
path: "{{ vscodium_source_list }}"
get_attributes: false
get_checksum: false
get_mime: false
register: vscodium_source_exists
## Install Repo ##
- name: Workstation | Linux | Software | VS Codium | Add PPA
shell: "{{ item }}"
loop:
- "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| sudo tee {{ vscodium_keyfile }} > /dev/null"
- "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \
| sudo tee {{ vscodium_source_list }}"
- "sudo apt update"
when: coding == true
and not vscodium_source_exists.stat.exists
## Install Package ##
- name: Workstation | Linux | Software | VS Codium | Install
package:
name:
- codium
state: present
when: ansible_pkg_mgr == "apt"
and coding == true
## Remove Package ##
- name: Workstation | Linux | Software | VS Codium | Uninstall
package:
name:
- codium
state: absent
when: coding != true
## Remove Repo ##
- name: Workstation | Linux | Software | VS Codium | Remove PPA
shell: "{{ item }}"
loop:
- "mv {{ vscodium_source_list }} ~/TRASH/"
- "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/"
- "sudo apt update"
when: coding != true
and vscodium_source_exists.stat.exists
# Paths
- name: Workstation | Linux | Software | VS Codium | Facts
set_fact:
vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list"
vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg"
when: ansible_pkg_mgr == "apt"
# Checks
- name: Workstation | Linux | Software | VS Codium | Check PPA
stat:
path: "{{ vscodium_source_list }}"
get_attributes: false
get_checksum: false
get_mime: false
register: vscodium_source_exists
when: ansible_pkg_mgr == "apt"
## Install Repo ##
- name: Workstation | Linux | Software | VS Codium | Add PPA
shell: "{{ item }}"
loop:
- "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| sudo tee {{ vscodium_keyfile }} > /dev/null"
- "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \
| sudo tee {{ vscodium_source_list }}"
- "sudo apt update"
when: ansible_pkg_mgr == "apt" and coding == true and not vscodium_source_exists.stat.exists
## Install Package ##
- name: Workstation | Linux | Software | VS Codium | Install
package:
name:
- codium
state: present
when: ansible_pkg_mgr == "apt" and coding == true
## Remove Package ##
- name: Workstation | Linux | Software | VS Codium | Uninstall
package:
name:
- codium
state: absent
when: ansible_pkg_mgr == "apt" and coding != true
## Remove Repo ##
- name: Workstation | Linux | Software | VS Codium | Remove PPA
shell: "{{ item }}"
loop:
- "mv {{ vscodium_source_list }} ~/TRASH/"
- "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/"
- "sudo apt update"
when: ansible_pkg_mgr == "apt" and coding != true and vscodium_source_exists.stat.exists
and ansible_distribution in ("Debian", "Ubuntu")
@@ -0,0 +1,21 @@
# TBD:
# - Decide whether this should be added to local.yml since wall does not work with gnome-terminal.
---
- name: Workstation | Shared | Cron | Root | Shutdown Warnings
cron:
user: root
name: "Shutdown Warnings"
minute: "*"
hour: "19-23"
job: /usr/bin/wall "Shutting down soon! Please save your work!" && /usr/sbin/shutdown --show
state: present
- name: Workstation | Shared | Cron | Root | Shutdown
cron:
user: root
name: "Shutdown"
minute: "*/5"
hour: "20-23"
job: /usr/sbin/shutdown -h 4
state: present
@@ -0,0 +1,338 @@
---
# 20260731 - Hyperling
# Cinnakon settings, copied from GNOME settings.
# Temporarily removed while it's broken:
# , 'com.vscodium.codium.desktop', 'codium.desktop'
- name: Workstation | Account Management | Cinnamon | Facts
set_fact:
# Only do multiple entries per line if they are for the same exact program.
cinnamon_favorites: "[ 'org.gnome.Terminal.desktop'
, 'org.gnome.Console.desktop'
, 'gnome-system-monitor.desktop', 'org.gnome.SystemMonitor.desktop'
, 'org.gnome.Nautilus.desktop'
, 'io.gitlab.librewolf-community.desktop', 'librewolf.desktop'
, 'org.mozilla.firefox.desktop', 'firefox.desktop'
, 'com.vscodium.codium.desktop'
, 'codium.desktop'
, 'org.shotcut.Shotcut.desktop'
, 'io.lmms.LMMS.desktop'
, 'app.grayjay.Grayjay.desktop'
, 'io.lbry.lbry-app.desktop', 'lbry.desktop'
, 'com.valvesoftware.Steam.desktop'
, 'net.lutris.Lutris.desktop'
, 'mullvad-vpn.desktop'
, 'network.loki.Session.desktop'
, 'org.signal.Signal.desktop', 'signal-desktop.desktop'
, 'org.telegram.desktop.desktop'
, 'com.discordapp.Discord.desktop'
]"
dconf_terminal: gnome-terminal
dconf_theme: Adwaita-dark
dconf_icons: Adwaita
# 2024-01-28 Not currently using local email clients.
#, 'org.gnome.Evolution.desktop'
#, 'chat.delta.desktop.desktop', 'deltachat.desktop'
#, 'org.gnome.Geary.desktop'
#, 'org.mozilla.Thunderbird.desktop'
# 2025-01-01
# Reduce the amount of icons on the sidebar, things that may get added back.
#, 'org.godotengine.Godot.desktop'
# 2025-03-07 Removed in place of a 2nd VS Codium install (apt version).
#, 'com.visualstudio.code-oss.desktop', 'code-oss.desktop'
# 2025-03-21 Not really using Android Studio now that Flutter is working.
#, 'com.google.AndroidStudio.desktop'
# 2025-08-31 Not used a whole lot, installed again just to explore.
#, 'im.riot.Riot.desktop'
#, 'chat.simplex.simplex.desktop'
- name: Workstation | Account Management | Cinnamon | Facts (NixOS)
set_fact:
dconf_terminal: kgx
when: ansible_distribution in ("NixOS")
- name: Workstation | Account Management | Cinnamon | Facts (Ubuntu)
set_fact:
dconf_theme: Yaru-purple-dark
dconf_icons: Yaru-purple-dark
when: ansible_distribution in ("Ubuntu")
# Make sure Gnome-Tweaks is installed
- name: Workstation | Account Management | Cinnamon | Install Dependencies
package:
name:
- "{{ gnome_tweaks }}"
- "{{ dconf_editor }}"
- "{{ psutil }}"
state: present
when: ansible_distribution not in ("NixOS")
# Apply dconf settings through RC files due to distros without working psutil.
# Use the command 'dconf watch /' then change settings to see find these values.
- name: Workstation | Account Management | Cinnamon | Settings
blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
# Disable Cinnamon Settings While Converting From GNOME
if [[ 1 == 0 ]]; then
## Temporary Variables + Functions ##
dconf_count=1
function inc_dconf() {
dconf_count=$(( dconf_count + 1 ))
}
## Dash to Dock ##
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position \
"'LEFT'" && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size \
24 && inc_dconf &&
dconf write /org/gnome/shell/favorite-apps \
"{{ gnome_favorites }}" && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/apply-custom-theme \
true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-shrink \
true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
false && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/intellihide-mode \
"'ALL_WINDOWS'" && inc_dconf &&
## Generic ##
dconf write /org/gnome/desktop/interface/color-scheme \
"'prefer-dark'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/gtk-theme \
"'{{ dconf_theme }}'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/icon-theme \
"'{{ dconf_icons }}'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-date \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-format \
"'24h'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-seconds \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-weekday \
true && inc_dconf &&
dconf write /org/gnome/desktop/calendar/show-weekdate \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/show-battery-percentage \
true && inc_dconf &&
dconf write /org/gnome/desktop/wm/preferences/button-layout \
"'appmenu:minimize,maximize,close'" && inc_dconf &&
dconf write /org/gnome/desktop/wm/preferences/num-workspaces \
1 && inc_dconf &&
dconf write /org/gnome/mutter/dynamic-workspaces \
false && inc_dconf &&
dconf write /org/gnome/mutter/edge-tiling \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/enable-hot-corners \
false && inc_dconf &&
dconf write /org/gnome/mutter/center-new-windows \
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-banners \
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable-sound-alerts \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable \
false && inc_dconf &&
# Stop Update Notifications
dconf write /org/gnome/software/allow-updates \
false && inc_dconf &&
dconf write /org/gnome/software/download-updates \
false && inc_dconf &&
dconf write /org/gnome/software/download-updates-notify \
false && inc_dconf &&
# Red Mode (Night Light)
(
typeset -l redmode
redmode="{{ redmode }}"
if [[ $redmode == "true" ]]; then
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled \
true && inc_dconf
fi
) &&
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-automatic \
false && inc_dconf &&
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
# 2.0 && inc_dconf &&
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
# 1.99 && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
19.00 && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
07.00 && inc_dconf &&
# 1700 is max through GNOME Settings, looks pretty red but can still see green vs blue.
# 1200 is max on f.lux type apps, pretty difficult to see the difference between green and blue.
# 0500 is the max on Red Moon, super intense on a laptop, not as much on a phone screen.
# - Basically makes everything like the dash of a Z31 300ZX, lol.
dconf write /org/gnome/settings-daemon/plugins/color/night-light-temperature \
"uint32 1700" && inc_dconf &&
## Keyboard Shortcuts ##
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding \
"'<Control><Alt>t'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command \
"'{{ dconf_terminal }}'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name \
"'Open Terminal'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding \
"'<Super>t'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command \
"'{{ dconf_terminal }}'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name \
"'Open Terminal 2'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings "
[ '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'
, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/'
]" && inc_dconf &&
## Privacy ##
dconf write /org/gnome/desktop/privacy/disable-camera \
true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/disable-microphone \
true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/recent-files-max-age \
7 && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remember-recent-files \
false && inc_dconf &&
dconf write /org/gnome/desktop/privacy/old-files-age \
"uint32 14" && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remove-old-trash-files \
true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remove-old-temp-files \
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-in-lock-screen \
false && inc_dconf &&
dconf write /org/gnome/desktop/screensaver/lock-enabled \
true && inc_dconf &&
dconf write /org/gnome/desktop/screensaver/lock-delay \
"uint32 0" && inc_dconf &&
dconf write /org/gnome/desktop/session/idle-delay \
"uint32 900" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type \
"'nothing'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/power/power-button-action \
"'nothing'" && inc_dconf &&
dconf write /org/gnome/desktop/media-handling/autorun-never \
true && inc_dconf &&
## Gnome Terminal ##
# TBD: Do not start new tabs in previous tab's directory.
# The profile ID is likely unique and will need to be retrieved first.
#/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/preserve-working-directory
#'never'
## Wellbeing ##
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-enabled \
true && inc_dconf &&
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-seconds \
"uint32 33333" && inc_dconf &&
dconf write /org/gnome/desktop/screen-time-limits/grayscale \
true && inc_dconf &&
dconf write /org/gnome/desktop/screen-time-limits/history-enabled \
true && inc_dconf &&
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
# "['eyesight', 'movement']" && inc_dconf &&
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
# "['movement']" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/selected-breaks \
"@as []" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/duration-seconds \
"uint32 180" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
"uint32 1800" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/countdown \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/delay-seconds \
"uint32 180" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/fade-screen \
true && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/notify \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-overdue \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-upcoming \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/play-sound \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
"uint32 1800" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/duration-seconds \
"uint32 180" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/interval-seconds \
"uint32 1800" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/countdown \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/delay-seconds \
"uint32 60" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/fade-screen \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/notify \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/notify-overdue \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/notify-upcoming \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/play-sound \
false && inc_dconf &&
## Success ##
sleep 0 ||
## Error Catch ##
echo "ERROR: DConf setting# $dconf_count failed!"
## Cleanup ##
unset -f inc_dconf
unset dconf_count
fi # End Disable Cinnamon Settings
marker: '# {mark} MANAGED BY ANSIBLE | Cinnamon Settings'
state: present
create: yes
backup: yes
become_user: "{{ user }}"
loop:
- .bashrc
- .zshrc
+198 -48
View File
@@ -21,6 +21,7 @@
, 'com.valvesoftware.Steam.desktop'
, 'net.lutris.Lutris.desktop'
, 'mullvad-vpn.desktop'
, 'network.loki.Session.desktop'
, 'org.signal.Signal.desktop', 'signal-desktop.desktop'
, 'org.telegram.desktop.desktop'
, 'com.discordapp.Discord.desktop'
@@ -172,6 +173,7 @@
# End block for Dash To Dock.
# Apply dconf settings through RC files due to distros without working psutil.
# Use the command 'dconf watch /' then change settings to see find these values.
- name: Workstation | Account Management | GNOME | Settings
blockinfile:
path: "{{ user_user.home }}/{{ item }}"
@@ -185,52 +187,111 @@
## Dash to Dock ##
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position "'LEFT'" && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size 24 && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position \
"'LEFT'" && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size \
24 && inc_dconf &&
dconf write /org/gnome/shell/favorite-apps "{{ gnome_favorites }}" && inc_dconf &&
dconf write /org/gnome/shell/favorite-apps \
"{{ gnome_favorites }}" && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/apply-custom-theme \
true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-shrink \
true && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
false && inc_dconf &&
dconf write /org/gnome/shell/extensions/dash-to-dock/intellihide-mode \
"'ALL_WINDOWS'" && inc_dconf &&
## Generic ##
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/gtk-theme "'{{ dconf_theme }}'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/icon-theme "'{{ dconf_icons }}'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/color-scheme \
"'prefer-dark'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/gtk-theme \
"'{{ dconf_theme }}'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/icon-theme \
"'{{ dconf_icons }}'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-date true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-format "'24h'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-seconds true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-weekday true && inc_dconf &&
dconf write /org/gnome/desktop/calendar/show-weekdate true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-date \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-format \
"'24h'" && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-seconds \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/clock-show-weekday \
true && inc_dconf &&
dconf write /org/gnome/desktop/calendar/show-weekdate \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/show-battery-percentage true && inc_dconf &&
dconf write /org/gnome/desktop/interface/show-battery-percentage \
true && inc_dconf &&
dconf write /org/gnome/desktop/wm/preferences/button-layout "'appmenu:minimize,maximize,close'" && inc_dconf &&
dconf write /org/gnome/desktop/wm/preferences/button-layout \
"'appmenu:minimize,maximize,close'" && inc_dconf &&
dconf write /org/gnome/desktop/wm/preferences/num-workspaces 1 && inc_dconf &&
dconf write /org/gnome/mutter/dynamic-workspaces false && inc_dconf &&
dconf write /org/gnome/desktop/wm/preferences/num-workspaces \
1 && inc_dconf &&
dconf write /org/gnome/mutter/dynamic-workspaces \
false && inc_dconf &&
dconf write /org/gnome/mutter/edge-tiling true && inc_dconf &&
dconf write /org/gnome/desktop/interface/enable-hot-corners false && inc_dconf &&
dconf write /org/gnome/mutter/edge-tiling \
true && inc_dconf &&
dconf write /org/gnome/desktop/interface/enable-hot-corners \
false && inc_dconf &&
dconf write /org/gnome/mutter/center-new-windows true && inc_dconf &&
dconf write /org/gnome/mutter/center-new-windows \
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-banners false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable-sound-alerts false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-banners \
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable-sound-alerts \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable \
false && inc_dconf &&
# Stop Update Notifications
dconf write /org/gnome/software/allow-updates \
false && inc_dconf &&
dconf write /org/gnome/software/download-updates \
false && inc_dconf &&
dconf write /org/gnome/software/download-updates-notify \
false && inc_dconf &&
# Red Mode (Night Light)
typeset -l redmode
redmode="{{ redmode }}"
if [[ $redmode == "true" ]]; then
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled true
fi
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-automatic false
dconf write /org/gnome/settings-daemon/plugins/color/night-light-temperature "uint32 3170"
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from 2.0
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to 1.99
(
typeset -l redmode
redmode="{{ redmode }}"
if [[ $redmode == "true" ]]; then
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled \
true && inc_dconf
fi
) &&
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-automatic \
false && inc_dconf &&
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
# 2.0 && inc_dconf &&
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
# 1.99 && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
19.00 && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
07.00 && inc_dconf &&
# 1700 is max through GNOME Settings, looks pretty red but can still see green vs blue.
# 1200 is max on f.lux type apps, pretty difficult to see the difference between green and blue.
# 0500 is the max on Red Moon, super intense on a laptop, not as much on a phone screen.
# - Basically makes everything like the dash of a Z31 300ZX, lol.
dconf write /org/gnome/settings-daemon/plugins/color/night-light-temperature \
"uint32 1700" && inc_dconf &&
## Keyboard Shortcuts ##
@@ -255,24 +316,38 @@
## Privacy ##
dconf write /org/gnome/desktop/privacy/disable-camera true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/disable-microphone true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/disable-camera \
true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/disable-microphone \
true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/recent-files-max-age 7 && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remember-recent-files false && inc_dconf &&
dconf write /org/gnome/desktop/privacy/recent-files-max-age \
7 && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remember-recent-files \
false && inc_dconf &&
dconf write /org/gnome/desktop/privacy/old-files-age "uint32 14" && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remove-old-trash-files true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remove-old-temp-files true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/old-files-age \
"uint32 14" && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remove-old-trash-files \
true && inc_dconf &&
dconf write /org/gnome/desktop/privacy/remove-old-temp-files \
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-in-lock-screen false && inc_dconf &&
dconf write /org/gnome/desktop/screensaver/lock-enabled true && inc_dconf &&
dconf write /org/gnome/desktop/screensaver/lock-delay "uint32 0" && inc_dconf &&
dconf write /org/gnome/desktop/session/idle-delay "uint32 900" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/power/power-button-action "'nothing'" && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-in-lock-screen \
false && inc_dconf &&
dconf write /org/gnome/desktop/screensaver/lock-enabled \
true && inc_dconf &&
dconf write /org/gnome/desktop/screensaver/lock-delay \
"uint32 0" && inc_dconf &&
dconf write /org/gnome/desktop/session/idle-delay \
"uint32 900" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type \
"'nothing'" && inc_dconf &&
dconf write /org/gnome/settings-daemon/plugins/power/power-button-action \
"'nothing'" && inc_dconf &&
dconf write /org/gnome/desktop/media-handling/autorun-never true && inc_dconf &&
dconf write /org/gnome/desktop/media-handling/autorun-never \
true && inc_dconf &&
## Gnome Terminal ##
@@ -281,6 +356,66 @@
#/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/preserve-working-directory
#'never'
## Wellbeing ##
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-enabled \
true && inc_dconf &&
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-seconds \
"uint32 33333" && inc_dconf &&
dconf write /org/gnome/desktop/screen-time-limits/grayscale \
true && inc_dconf &&
dconf write /org/gnome/desktop/screen-time-limits/history-enabled \
true && inc_dconf &&
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
# "['eyesight', 'movement']" && inc_dconf &&
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
# "['movement']" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/selected-breaks \
"@as []" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/duration-seconds \
"uint32 180" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
"uint32 1800" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/countdown \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/delay-seconds \
"uint32 180" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/fade-screen \
true && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/notify \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-overdue \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-upcoming \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/play-sound \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
"uint32 1800" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/duration-seconds \
"uint32 180" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/interval-seconds \
"uint32 1800" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/countdown \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/delay-seconds \
"uint32 60" && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/fade-screen \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/notify \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/notify-overdue \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/notify-upcoming \
false && inc_dconf &&
dconf write /org/gnome/desktop/break-reminders/movement/play-sound \
false && inc_dconf &&
## Success ##
sleep 0 ||
@@ -293,7 +428,7 @@
unset -f inc_dconf
unset dconf_count
marker: '# {mark} MANAGED BY ANSIBLE | NixOS GNOME Settings'
marker: '# {mark} MANAGED BY ANSIBLE | GNOME Settings'
state: present
create: yes
backup: yes
@@ -301,3 +436,18 @@
loop:
- .bashrc
- .zshrc
# Remove the dconf settings which had the marker related to NixOS.
- name: Workstation | Account Management | GNOME | Settings (NixOS)
blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
# TBD: No longer used. Remove in 2027.
marker: '# {mark} MANAGED BY ANSIBLE | NixOS GNOME Settings'
state: present
create: no
backup: no
become_user: "{{ user }}"
loop:
- .bashrc
- .zshrc
@@ -0,0 +1,22 @@
---
# Copy everything from PROJECT/files/templates/ to User's home.
- name: Workstation | Settings | Templates | Variables
set_fact:
user_templates: "{{ user_user.home }}/Templates"
- name: Workstation | Settings | Templates | Ensure Directory Exists
file:
path: "{{ user_templates }}"
state: directory
mode: '0755'
owner: "{{ user }}"
group: "{{ user }}"
- name: Workstation | Settings | Templates | Copy Files
copy:
src: 'templates/'
dest: "{{ user_templates }}/"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
@@ -0,0 +1,14 @@
---
# 2026-08-13 - Hyperling
# XDG desktop files are competing with runit and i3 config.
# Disable them on each run since updaters will put them back in place.
# Adding Hide=true supposedly works too but on Devuan the .desktop files
# are showing up as data files, not plaintext, so just nuking for now.
- name: Workstation | Shared | Settings | XDG Autostart | runit | Disable All
shell: "{{ item }}"
loop:
- mkdir -pv /etc/xdg/autostart/disabled /home/{{ user }}/.config/autostart/disabled
- mv /etc/xdg/autostart/*.desktop /etc/xdg/autostart/disabled/ || echo 'No files to move.'
- mv /home/{{ user }}/.config/autostart/*.desktop /home/{{ user }}/.config/autostart/disabled/ || echo 'No files to move.'
when: ansible_service_mgr == "runit"
+161
View File
@@ -0,0 +1,161 @@
---
# 20260716 - Hyperling
# Add the setup for a simple i3 configuration. It´s pretty easy to use and
# functions super well. Very easy to get going and does not need a whole lot of
# work to change things around. Good alternative to DWM and so lightweight that
# it doesn´t even matter if both are installed!!
- name: Workstation | Shared | Software | i3 | Facts 01
set_fact:
i3_config: "settings/i3.config"
i3_config_dir: "{{ user_user.home }}/.config/i3"
i3_package: i3
i3_light: light
i3_files: thunar
i3_term01: alacritty
i3_term02: kitty
i3_theming: lxappearance
i3_theme01: greybird-gtk-theme
i3_theme02: arc-theme
i3_theme03: numix-gtk-theme
i3_wallpaper: feh
i3_compositor: picom
i3_redshift: redshift
i3_redshift_gui: redshift-gtk
- name: Workstation | Shared | Software | i3 | Facts 02
set_fact:
i3_config_file: "{{ i3_config_dir }}/config"
- name: Workstation | Shared | Software | i3 | Facts | non-apt
set_fact:
i3_theme01: htop
i3_theme02: htop
i3_theme03: htop
i3_redshift_gui: redshift
when: ansible_pkg_mgr != "apt"
- name: Workstation | Shared | Software | i3 | Facts | yay
set_fact:
i3_yay_packages:
- greybird-gtk-theme
#- enlightenment-arc-theme
- numix-gtk-theme
when: ansible_pkg_mgr == "pacman"
#- name: Workstation | Shared | Software | i3 | Facts | TBD
# set_fact:
# i3_package: i3-wm
# when: ansible_distribution in ("TBD")
- name: Workstation | Shared | Software | i3 | Install
package:
name:
- "{{ i3_package }}"
- "{{ lightdm }}"
- "{{ i3_light }}"
- "{{ i3_files }}"
- "{{ i3_term01 }}"
- "{{ i3_term02 }}"
- "{{ i3_theming }}"
- "{{ i3_theme01 }}"
- "{{ i3_theme02 }}"
- "{{ i3_theme03 }}"
- "{{ i3_wallpaper }}"
- "{{ i3_compositor }}"
- "{{ i3_redshift }}"
- "{{ i3_redshift_gui }}"
state: present
update_cache: yes
- name: Workstation | Shared | Software | i3 | Install (yay)
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop: "{{ i3_yay_packages }}"
when: ansible_pkg_mgr == "pacman"
become_user: "{{ aur_user }}"
ignore_errors: true
- name: Workstation | Shared | Software | i3 | Config | Create Dir
file:
path: "{{ i3_config_dir }}"
state: directory
mode: '0755'
owner: "{{ user }}"
group: "{{ user }}"
- name: Workstation | Shared | Software | i3 | Config | Copy File
copy:
src: "{{ i3_config }}"
dest: "{{ i3_config_file }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0664'
# TBD: Automate getting the brightness keys to work.
#
# User is already part of the video group. Just need to configure udev rules.
#
# Get the folder name from here: `ls /sys/class/backlight/`
#
# That is your <DEVICE> for the following lines, which go here: /etc/udev/rules.d/backlight.rules
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<DEVICE>", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<DEVICE>", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
#
# So, for example:
# [18:12:20 root@device ~]# cat /etc/udev/rules.d/backlight.rules
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
# [18:12:21 root@device ~]#
#
# It then required a reboot. Doing the commands below was not enough.
#
# # sudo udevadm control --reload-rules
# # sudo udevadm trigger
#
- name: Workstation | Shared | Software | i3 | Light (Linux Only)
block:
- name: Workstation | Shared | Software | i3 | Light | Check Backlights
find:
paths: /sys/class/backlight
file_type: any # Options: file, directory, any
patterns: "*" # Wildcard patterns (e.g., "*.log")
recurse: no # Set to 'yes' for subdirectories
register: i3_light_device_check
ignore_errors: yes
#- name: Display var _ DELETEME
# debug:
# msg: "{{ i3_light_device_check }}"
- name: Workstation | Shared | Software | i3 | Light | Pull Backlight Name
set_fact:
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
ignore_errors: yes
#- name: Display var - DELETEME
# debug:
# msg: "{{ i3_light_device_name }}"
- name: Workstation | Shared | Software | i3 | Light | udev Rules | Create
copy:
dest: /etc/udev/rules.d/backlight.rules
content: |
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
owner: root
group: root
mode: '0644'
ignore_errors: yes
- name: Workstation | Shared | Software | i3 | Light | udev Rules | Reload
command: "{{ item }}"
loop:
- udevadm control --reload-rules
- udevadm trigger
when: ansible_system == "Linux"
#- name: FAIL - DELETEME
# meta: end_play