Compare commits
10 Commits
07813d80b6
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d16dac3d49 | ||
![]() |
db293c606a | ||
![]() |
e3d1957341 | ||
![]() |
48f3910ad7 | ||
![]() |
54d74a083e | ||
![]() |
8dd8d8d91d | ||
![]() |
a8d7c643ca | ||
![]() |
1867dd7b25 | ||
![]() |
6323393963 | ||
![]() |
4105f50aa7 |
3
group_vars/all.yml
Normal file
3
group_vars/all.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
username: "mike"
|
||||
|
||||
src_dir: "/usr/local/src"
|
7
main.yml
Normal file
7
main.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
roles:
|
||||
- dmenu
|
||||
- mpv
|
||||
- arkenfox
|
||||
- dwm
|
1
requirements.yml
Normal file
1
requirements.yml
Normal file
@@ -0,0 +1 @@
|
||||
- name: make
|
@@ -1,9 +1,23 @@
|
||||
// RFP
|
||||
user_pref("privacy.resistFingerprinting", true);
|
||||
user_pref("privacy.resistFingerprinting.letterboxing", true)
|
||||
user_pref("privacy.resistFingerprinting.letterboxing", true);
|
||||
|
||||
// DNS
|
||||
user_pref("network.trr.mode", 0); // Disable DoH to use network resolver
|
||||
user_pref("network.trr.mode", 5); // Disable DoH to use network resolver
|
||||
|
||||
user_pref("signon.rememberSignons", false); // Do not prompt to save password
|
||||
|
||||
// [SETTING] Privacy & Security>Forms and Autofill>Autofill addresses
|
||||
user_pref("extensions.formautofill.addresses.enabled", false); // [FF55+]
|
||||
user_pref("extensions.formautofill.creditCards.enabled", false); // [FF56+]
|
||||
|
||||
// 0401: disable SB (Safe Browsing)
|
||||
// SB makes connections to Google
|
||||
user_pref("browser.safebrowsing.malware.enabled", false);
|
||||
user_pref("browser.safebrowsing.phishing.enabled", false);
|
||||
// 0402: disable SB checks for downloads (both local lookups + remote)
|
||||
user_pref("browser.safebrowsing.downloads.enabled", false);
|
||||
// 0404: disable SB checks for unwanted software
|
||||
user_pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
|
||||
user_pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
- name: Get path of default firefox profile
|
||||
ansible.builtin.find:
|
||||
paths: "/home/mike/.mozilla/firefox"
|
||||
paths: "~/.mozilla/firefox"
|
||||
file_type: directory
|
||||
patterns: "*default-release"
|
||||
register: profile_dir
|
||||
@@ -31,18 +31,20 @@
|
||||
ansible.builtin.copy:
|
||||
src: prefsCleaner.sh
|
||||
dest: "{{ profile_dir.files[0].path }}"
|
||||
mode: "0774"
|
||||
|
||||
- name: Install updater.sh
|
||||
ansible.builtin.copy:
|
||||
src: updater.sh
|
||||
dest: "{{ profile_dir.files[0].path }}"
|
||||
mode: "0774"
|
||||
|
||||
- name: Run Updater
|
||||
ansible.builtin.script:
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ profile_dir.files[0].path }}"
|
||||
cmd: "updater.sh -s"
|
||||
cmd: "./updater.sh -s"
|
||||
|
||||
- name: Run prefsCleaner
|
||||
ansible.builtin.script:
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ profile_dir.files[0].path }}"
|
||||
cmd: "{{ profile_dir.files[0].path }}/prefsCleaner.sh -s"
|
||||
cmd: "./prefsCleaner.sh -s"
|
||||
|
1620
roles/dmenu/files/emoji
Normal file
1620
roles/dmenu/files/emoji
Normal file
File diff suppressed because it is too large
Load Diff
16
roles/dmenu/files/scripts/dmenuunicode
Executable file
16
roles/dmenu/files/scripts/dmenuunicode
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Get user selection via dmenu from emoji file.
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/chars/emoji | dmenu -l 15 | sed "s/ .*//")
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
# If you run this command with an argument, it will automatically insert the
|
||||
# character. Otherwise, show a message that the emoji has been copied.
|
||||
if [ -n "$1" ]; then
|
||||
xdotool type "$chosen"
|
||||
else
|
||||
printf "%s" "$chosen" | xclip -selection clipboard
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
24
roles/dmenu/tasks/main.yml
Normal file
24
roles/dmenu/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- name: Clone source code from gitea
|
||||
ansible.builtin.git:
|
||||
repo: "https://git.mjwilson.org/mike/{{ role_name }}"
|
||||
dest: "{{ src_dir }}/{{ role_name }}"
|
||||
|
||||
- name: Run build
|
||||
community.general.make:
|
||||
chdir: "{{ src_dir }}/{{ role_name }}"
|
||||
target: install
|
||||
params:
|
||||
clean:
|
||||
become: true
|
||||
|
||||
- name: Install scripts
|
||||
ansible.builtin.copy:
|
||||
src: scripts/
|
||||
dest: "~/.local/bin/"
|
||||
mode: 0774
|
||||
|
||||
- name: Install supplementary files
|
||||
ansible.builtin.copy:
|
||||
src: emoji
|
||||
dest: "~/.local/share/chars/"
|
||||
mode: 0664
|
10
roles/dwm/tasks/main.yml
Normal file
10
roles/dwm/tasks/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: Pull down dwm build from gitea
|
||||
ansible.builtin.git:
|
||||
repo: "https://git.mjwilson.org/mike/dwm"
|
||||
dest: "{{ src_dir }}/dwm"
|
||||
|
||||
- name: Build DWM
|
||||
community.general.make:
|
||||
chdir: "{{ src_dir }}/dwm"
|
||||
params:
|
||||
clean:
|
143
roles/mpv/files/mpv.conf
Normal file
143
roles/mpv/files/mpv.conf
Normal file
@@ -0,0 +1,143 @@
|
||||
#
|
||||
# Example mpv configuration file
|
||||
#
|
||||
# Warning:
|
||||
#
|
||||
# The commented example options usually do _not_ set the default values. Call
|
||||
# mpv with --list-options to see the default values for most options. There is
|
||||
# no builtin or example mpv.conf with all the defaults.
|
||||
#
|
||||
#
|
||||
# Configuration files are read system-wide from /etc/mpv or /usr/local/etc/mpv,
|
||||
# and per-user from ~/.config/mpv, where per-user settings override
|
||||
# system-wide settings, all of which are overridden by the command line.
|
||||
#
|
||||
# Configuration file settings and the command line options use the same
|
||||
# underlying mechanisms. Most options can be put into the configuration file
|
||||
# by dropping the preceding '--'. See the man page for a complete list of
|
||||
# options.
|
||||
#
|
||||
# Lines starting with '#' are comments and are ignored.
|
||||
#
|
||||
# See the CONFIGURATION FILES section in the man page
|
||||
# for a detailed description of the syntax.
|
||||
#
|
||||
# Profiles should be placed at the bottom of the configuration file to ensure
|
||||
# that settings wanted as defaults are not restricted to specific profiles.
|
||||
|
||||
##################
|
||||
# video settings #
|
||||
##################
|
||||
|
||||
# Start in fullscreen mode by default.
|
||||
#fs=yes
|
||||
|
||||
# force starting with centered window
|
||||
#geometry=50%:50%
|
||||
|
||||
# don't allow a new window to have a size larger than 90% of the screen size
|
||||
#autofit-larger=90%x90%
|
||||
|
||||
# Do not close the window on exit.
|
||||
#keep-open=yes
|
||||
|
||||
# Do not wait with showing the video window until it has loaded. (This will
|
||||
# resize the window once video is loaded. Also always shows a window with
|
||||
# audio.)
|
||||
#force-window=immediate
|
||||
|
||||
# Disable the On Screen Controller (OSC).
|
||||
#osc=no
|
||||
|
||||
# Keep the player window on top of all other windows.
|
||||
#ontop=yes
|
||||
|
||||
# Specify fast video rendering preset (for --vo=<gpu|gpu-next> only)
|
||||
# Recommended for mobile devices or older hardware with limited processing power
|
||||
#profile=fast
|
||||
|
||||
# Specify high quality video rendering preset (for --vo=<gpu|gpu-next> only)
|
||||
# Offers superior image fidelity and visual quality for an enhanced viewing
|
||||
# experience on capable hardware
|
||||
#profile=high-quality
|
||||
|
||||
# Force video to lock on the display's refresh rate, and change video and audio
|
||||
# speed to some degree to ensure synchronous playback - can cause problems
|
||||
# with some drivers and desktop environments.
|
||||
#video-sync=display-resample
|
||||
|
||||
# Enable hardware decoding if available. Often, this does not work with all
|
||||
# video outputs, but should work well with default settings on most systems.
|
||||
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
|
||||
# may or may not help.
|
||||
#hwdec=auto
|
||||
|
||||
##################
|
||||
# audio settings #
|
||||
##################
|
||||
|
||||
# Specify default audio device. You can list devices with: --audio-device=help
|
||||
# The option takes the device string (the stuff between the '...').
|
||||
#audio-device=alsa/default
|
||||
|
||||
# Do not filter audio to keep pitch when changing playback speed.
|
||||
#audio-pitch-correction=no
|
||||
|
||||
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
|
||||
#audio-channels=5.1
|
||||
# Disable any automatic remix, _if_ the audio output accepts the audio format.
|
||||
# of the currently played file. See caveats mentioned in the manpage.
|
||||
# (The default is "auto-safe", see manpage.)
|
||||
#audio-channels=auto
|
||||
|
||||
##################
|
||||
# other settings #
|
||||
##################
|
||||
|
||||
# Pretend to be a web browser. Might fix playback with some streaming sites,
|
||||
# but also will break with shoutcast streams.
|
||||
#user-agent="Mozilla/5.0"
|
||||
|
||||
# cache settings
|
||||
#
|
||||
# Use a large seekable RAM cache even for local input.
|
||||
#cache=yes
|
||||
#
|
||||
# Use extra large RAM cache (needs cache=yes to make it useful).
|
||||
#demuxer-max-bytes=500M
|
||||
#demuxer-max-back-bytes=100M
|
||||
#
|
||||
# Disable the behavior that the player will pause if the cache goes below a
|
||||
# certain fill size.
|
||||
#cache-pause=no
|
||||
#
|
||||
# Store cache payload on the hard disk instead of in RAM. (This may negatively
|
||||
# impact performance unless used for slow input such as network.)
|
||||
#cache-dir=~/.cache/
|
||||
#cache-on-disk=yes
|
||||
|
||||
# Display English subtitles if available.
|
||||
#slang=en
|
||||
|
||||
# Play Finnish audio if available, fall back to English otherwise.
|
||||
#alang=fi,en
|
||||
|
||||
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
|
||||
# If the file seems to be valid UTF-8, prefer UTF-8.
|
||||
# (You can add '+' in front of the codepage to force it.)
|
||||
#sub-codepage=cp1256
|
||||
|
||||
# You can also include other configuration files.
|
||||
#include=/path/to/the/file/you/want/to/include
|
||||
|
||||
############
|
||||
# Profiles #
|
||||
############
|
||||
|
||||
# The options declared as part of profiles override global default settings,
|
||||
# but only take effect when the profile is active.
|
||||
|
||||
# The following profile can be enabled on the command line with: --profile=eye-cancer
|
||||
|
||||
#[eye-cancer]
|
||||
#sharpen=5
|
78
roles/mpv/files/scripts/ytdlautoformat.lua
Normal file
78
roles/mpv/files/scripts/ytdlautoformat.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
--[[
|
||||
|
||||
A simple mpv script to automatically change ytdl-format (yt-dlp)
|
||||
for specified domains/streams.
|
||||
|
||||
Info: https://github.com/Samillion/mpv-ytdlautoformat
|
||||
|
||||
--]]
|
||||
|
||||
local options = {
|
||||
-- Which domains should ytdl-format change on?
|
||||
domains = {
|
||||
"youtu.be", "youtube.com", "www.youtube.com",
|
||||
"twitch.tv", "www.twitch.tv",
|
||||
},
|
||||
|
||||
-- Set maximum video quality (on load/start)
|
||||
-- 240, 360, 480, 720, 1080, 1440, 2160, 4320
|
||||
-- use 0 to ignore quality
|
||||
quality = 720,
|
||||
|
||||
-- Prefered codec. avc, hevc, vp9, av1 or novp9
|
||||
-- novp9: accept any codec except vp9
|
||||
codec = "novp9",
|
||||
|
||||
-- rare: to avoid mpv shutting down if nothing is found with the specified format
|
||||
-- if true, and format not found, it'll use fallback_format
|
||||
fallback = true,
|
||||
fallback_format = "bv+ba/b",
|
||||
}
|
||||
|
||||
-- Do not edit beyond this point
|
||||
local msg = require "mp.msg"
|
||||
|
||||
local function create_set(list)
|
||||
local set = {}
|
||||
for _, v in pairs(list) do
|
||||
set[type(v) == "string" and v:lower() or v] = true
|
||||
end
|
||||
return set
|
||||
end
|
||||
|
||||
local function update_ytdl_format()
|
||||
local codec_list = {
|
||||
["avc"] = "[vcodec~='^(avc|h264)']",
|
||||
["hevc"] = "[vcodec~='^(hevc|h265)']",
|
||||
["vp9"] = "[vcodec~='^(vp0?9)']",
|
||||
["av1"] = "[vcodec~='^(av01)']",
|
||||
["novp9"] = "[vcodec!~='^(vp0?9)']",
|
||||
}
|
||||
|
||||
local format = {
|
||||
quality = options.quality > 0 and "[height<=?" .. options.quality .. "]" or "",
|
||||
codec = codec_list[options.codec:lower()] or "",
|
||||
fallback = options.fallback and " / " .. options.fallback_format or "",
|
||||
}
|
||||
|
||||
local ytdl_custom = "bv" .. format.quality .. format.codec .. "+ba/b" .. format.quality .. format.fallback
|
||||
|
||||
mp.set_property("file-local-options/ytdl-format", ytdl_custom)
|
||||
msg.info("Changed ytdl-format to: " .. ytdl_custom)
|
||||
end
|
||||
|
||||
local list = create_set(options.domains)
|
||||
|
||||
mp.add_hook("on_load", 9, function()
|
||||
local path = mp.get_property("path", "")
|
||||
|
||||
if path:match("^%a+://") then
|
||||
local hostname = path:lower():match("^%a+://([^/]+)/?") or ""
|
||||
local domain = hostname:match("([%w%-]+%.%w+%.%w+)$") or hostname:match("([%w%-]+%.%w+)$") or ""
|
||||
|
||||
if list[domain] then
|
||||
msg.info("Domain match found: " .. domain)
|
||||
update_ytdl_format()
|
||||
end
|
||||
end
|
||||
end)
|
15
roles/mpv/tasks/main.yml
Normal file
15
roles/mpv/tasks/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
- name: Install mpv
|
||||
ansible.builtin.package:
|
||||
name: mpv
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install mpv.conf
|
||||
ansible.builtin.copy:
|
||||
src: mpv.conf
|
||||
dest: "~/.config/mpv/"
|
||||
|
||||
- name: Install scripts
|
||||
ansible.builtin.copy:
|
||||
src: scripts
|
||||
dest: "~/.config/mpv/"
|
19
roles/sxhkd/files/sxhkdrc
Normal file
19
roles/sxhkd/files/sxhkdrc
Normal file
@@ -0,0 +1,19 @@
|
||||
# Launch Firefox
|
||||
super + w
|
||||
firefox
|
||||
|
||||
# Capture entire screen and save to clipboard
|
||||
Print
|
||||
scrot -m - | xclip -selection clipboard -target image/png
|
||||
|
||||
# Capture selection and save to clipboard
|
||||
shift + Print
|
||||
scrot -s - | xclip -selection clipboard -target image/png
|
||||
|
||||
# Launch Alacritty
|
||||
super + shift + Return
|
||||
alacritty
|
||||
|
||||
# Emoji Picker
|
||||
super + grave
|
||||
~/.local/bin/dmenuunicode
|
10
roles/sxhkd/tasks/main.yml
Normal file
10
roles/sxhkd/tasks/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: Install package
|
||||
ansible.builtin.package:
|
||||
name: "{{ role_name }}"
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install config file
|
||||
ansible.builtin.copy:
|
||||
src: sxhkdrc
|
||||
dest: "/home/{{ username }}/.config/sxhkd"
|
Reference in New Issue
Block a user