Lots of changes
This commit is contained in:
parent
cd8b03946b
commit
4341d18fb1
24 changed files with 98 additions and 509 deletions
|
@ -229,4 +229,3 @@ profiles:
|
|||
localhost:
|
||||
include:
|
||||
- Terminal
|
||||
- Pacman
|
||||
|
|
131
config-root.yaml
131
config-root.yaml
|
@ -21,7 +21,7 @@ dotfiles:
|
|||
src: usr/local/bin
|
||||
d_networkd:
|
||||
actions:
|
||||
- chmod-wireguard
|
||||
- chmod-wireguard
|
||||
src: etc/systemd/network
|
||||
dst: /etc/systemd/network
|
||||
f_99-sysctl.conf:
|
||||
|
@ -45,9 +45,6 @@ dotfiles:
|
|||
f_iwd@.service:
|
||||
dst: /etc/systemd/system/iwd@.service
|
||||
src: etc/systemd/system/iwd@.service
|
||||
f_loader.conf:
|
||||
dst: /boot/loader/loader.conf
|
||||
src: boot/loader/loader.conf
|
||||
f_fonts.conf:
|
||||
dst: /etc/fonts/local.conf
|
||||
src: etc/fonts/local.conf
|
||||
|
@ -66,9 +63,6 @@ dotfiles:
|
|||
f_pacman.conf:
|
||||
dst: /etc/pacman.conf
|
||||
src: etc/pacman.conf
|
||||
f_pacserve.service.conf:
|
||||
dst: /etc/pacserve/pacserve.service.conf
|
||||
src: etc/pacserve/pacserve.service.conf
|
||||
f_sshd_config:
|
||||
dst: /etc/ssh/sshd_config
|
||||
src: etc/ssh/sshd_config
|
||||
|
@ -96,21 +90,6 @@ dotfiles:
|
|||
f_ignore:
|
||||
src: .ignore
|
||||
dst: /.ignore
|
||||
f_pacman-dl.service:
|
||||
src: etc/systemd/system/pacman-dl.service
|
||||
dst: /etc/systemd/system/pacman-dl.service
|
||||
f_pacman-dl.timer:
|
||||
src: etc/systemd/system/pacman-dl.timer
|
||||
dst: /etc/systemd/system/pacman-dl.timer
|
||||
f_zsh.hook:
|
||||
src: etc/pacman.d/hooks/zsh.hook
|
||||
dst: /etc/pacman.d/hooks/zsh.hook
|
||||
f_nightly-reboot.service:
|
||||
src: etc/systemd/system/nightly-reboot.service
|
||||
dst: /etc/systemd/system/nightly-reboot.service
|
||||
f_nightly-reboot.timer:
|
||||
src: etc/systemd/system/nightly-reboot.timer
|
||||
dst: /etc/systemd/system/nightly-reboot.timer
|
||||
f_mkinitcpio.conf:
|
||||
src: etc/mkinitcpio.conf
|
||||
dst: /etc/mkinitcpio.conf
|
||||
|
@ -141,70 +120,76 @@ dotfiles:
|
|||
f_cpupower:
|
||||
src: etc/default/cpupower
|
||||
dst: /etc/default/cpupower
|
||||
f_arch.conf:
|
||||
src: boot/loader/entries/arch.conf
|
||||
dst: /boot/loader/entries/arch.conf
|
||||
f_arch-lts.conf:
|
||||
src: boot/loader/entries/arch-lts.conf
|
||||
dst: /boot/loader/entries/arch-lts.conf
|
||||
f_kodi.conf:
|
||||
src: boot/loader/entries/kodi.conf
|
||||
dst: /boot/loader/entries/kodi.conf
|
||||
profiles:
|
||||
Locale:
|
||||
dotfiles:
|
||||
- f_locale.conf
|
||||
- f_locale.gen
|
||||
- f_locale.conf
|
||||
- f_locale.gen
|
||||
Pacman:
|
||||
dotfiles:
|
||||
- f_pacman.conf
|
||||
- f_pacserve.service.conf
|
||||
- f_pacman-dl.service
|
||||
- f_pacman-dl.timer
|
||||
- f_pacman.conf
|
||||
Mirkwood:
|
||||
dotfiles:
|
||||
- f_getty.conf
|
||||
- f_cryptissue
|
||||
- f_welcomemessage.conf
|
||||
- d_bin
|
||||
- d_networkd
|
||||
- f_adb.service
|
||||
- f_bluetooth.conf
|
||||
- f_iwd@.service
|
||||
- f_sshd_config
|
||||
- f_logind.conf
|
||||
- f_60-uinput-permissions.rules
|
||||
- f_freetype2.sh
|
||||
- f_fonts.conf
|
||||
- f_timesyncd.conf
|
||||
- f_99-sysctl.conf
|
||||
- f_99-lowbat.rules
|
||||
- f_ignore
|
||||
- f_zsh.hook
|
||||
- f_mkinitcpio.conf
|
||||
- f_vconsole.conf
|
||||
- f_20-quiet-printk.conf
|
||||
- f_system.conf
|
||||
- f_cpupower
|
||||
- f_getty.conf
|
||||
- f_cryptissue
|
||||
- f_welcomemessage.conf
|
||||
- d_bin
|
||||
- d_networkd
|
||||
- f_adb.service
|
||||
- f_bluetooth.conf
|
||||
- f_iwd@.service
|
||||
- f_sshd_config
|
||||
- f_logind.conf
|
||||
- f_60-uinput-permissions.rules
|
||||
- f_freetype2.sh
|
||||
- f_fonts.conf
|
||||
- f_timesyncd.conf
|
||||
- f_99-sysctl.conf
|
||||
- f_99-lowbat.rules
|
||||
- f_ignore
|
||||
- f_mkinitcpio.conf
|
||||
- f_vconsole.conf
|
||||
- f_20-quiet-printk.conf
|
||||
- f_system.conf
|
||||
- f_cpupower
|
||||
- f_arch.conf
|
||||
- f_arch-lts.conf
|
||||
- f_kodi.conf
|
||||
include:
|
||||
- Locale
|
||||
- Pacman
|
||||
- Locale
|
||||
- Pacman
|
||||
Rivendell:
|
||||
include:
|
||||
- Locale
|
||||
- Pacman
|
||||
- Locale
|
||||
- Pacman
|
||||
dotfiles:
|
||||
- f_getty.conf
|
||||
- f_vconsole.conf
|
||||
- f_mkinitcpio.conf
|
||||
- f_bluetooth.conf
|
||||
- f_60-uinput-permissions.rules
|
||||
- f_sshd_config
|
||||
- f_nightly-reboot.service
|
||||
- f_nightly-reboot.timer
|
||||
- f_getty.conf
|
||||
- f_vconsole.conf
|
||||
- f_mkinitcpio.conf
|
||||
- f_bluetooth.conf
|
||||
- f_60-uinput-permissions.rules
|
||||
- f_sshd_config
|
||||
Moria:
|
||||
include:
|
||||
- Locale
|
||||
- Pacman
|
||||
- Locale
|
||||
- Pacman
|
||||
dotfiles:
|
||||
- f_sshd_config
|
||||
- f_99-sysctl.conf
|
||||
- f_ipmi-static.service
|
||||
- f_ipmi-temp.service
|
||||
- f_ipmi-temp.timer
|
||||
- f_ipmi-fans.service
|
||||
- f_ipmi-fans.timer
|
||||
- f_sshd_config
|
||||
- f_99-sysctl.conf
|
||||
- f_ipmi-static.service
|
||||
- f_ipmi-temp.service
|
||||
- f_ipmi-temp.timer
|
||||
- f_ipmi-fans.service
|
||||
- f_ipmi-fans.timer
|
||||
localhost:
|
||||
include:
|
||||
- Locale
|
||||
- Locale
|
||||
|
|
|
@ -4,3 +4,4 @@ border-color=#D65D0E
|
|||
icons=1
|
||||
default-timeout=5000
|
||||
max-visible=6
|
||||
layer=overlay
|
||||
|
|
|
@ -11,5 +11,6 @@ for_window [urgent="latest"] focus
|
|||
# Gimp export window
|
||||
for_window [title="Export Image*"] floating enable
|
||||
for_window [app_id="fzf-launcher"] focus, floating enabled, border pixel 1
|
||||
for_window [title="Mullvad VPN"] floating disable
|
||||
for_window [app_id="firefox" title="^Extension: \(PassFF\)"] floating enable
|
||||
for_window [title="About Firefox Nightly"] floating enable
|
||||
for_window [title="About Mozilla Firefox"] floating enable
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# vim:ft=i3config
|
||||
|
||||
default_border none
|
||||
gaps inner 10
|
||||
gaps outer 20
|
||||
gaps inner 15
|
||||
gaps outer 15
|
||||
|
||||
# Hide cursor after 4 seconds of inactivity
|
||||
seat * hide_cursor 4000
|
||||
|
|
|
@ -9,7 +9,7 @@ exec {
|
|||
kdeconnect-indicator
|
||||
thunderbird
|
||||
mako
|
||||
wl-paste -t text --watch clipman store
|
||||
wl-paste -t text --watch clipman store 1>> ~/.log/clipman 2>&1 &
|
||||
mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
gnome-keyring-daemon --start --components=secrets
|
||||
|
|
6
home/.config/systemd/user/trash-empty.service
Normal file
6
home/.config/systemd/user/trash-empty.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Removes files older than a week from trash can
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/trash-empty 7
|
9
home/.config/systemd/user/trash-empty.timer
Normal file
9
home/.config/systemd/user/trash-empty.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Runs trash-empty.service every hour
|
||||
|
||||
[Timer]
|
||||
OnUnitActiveSec=1h
|
||||
Unit=trash-empty.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -1,5 +1,5 @@
|
|||
title Arch Linux
|
||||
linux /vmlinuz-linux-lts
|
||||
initrd /amd-ucode.img
|
||||
initrd /initramfs-linux-lts.img
|
||||
options cryptdevice=/dev/disk/by-uuid/2fedee0d-fbf1-41ee-8d27-01feb25d9e8d:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=__arch/root resume=/dev/mapper/cryptswap quiet acpi_backlight=vendor rw
|
||||
title Arch Linux (LTS)
|
||||
initrd /amd-ucode.img
|
||||
initrd /initramfs-linux-lts.img
|
||||
linux /vmlinuz-linux-lts
|
||||
options rd.luks.uuid=19fa8fab-c5fe-454a-9a17-b7185ce975ea rd.luks.name=19fa8fab-c5fe-454a-9a17-b7185ce975ea=cryptroot rd.luks.options=allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root resume=/dev/mapper/cryptroot resume_offset=7345408 rw quiet splash vga=current idle=nomwait
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
title Arch Linux
|
||||
linux /vmlinuz-linux
|
||||
initrd /amd-ucode.img
|
||||
initrd /initramfs-linux.img
|
||||
options cryptdevice=/dev/disk/by-uuid/2fedee0d-fbf1-41ee-8d27-01feb25d9e8d:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=__arch/root resume=/dev/mapper/cryptswap cpuidle.governor=teo acpi_backlight=vendor amd_iommu=on iommu=pt rw idle=nomwait rcu_nocbs=0-7 quiet fastboot
|
||||
title Arch Linux
|
||||
initrd /amd-ucode.img
|
||||
initrd /initramfs-linux.img
|
||||
linux /vmlinuz-linux
|
||||
options rd.luks.uuid=19fa8fab-c5fe-454a-9a17-b7185ce975ea rd.luks.name=19fa8fab-c5fe-454a-9a17-b7185ce975ea=cryptroot rd.luks.options=allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root resume=/dev/mapper/cryptroot resume_offset=7345408 rw vga=current idle=nomwait
|
||||
|
|
5
root/boot/loader/entries/kodi.conf
Executable file
5
root/boot/loader/entries/kodi.conf
Executable file
|
@ -0,0 +1,5 @@
|
|||
title Kodi
|
||||
initrd /amd-ucode.img
|
||||
initrd /initramfs-linux.img
|
||||
linux /vmlinuz-linux
|
||||
options rd.luks.uuid=19fa8fab-c5fe-454a-9a17-b7185ce975ea rd.luks.name=19fa8fab-c5fe-454a-9a17-b7185ce975ea=cryptroot rd.luks.options=allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root resume=/dev/mapper/cryptroot resume_offset=7345408 rw quiet splash vga=current idle=nomwait video=eDP-1:d
|
|
@ -1,3 +0,0 @@
|
|||
default arch
|
||||
timeout 0
|
||||
editor 1
|
|
@ -1,8 +1,9 @@
|
|||
MODULES=(amdgpu)
|
||||
BINARIES=()
|
||||
FILES=()
|
||||
{%@@ if profile == "Mirkwood" @@%}
|
||||
HOOKS=(base udev autodetect modconf block filesystems keyboard colors consolefont welcomemessage encrypt resume fsck)
|
||||
{%@@ elif profile == "Rivendell" @@%}
|
||||
BINARIES=("/usr/bin/btrfs")
|
||||
HOOKS=(base autodetect modconf block filesystems keyboard fsck systemd sd-welcomemessage sd-encrypt)
|
||||
{%@@ else @@%}
|
||||
BINARIES=()
|
||||
HOOKS=(colors consolefont base udev autodetect modconf block filesystems keyboard fsck)
|
||||
{%@@ endif @@%}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[Unit]
|
||||
Description=Nightly reboot
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/systemctl reboot
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=Reboot Scheduling.
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 03:00:00
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=Download package updates
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/pacman -Syuw --noconfirm
|
||||
|
||||
[Install]
|
||||
WantedBy=network-online.target
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=Download packages hourly
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -1 +0,0 @@
|
|||
GTK_THEME=Adwaita /usr/bin/audacity $@
|
|
@ -1,373 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Author : Pavan Jadhaw
|
||||
# Github Profile : https://github.com/pavanjadhaw
|
||||
# Project Repository : https://github.com/pavanjadhaw/betterlockscreen
|
||||
|
||||
|
||||
# create folder in ~/.cache/i3lock directory
|
||||
folder="$HOME/.cache/i3lock"
|
||||
|
||||
# ratio for rectangle to be drawn for time background on lockscreen
|
||||
# Original Image
|
||||
orig_wall="$folder/wall.png"
|
||||
|
||||
# Versions (from here)
|
||||
# You can use these images to set different versions as wallpaper
|
||||
# lockscreen background.
|
||||
resized="$folder/resized.png" # resized image for your resolution
|
||||
|
||||
# images to be used as wallpaper
|
||||
dim="$folder/dim.png" # image with subtle overlay of black
|
||||
blur="$folder/blur.png" # blurred version
|
||||
dimblur="$folder/dimblur.png"
|
||||
|
||||
# lockscreen images (images to be used as lockscreen background)
|
||||
l_resized="$folder/l_resized.png"
|
||||
l_dim="$folder/l_dim.png"
|
||||
l_blur="$folder/l_blur.png"
|
||||
l_dimblur="$folder/l_dimblur.png"
|
||||
|
||||
|
||||
prelock() {
|
||||
pkill -u "$USER" -USR1 dunst
|
||||
}
|
||||
|
||||
lock() {
|
||||
#$1 image path
|
||||
letterEnteredColor=d23c3dff
|
||||
letterRemovedColor=d23c3dff
|
||||
passwordCorrect=00000000
|
||||
passwordIncorrect=d23c3dff
|
||||
background=00000000
|
||||
foreground=ffffffff
|
||||
i3lock \
|
||||
-n \
|
||||
--timestr="%H:%M" \
|
||||
-t -i "$1" \
|
||||
--timepos="110:h-70" \
|
||||
--datepos="135:h-45" \
|
||||
--clock --datestr "Type password to unlock" \
|
||||
--insidecolor=$background --ringcolor=$foreground --line-uses-inside \
|
||||
--keyhlcolor=$letterEnteredColor --bshlcolor=$letterRemovedColor --separatorcolor=$background \
|
||||
--insidevercolor=$passwordCorrect --insidewrongcolor=$passwordIncorrect \
|
||||
--ringvercolor=$foreground --ringwrongcolor=$foreground --indpos="x+280:h-70" \
|
||||
--radius=20 --ring-width=4 --veriftext="" --wrongtext="" \
|
||||
--verifcolor="$foreground" --timecolor="$foreground" --datecolor="$foreground" \
|
||||
--noinputtext="" \
|
||||
--force-clock
|
||||
}
|
||||
|
||||
postlock() {
|
||||
pkill -u "$USER" -USR2 dunst
|
||||
}
|
||||
|
||||
rec_get_random() {
|
||||
dir="$1"
|
||||
if [ ! -d "$dir" ]; then
|
||||
user_input="$dir"
|
||||
return
|
||||
fi
|
||||
dir=($dir/*)
|
||||
dir=${dir[RANDOM % ${#dir[@]}]}
|
||||
rec_get_random "$dir"
|
||||
}
|
||||
|
||||
usage() {
|
||||
|
||||
echo "Important : Update the image cache, Ex: betterlockscreen -u path/to/image.jpg"
|
||||
echo " Image cache must be updated to initially configure or update wallpaper used"
|
||||
echo
|
||||
echo
|
||||
echo "See : https://github.com/pavanjadhaw/betterlockscreen for additional info..."
|
||||
echo
|
||||
echo
|
||||
echo "Options:"
|
||||
echo
|
||||
echo " -h --help"
|
||||
|
||||
echo " For help. Ex: betterlockscreen -h or betterlockscreen --help"
|
||||
echo
|
||||
echo
|
||||
echo " -u --update"
|
||||
echo " to update image cache, you should do this before using any other options"
|
||||
|
||||
echo " Ex: betterlockscreen -u path/to/image.png when image.png is custom background"
|
||||
echo " Or you can use betterlockscreen -u path/to/imagedir and a random file will be selected"
|
||||
echo
|
||||
echo
|
||||
echo " -l --lock"
|
||||
echo " to lock screen, Ex. betterlockscreen -l"
|
||||
echo " you can also use dimmed or blurred background for lockscreen"
|
||||
echo " Ex: betterlockscreen -l dim (for dimmed background)"
|
||||
echo " Ex: betterlockscreen -l blur (for blurred background)"
|
||||
echo " Ex: betterlockscreen -l dimblur (for dimmed + blurred background)"
|
||||
echo
|
||||
echo
|
||||
echo " -s --suspend"
|
||||
echo " to suspend system and lock screen, Ex. betterlockscreen -s"
|
||||
echo " you can also use dimmed or blurred background for lockscreen"
|
||||
echo " Ex: betterlockscreen -s dim (for dimmed background)"
|
||||
echo " Ex: betterlockscreen -s blur (for blurred background)"
|
||||
echo " Ex: betterlockscreen -s dimblur (for dimmed + blurred background)"
|
||||
echo
|
||||
echo
|
||||
echo " -w --wall"
|
||||
echo " you can also set lockscreen background as wallpaper"
|
||||
echo " to set wallpaper. Ex betterlockscreen -w or betterlockscreen --wall"
|
||||
echo " you can also use dimmed or blurred variants"
|
||||
echo " Ex: betterlockscreen -w dim (for dimmed wallpaper)"
|
||||
echo " Ex: betterlockscreen -w blur (for blurred wallpaper)"
|
||||
echo " Ex: betterlockscreen -w dimblur (for dimmed + blurred wallpaper)"
|
||||
echo
|
||||
echo
|
||||
echo " -r --resolution"
|
||||
echo " to be used after -u"
|
||||
echo " used to set a custom resolution for the image cache."
|
||||
echo " Ex: betterlockscreen -u path/to/image.png -r 1920x1080"
|
||||
echo " Ex: betterlockscreen -u path/to/image.png --resolution 3840x1080"
|
||||
echo
|
||||
echo " -b --blur"
|
||||
echo " to be used after -u"
|
||||
echo " used to set blur intensity. Default to 1."
|
||||
echo " Ex: betterlockscreen -u path/to/image.png -b 3"
|
||||
echo " Ex: betterlockscreen -u path/to/image.png --blur 0.5"
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
# Options
|
||||
case "$1" in
|
||||
"")
|
||||
if [ ! -f $l_dim ]; then
|
||||
|
||||
echo "Important : Update the image cache, Ex. betterlockscreen -u path/to/image.jpg"
|
||||
echo
|
||||
echo " Image cache must be updated to initially configure or update wallpaper used"
|
||||
echo
|
||||
echo "See also : For other set of options and help use help command."
|
||||
echo "Ex. betterlockscreen -h or betterlockscreen --help"
|
||||
|
||||
echo
|
||||
echo "See : https://github.com/pavanjadhaw/betterlockscreen for addition info..."
|
||||
exit 1
|
||||
else
|
||||
echo
|
||||
echo "Seems you havent provided any argument, see below for usage info"
|
||||
echo
|
||||
echo "See also : For other set of options and help use help command."
|
||||
|
||||
echo "Ex. betterlockscreen -h or betterlockscreen --help"
|
||||
|
||||
echo
|
||||
echo "See : https://github.com/pavanjadhaw/betterlockscreen for addition info..."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
-h | --help)
|
||||
|
||||
usage
|
||||
|
||||
;;
|
||||
|
||||
-l | --lock)
|
||||
case "$2" in
|
||||
"")
|
||||
# default lockscreen
|
||||
prelock
|
||||
lock "$l_resized"
|
||||
postlock
|
||||
;;
|
||||
|
||||
dim)
|
||||
# lockscreen with dimmed background
|
||||
prelock
|
||||
lock "$l_dim"
|
||||
postlock
|
||||
;;
|
||||
|
||||
blur)
|
||||
# set lockscreen with blurred background
|
||||
prelock
|
||||
lock "$l_blur"
|
||||
postlock
|
||||
;;
|
||||
|
||||
dimblur)
|
||||
# set lockscreen with dimmed + blurred background
|
||||
prelock
|
||||
lock "$l_dimblur"
|
||||
postlock
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
-s | --suspend)
|
||||
case "$2" in
|
||||
"")
|
||||
# default lockscreen
|
||||
prelock
|
||||
lock "$l_resized" && systemctl suspend
|
||||
postlock
|
||||
;;
|
||||
|
||||
dim)
|
||||
# lockscreen with dimmed background
|
||||
prelock
|
||||
lock "$l_dim" && systemctl suspend
|
||||
postlock
|
||||
;;
|
||||
|
||||
blur)
|
||||
# set lockscreen with blurred background
|
||||
prelock
|
||||
lock "$l_blur" && systemctl suspend
|
||||
postlock
|
||||
;;
|
||||
|
||||
dimblur)
|
||||
# set lockscreen with dimmed + blurred background
|
||||
prelock
|
||||
lock "$l_dimblur" && systemctl suspend
|
||||
postlock
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
|
||||
-w | --wall)
|
||||
case "$2" in
|
||||
"")
|
||||
# set resized image as wallpaper if no argument is supplied by user
|
||||
feh --bg-fill $resized
|
||||
;;
|
||||
|
||||
dim)
|
||||
# set dimmed image as wallpaper
|
||||
feh --bg-fill $dim
|
||||
;;
|
||||
|
||||
blur)
|
||||
# set blurred image as wallpaper
|
||||
feh --bg-fill $blur
|
||||
;;
|
||||
|
||||
dimblur)
|
||||
# set dimmed + blurred image as wallpaper
|
||||
feh --bg-fill $dimblur
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
-u | --update)
|
||||
background="$2"
|
||||
shift 2
|
||||
|
||||
# find your resolution so images can be resized to match your screen resolution
|
||||
y_res=$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')
|
||||
# default blur level
|
||||
blur_level=1
|
||||
|
||||
# parse update arguments
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-r | --resolution )
|
||||
y_res="$2"
|
||||
shift 2
|
||||
;;
|
||||
-b | --blur )
|
||||
blur_level="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
shift ;;
|
||||
esac
|
||||
done
|
||||
|
||||
rectangles=" "
|
||||
SR=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*')
|
||||
for RES in $SR; do
|
||||
SRA=(${RES//[x+]/ })
|
||||
CX=$((${SRA[2]} + 25))
|
||||
CY=$((${SRA[1]} - 30))
|
||||
rectangles+="rectangle $CX,$CY $((CX+300)),$((CY-80)) "
|
||||
done
|
||||
|
||||
# User supplied Image
|
||||
user_image="$folder/user_image.png"
|
||||
|
||||
# create folder
|
||||
if [ ! -d $folder ]; then
|
||||
echo "Creating '$folder' directory to cache processed images."
|
||||
mkdir -p "$folder"
|
||||
fi
|
||||
|
||||
# get random file in dir if passed argument is a dir
|
||||
rec_get_random "$background"
|
||||
|
||||
# get user image
|
||||
cp "$user_input" "$user_image"
|
||||
if [ ! -f $user_image ]; then
|
||||
echo "Please specify the path to the image you would like to use"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# replace orignal with user image
|
||||
cp "$user_image" "$orig_wall"
|
||||
rm "$user_image"
|
||||
|
||||
echo "Generating alternate images based on the image you specified,"
|
||||
echo "please wait this might take few seconds..."
|
||||
|
||||
# wallpapers
|
||||
|
||||
echo
|
||||
echo "Converting provided image to match your resolution..."
|
||||
# resize image
|
||||
convert "$orig_wall" -resize "$y_res""^" -gravity center -extent "$y_res" "$resized"
|
||||
|
||||
echo
|
||||
echo "Applying dim and blur effect to resized image"
|
||||
# dim
|
||||
convert "$resized" -fill black -colorize 40% "$dim"
|
||||
|
||||
# blur
|
||||
blur_shrink=$(echo "scale=2; 20 / $blur_level" | bc)
|
||||
blur_sigma=$(echo "scale=2; 0.6 * $blur_level" | bc)
|
||||
convert "$resized" \
|
||||
-filter Gaussian \
|
||||
-resize "$blur_shrink%" \
|
||||
-define "filter:sigma=$blur_sigma" \
|
||||
-resize "$y_res^" -gravity center -extent "$y_res" \
|
||||
"$blur"
|
||||
|
||||
# dimblur
|
||||
convert "$dim" \
|
||||
-filter Gaussian \
|
||||
-resize "$blur_shrink%" \
|
||||
-define "filter:sigma=$blur_sigma" \
|
||||
-resize "$y_res^" -gravity center -extent "$y_res" \
|
||||
"$dimblur"
|
||||
|
||||
# lockscreen backgrounds
|
||||
|
||||
echo
|
||||
echo "Caching images for faster screen locking"
|
||||
# resized
|
||||
convert "$resized" -draw "fill rgba(0, 0, 0, 0.4) $rectangles" "$l_resized"
|
||||
|
||||
# dim
|
||||
convert "$dim" -draw "fill rgba(0, 0, 0, 0.4) $rectangles" "$l_dim"
|
||||
|
||||
# blur
|
||||
convert "$blur" -draw "fill rgba(0, 0, 0, 0.4) $rectangles" "$l_blur"
|
||||
|
||||
# blur
|
||||
convert "$dimblur" -draw "fill rgba(0, 0, 0, 0.4) $rectangles" "$l_dimblur"
|
||||
echo
|
||||
echo "All required changes have been applied"
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
if [ $# -eq 1 ]; then
|
||||
/usr/bin/alacritty -e "nvim $1"
|
||||
else
|
||||
/usr/bin/alacritty -e "$@"
|
||||
fi
|
|
@ -1 +0,0 @@
|
|||
LANG="en_US.UTF-8" /usr/bin/ikhal $*
|
|
@ -1 +0,0 @@
|
|||
LANG="en_US.UTF-8" /usr/bin/khal $*
|
|
@ -1 +0,0 @@
|
|||
/usr/lib/qtwebflix --register-pepper-plugins="/usr/lib/qt/plugins/ppapi/libwidevinecdmadapter.so; application/x-ppapi-widevine-cdm"
|
Loading…
Reference in a new issue