mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-03 13:50:38 -04:00
updates
This commit is contained in:
parent
1f8cb3c145
commit
610604e80f
253 changed files with 27055 additions and 44 deletions
3
.config/ags/scripts/README.md
Normal file
3
.config/ags/scripts/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# scripts folder
|
||||
- For ARM devices, you have to compile C++ files yourself. If there are none, yippee
|
||||
- It is advised to use services instead of listening/polling scripts, so everything here are just scripts for actions
|
172
.config/ags/scripts/color_generation/executable_applycolor.sh
Normal file
172
.config/ags/scripts/color_generation/executable_applycolor.sh
Normal file
|
@ -0,0 +1,172 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
term_alpha=100 #Set this to < 100 make all your terminals transparent
|
||||
# sleep 0 # idk i wanted some delay or colors dont get applied properly
|
||||
if [ ! -d "$HOME"/.cache/ags/user/generated ]; then
|
||||
mkdir -p "$HOME"/.cache/ags/user/generated
|
||||
fi
|
||||
cd "$HOME/.config/ags" || exit
|
||||
|
||||
colornames=''
|
||||
colorstrings=''
|
||||
colorlist=()
|
||||
colorvalues=()
|
||||
|
||||
# wallpath=$(swww query | head -1 | awk -F 'image: ' '{print $2}')
|
||||
# wallpath_png="$HOME"'/.cache/ags/user/generated/hypr/lockscreen.png'
|
||||
# convert "$wallpath" "$wallpath_png"
|
||||
# wallpath_png=$(echo "$wallpath_png" | sed 's/\//\\\//g')
|
||||
# wallpath_png=$(sed 's/\//\\\\\//g' <<< "$wallpath_png")
|
||||
|
||||
transparentize() {
|
||||
local hex="$1"
|
||||
local alpha="$2"
|
||||
local red green blue
|
||||
|
||||
red=$((16#${hex:1:2}))
|
||||
green=$((16#${hex:3:2}))
|
||||
blue=$((16#${hex:5:2}))
|
||||
|
||||
printf 'rgba(%d, %d, %d, %.2f)\n' "$red" "$green" "$blue" "$alpha"
|
||||
}
|
||||
|
||||
get_light_dark() {
|
||||
lightdark=""
|
||||
if [ ! -f "$HOME"/.cache/ags/user/colormode.txt ]; then
|
||||
echo "" > "$HOME"/.cache/ags/user/colormode.txt
|
||||
else
|
||||
lightdark=$(sed -n '1p' "$HOME/.cache/ags/user/colormode.txt")
|
||||
fi
|
||||
echo "$lightdark"
|
||||
}
|
||||
|
||||
apply_fuzzel() {
|
||||
# Check if scripts/templates/fuzzel/fuzzel.ini exists
|
||||
if [ ! -f "scripts/templates/fuzzel/fuzzel.ini" ]; then
|
||||
echo "Template file not found for Fuzzel. Skipping that."
|
||||
return
|
||||
fi
|
||||
# Copy template
|
||||
mkdir -p "$HOME"/.cache/ags/user/generated/fuzzel
|
||||
cp "scripts/templates/fuzzel/fuzzel.ini" "$HOME"/.cache/ags/user/generated/fuzzel/fuzzel.ini
|
||||
# Apply colors
|
||||
for i in "${!colorlist[@]}"; do
|
||||
sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/fuzzel/fuzzel.ini
|
||||
done
|
||||
|
||||
cp "$HOME"/.cache/ags/user/generated/fuzzel/fuzzel.ini "$HOME"/.config/fuzzel/fuzzel.ini
|
||||
}
|
||||
|
||||
apply_term() {
|
||||
# Check if terminal escape sequence template exists
|
||||
if [ ! -f "scripts/templates/terminal/sequences.txt" ]; then
|
||||
echo "Template file not found for Terminal. Skipping that."
|
||||
return
|
||||
fi
|
||||
# Copy template
|
||||
mkdir -p "$HOME"/.cache/ags/user/generated/terminal
|
||||
cp "scripts/templates/terminal/sequences.txt" "$HOME"/.cache/ags/user/generated/terminal/sequences.txt
|
||||
# Apply colors
|
||||
for i in "${!colorlist[@]}"; do
|
||||
sed -i "s/${colorlist[$i]} #/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/terminal/sequences.txt
|
||||
done
|
||||
|
||||
sed -i "s/\$alpha/$term_alpha/g" "$HOME/.cache/ags/user/generated/terminal/sequences.txt"
|
||||
|
||||
for file in /dev/pts/*; do
|
||||
if [[ $file =~ ^/dev/pts/[0-9]+$ ]]; then
|
||||
cat "$HOME"/.cache/ags/user/generated/terminal/sequences.txt > "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
apply_hyprland() {
|
||||
# Check if scripts/templates/hypr/hyprland/colors.conf exists
|
||||
if [ ! -f "scripts/templates/hypr/hyprland/colors.conf" ]; then
|
||||
echo "Template file not found for Hyprland colors. Skipping that."
|
||||
return
|
||||
fi
|
||||
# Copy template
|
||||
mkdir -p "$HOME"/.cache/ags/user/generated/hypr/hyprland
|
||||
cp "scripts/templates/hypr/hyprland/colors.conf" "$HOME"/.cache/ags/user/generated/hypr/hyprland/colors.conf
|
||||
# Apply colors
|
||||
for i in "${!colorlist[@]}"; do
|
||||
sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/hypr/hyprland/colors.conf
|
||||
done
|
||||
|
||||
cp "$HOME"/.cache/ags/user/generated/hypr/hyprland/colors.conf "$HOME"/.config/hypr/hyprland/colors.conf
|
||||
}
|
||||
|
||||
apply_hyprlock() {
|
||||
# Check if scripts/templates/hypr/hyprlock.conf exists
|
||||
if [ ! -f "scripts/templates/hypr/hyprlock.conf" ]; then
|
||||
echo "Template file not found for hyprlock. Skipping that."
|
||||
return
|
||||
fi
|
||||
# Copy template
|
||||
mkdir -p "$HOME"/.cache/ags/user/generated/hypr/
|
||||
cp "scripts/templates/hypr/hyprlock.conf" "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf
|
||||
# Apply colors
|
||||
# sed -i "s/{{ SWWW_WALL }}/${wallpath_png}/g" "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf
|
||||
for i in "${!colorlist[@]}"; do
|
||||
sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf
|
||||
done
|
||||
|
||||
cp "$HOME"/.cache/ags/user/generated/hypr/hyprlock.conf "$HOME"/.config/hypr/hyprlock.conf
|
||||
}
|
||||
|
||||
apply_gtk() { # Using gradience-cli
|
||||
lightdark=$(get_light_dark)
|
||||
|
||||
# Copy template
|
||||
mkdir -p "$HOME"/.cache/ags/user/generated/gradience
|
||||
cp "scripts/templates/gradience/preset.json" "$HOME"/.cache/ags/user/generated/gradience/preset.json
|
||||
|
||||
# Apply colors
|
||||
for i in "${!colorlist[@]}"; do
|
||||
sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]}/g" "$HOME"/.cache/ags/user/generated/gradience/preset.json
|
||||
done
|
||||
|
||||
mkdir -p "$HOME/.config/presets" # create gradience presets folder
|
||||
gradience-cli apply -p "$HOME"/.cache/ags/user/generated/gradience/preset.json --gtk both
|
||||
|
||||
# Set light/dark preference
|
||||
# And set GTK theme manually as Gradience defaults to light adw-gtk3
|
||||
# (which is unreadable when broken when you use dark mode)
|
||||
if [ "$lightdark" = "light" ]; then
|
||||
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-light'
|
||||
else
|
||||
gsettings set org.gnome.desktop.interface gtk-theme adw-gtk3-dark
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
fi
|
||||
}
|
||||
|
||||
apply_ags() {
|
||||
sass "$HOME"/.config/ags/scss/main.scss "$HOME"/.cache/ags/user/generated/style.css
|
||||
ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
|
||||
ags run-js "App.resetCss(); App.applyCss('${HOME}/.cache/ags/user/generated/style.css');"
|
||||
}
|
||||
|
||||
if [[ "$1" = "--bad-apple" ]]; then
|
||||
lightdark=$(get_light_dark)
|
||||
cp scripts/color_generation/specials/_material_badapple"${lightdark}".scss scss/_material.scss
|
||||
colornames=$(cat scripts/color_generation/specials/_material_badapple"${lightdark}".scss | cut -d: -f1)
|
||||
colorstrings=$(cat scripts/color_generation/specials/_material_badapple"${lightdark}".scss | cut -d: -f2 | cut -d ' ' -f2 | cut -d ";" -f1)
|
||||
IFS=$'\n'
|
||||
colorlist=( $colornames ) # Array of color names
|
||||
colorvalues=( $colorstrings ) # Array of color values
|
||||
else
|
||||
colornames=$(cat scss/_material.scss | cut -d: -f1)
|
||||
colorstrings=$(cat scss/_material.scss | cut -d: -f2 | cut -d ' ' -f2 | cut -d ";" -f1)
|
||||
IFS=$'\n'
|
||||
colorlist=( $colornames ) # Array of color names
|
||||
colorvalues=( $colorstrings ) # Array of color values
|
||||
fi
|
||||
|
||||
apply_ags &
|
||||
apply_hyprland &
|
||||
apply_hyprlock &
|
||||
apply_gtk &
|
||||
apply_fuzzel &
|
||||
apply_term &
|
78
.config/ags/scripts/color_generation/executable_colorgen.sh
Normal file
78
.config/ags/scripts/color_generation/executable_colorgen.sh
Normal file
|
@ -0,0 +1,78 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# check if no arguments
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: colorgen.sh /path/to/image (--apply)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if the file ~/.cache/ags/user/colormode.txt exists. if not, create it. else, read it to $lightdark
|
||||
colormodefile="$HOME/.cache/ags/user/colormode.txt"
|
||||
lightdark="dark"
|
||||
transparency="opaque"
|
||||
materialscheme="vibrant"
|
||||
if [ ! -f $colormodefile ]; then
|
||||
echo "dark" > $colormodefile
|
||||
echo "opaque" >> $colormodefile
|
||||
echo "vibrant" >> $colormodefile
|
||||
elif [[ $(wc -l < $colormodefile) -ne 3 || $(wc -w < $colormodefile) -ne 3 ]]; then
|
||||
echo "dark" > $colormodefile
|
||||
echo "opaque" >> $colormodefile
|
||||
echo "vibrant" >> $colormodefile
|
||||
else
|
||||
lightdark=$(sed -n '1p' $colormodefile)
|
||||
transparency=$(sed -n '2p' $colormodefile)
|
||||
materialscheme=$(sed -n '3p' $colormodefile)
|
||||
fi
|
||||
backend="material" # color generator backend
|
||||
if [ ! -f "$HOME/.cache/ags/user/colorbackend.txt" ]; then
|
||||
echo "material" > "$HOME/.cache/ags/user/colorbackend.txt"
|
||||
else
|
||||
backend=$(cat "$HOME/.cache/ags/user/colorbackend.txt") # either "" or "-l"
|
||||
fi
|
||||
|
||||
cd "$HOME/.config/ags/scripts/" || exit
|
||||
if [[ "$1" = "#"* ]]; then # this is a color
|
||||
color_generation/generate_colors_material.py --color "$1" \
|
||||
--mode "$lightdark" --scheme "$materialscheme" --transparency "$transparency" \
|
||||
> "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||
if [ "$2" = "--apply" ]; then
|
||||
cp "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME/.config/ags/scss/_material.scss"
|
||||
color_generation/applycolor.sh
|
||||
fi
|
||||
elif [ "$backend" = "material" ]; then
|
||||
smartflag=''
|
||||
if [ "$3" = "--smart" ]; then
|
||||
smartflag='--smart True'
|
||||
fi
|
||||
color_generation/generate_colors_material.py --path "$1" \
|
||||
--mode "$lightdark" --scheme "$materialscheme" --transparency "$transparency" --cache "$HOME/.cache/ags/user/color.txt" $smartflag \
|
||||
> "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||
if [ "$2" = "--apply" ]; then
|
||||
cp "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME/.config/ags/scss/_material.scss"
|
||||
color_generation/applycolor.sh
|
||||
fi
|
||||
elif [ "$backend" = "pywal" ]; then
|
||||
# clear and generate
|
||||
wal -c
|
||||
wal -i "$1" -n $lightdark -q
|
||||
# copy scss
|
||||
cp "$HOME/.cache/wal/colors.scss" "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||
|
||||
cat color_generation/pywal_to_material.scss >> "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||
if [ "$2" = "--apply" ]; then
|
||||
sass "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME"/.cache/ags/user/generated/colors_classes.scss --style compact
|
||||
sed -i "s/ { color//g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
||||
sed -i "s/\./$/g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
||||
sed -i "s/}//g" "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
||||
if [ "$lightdark" = "-l" ]; then
|
||||
printf "\n""\$darkmode: false;""\n" >> "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
||||
else
|
||||
printf "\n""\$darkmode: true;""\n" >> "$HOME"/.cache/ags/user/generated/colors_classes.scss
|
||||
fi
|
||||
|
||||
cp "$HOME"/.cache/ags/user/generated/colors_classes.scss "$HOME/.config/ags/scss/_material.scss"
|
||||
|
||||
color_generation/applycolor.sh
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,116 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import math
|
||||
from PIL import Image
|
||||
from materialyoucolor.quantize import QuantizeCelebi
|
||||
from materialyoucolor.score.score import Score
|
||||
from materialyoucolor.hct import Hct
|
||||
from materialyoucolor.dynamiccolor.material_dynamic_colors import MaterialDynamicColors
|
||||
from materialyoucolor.utils.color_utils import rgba_from_argb, argb_from_rgb
|
||||
|
||||
argb_to_hex = lambda argb: "#{:02X}{:02X}{:02X}".format(*map(round, rgba_from_argb(argb)))
|
||||
hex_to_argb = lambda hex_code: argb_from_rgb(int(hex_code[1:3], 16), int(hex_code[3:5], 16), int(hex_code[5:], 16))
|
||||
|
||||
parser = argparse.ArgumentParser(description='Color generation script')
|
||||
parser.add_argument('--path', type=str, default=None, help='generate colorscheme from image')
|
||||
parser.add_argument('--size', type=int , default=128 , help='bitmap image size')
|
||||
parser.add_argument('--color', type=str, default=None, help='generate colorscheme from color')
|
||||
parser.add_argument('--mode', type=str, choices=['dark', 'light'], default='dark', help='dark or light mode')
|
||||
parser.add_argument('--scheme', type=str, default=None, help='material scheme to use')
|
||||
parser.add_argument('--smart', type=str, default=False, help='decide scheme type based on image color')
|
||||
parser.add_argument('--transparency', type=str, choices=['opaque', 'transparent'], default='opaque', help='enable transparency')
|
||||
parser.add_argument('--cache', type=str, default=None, help='file path to store the generated color')
|
||||
parser.add_argument('--debug', action='store_true', default=False, help='debug mode')
|
||||
args = parser.parse_args()
|
||||
|
||||
darkmode = (args.mode == 'dark')
|
||||
transparent = (args.transparency == 'transparent')
|
||||
print(f"$darkmode: {darkmode};")
|
||||
print(f"$transparent: {transparent};")
|
||||
|
||||
def calculate_optimal_size (width, height, bitmap_size):
|
||||
image_area = width * height;
|
||||
bitmap_area = bitmap_size ** 2
|
||||
scale = math.sqrt(bitmap_area/image_area) if image_area > bitmap_area else 1
|
||||
new_width = round(width * scale)
|
||||
new_height = round(height * scale)
|
||||
if new_width == 0:
|
||||
new_width = 1
|
||||
if new_height == 0:
|
||||
new_height = 1
|
||||
return new_width, new_height
|
||||
|
||||
if args.path is not None:
|
||||
image = Image.open(args.path)
|
||||
wsize, hsize = image.size
|
||||
wsize_new, hsize_new = calculate_optimal_size(wsize, hsize, args.size)
|
||||
if wsize_new < wsize or hsize_new < hsize:
|
||||
image = image.resize((wsize_new, hsize_new), Image.Resampling.BICUBIC)
|
||||
colors = QuantizeCelebi(list(image.getdata()), 128)
|
||||
argb = Score.score(colors)[0]
|
||||
|
||||
if args.cache is not None:
|
||||
with open(args.cache, 'w') as file:
|
||||
file.write(argb_to_hex(argb))
|
||||
hct = Hct.from_int(argb)
|
||||
if(args.smart):
|
||||
if(hct.chroma < 20):
|
||||
args.scheme = 'neutral'
|
||||
if(hct.tone > 60):
|
||||
darkmode = False
|
||||
elif args.color is not None:
|
||||
argb = hex_to_argb(args.color)
|
||||
hct = Hct.from_int(argb)
|
||||
|
||||
# Default scheme -> Tonal Spot (Android Default)
|
||||
from materialyoucolor.scheme.scheme_vibrant import SchemeVibrant as Scheme
|
||||
if args.scheme is not None:
|
||||
if args.scheme == 'fruitsalad':
|
||||
from materialyoucolor.scheme.scheme_fruit_salad import SchemeFruitSalad as Scheme
|
||||
elif args.scheme == 'expressive':
|
||||
from materialyoucolor.scheme.scheme_expressive import SchemeExpressive as Scheme
|
||||
elif args.scheme == 'monochrome':
|
||||
from materialyoucolor.scheme.scheme_monochrome import SchemeMonochrome as Scheme
|
||||
elif args.scheme == 'rainbow':
|
||||
from materialyoucolor.scheme.scheme_rainbow import SchemeRainbow as Scheme
|
||||
elif args.scheme == 'tonalspot':
|
||||
from materialyoucolor.scheme.scheme_tonal_spot import SchemeTonalSpot as Scheme
|
||||
elif args.scheme == 'neutral':
|
||||
from materialyoucolor.scheme.scheme_neutral import SchemeNeutral as Scheme
|
||||
elif args.scheme == 'fidelity':
|
||||
from materialyoucolor.scheme.scheme_fidelity import SchemeFidelity as Scheme
|
||||
elif args.scheme == 'content':
|
||||
from materialyoucolor.scheme.scheme_content import SchemeContent as Scheme
|
||||
|
||||
# Generate
|
||||
scheme = Scheme(hct, darkmode, 0.0)
|
||||
|
||||
for color in vars(MaterialDynamicColors).keys():
|
||||
color_name = getattr(MaterialDynamicColors, color)
|
||||
if hasattr(color_name, "get_hct"):
|
||||
rgba = color_name.get_hct(scheme).to_rgba()
|
||||
r, g, b, a = rgba
|
||||
hex_code = f"#{r:02X}{g:02X}{b:02X}"
|
||||
print('$' + color + ': ' + hex_code + ';')
|
||||
|
||||
if args.debug == True:
|
||||
print('---------------------')
|
||||
if args.path is not None:
|
||||
print('Image size: {} x {}'.format(wsize, hsize))
|
||||
print('Resized image: {} x {}'.format(wsize_new, hsize_new))
|
||||
print('Hue:', hct.hue)
|
||||
print('Chroma:', hct.chroma)
|
||||
print('Tone:', hct.tone)
|
||||
r, g, b, a = rgba_from_argb(argb)
|
||||
hex_code = argb_to_hex(argb)
|
||||
print('Selected Color:', "\x1B[38;2;{};{};{}m{}\x1B[0m".format(r, g, b, "\x1b[7m \x1b[7m"), hex_code)
|
||||
print('Dark mode:', darkmode)
|
||||
print('Scheme:', args.scheme)
|
||||
print('---------------------')
|
||||
for color in vars(MaterialDynamicColors).keys():
|
||||
color_name = getattr(MaterialDynamicColors, color)
|
||||
if hasattr(color_name, "get_hct"):
|
||||
rgba = color_name.get_hct(scheme).to_rgba()
|
||||
r, g, b, a = rgba
|
||||
hex_code = f"#{r:02X}{g:02X}{b:02X}"
|
||||
print(color.ljust(32), "\x1B[38;2;{};{};{}m{}\x1B[0m".format(rgba[0], rgba[1], rgba[2], "\x1b[7m \x1b[7m"), hex_code)
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$1" == "--pick" ]; then
|
||||
color=$(hyprpicker --no-fancy)
|
||||
else
|
||||
color=$(cut -f1 "${HOME}/.cache/ags/user/color.txt")
|
||||
fi
|
||||
|
||||
# Generate colors for ags n stuff
|
||||
"$HOME"/.config/ags/scripts/color_generation/colorgen.sh "${color}" --apply
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$1" == "--noswitch" ]; then
|
||||
imgpath=$(swww query | head -1 | awk -F 'image: ' '{print $2}')
|
||||
# imgpath=$(ags run-js 'wallpaper.get(0)')
|
||||
else
|
||||
# Select and set image (hyprland)
|
||||
cd "$HOME/Pictures"
|
||||
imgpath=$(yad --width 1200 --height 800 --file --title='Choose wallpaper' --add-preview --large-preview)
|
||||
screensizey=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2 | head -1)
|
||||
cursorposx=$(hyprctl cursorpos -j | gojq '.x' 2>/dev/null) || cursorposx=960
|
||||
cursorposy=$(hyprctl cursorpos -j | gojq '.y' 2>/dev/null) || cursorposy=540
|
||||
cursorposy_inverted=$(( screensizey - cursorposy ))
|
||||
|
||||
if [ "$imgpath" == '' ]; then
|
||||
echo 'Aborted'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# ags run-js "wallpaper.set('')"
|
||||
# sleep 0.1 && ags run-js "wallpaper.set('${imgpath}')" &
|
||||
swww img "$imgpath" --transition-step 100 --transition-fps 60 \
|
||||
--transition-type grow --transition-angle 30 --transition-duration 1 \
|
||||
--transition-pos "$cursorposx, $cursorposy_inverted"
|
||||
fi
|
||||
|
||||
# Generate colors for ags n stuff
|
||||
"$HOME"/.config/ags/scripts/color_generation/colorgen.sh "${imgpath}" --apply --smart
|
57
.config/ags/scripts/color_generation/pywal_to_material.scss
Normal file
57
.config/ags/scripts/color_generation/pywal_to_material.scss
Normal file
|
@ -0,0 +1,57 @@
|
|||
$primary: lighten($color4, 20%);
|
||||
$onPrimary: darken($color2, 20%);
|
||||
$primaryContainer: darken($color2, 10%);
|
||||
$onPrimaryContainer: lighten($color4, 10%);
|
||||
$secondary: desaturate(lighten($color5, 20%), 20%);
|
||||
$onSecondary: desaturate(darken($color3, 20%), 20%);
|
||||
$secondaryContainer: desaturate(darken($color3, 20%), 20%);
|
||||
$onSecondaryContainer: desaturate(lighten($color5, 20%), 20%);
|
||||
$tertiary: adjust-hue(lighten($color4, 20%), 30deg);
|
||||
$onTertiary: adjust-hue(darken($color2, 20%), 30deg);
|
||||
$tertiaryContainer: adjust-hue(darken($color2, 10%), 30deg);
|
||||
$tertiaryContainer: adjust-hue(lighten($color4, 10%), 30deg);
|
||||
$error: #ffb4a9;
|
||||
$onError: #680003;
|
||||
$errorContainer: #930006;
|
||||
$onErrorContainer: #ffb4a9;
|
||||
$colorbarbg: $color0;
|
||||
$background: $color0;
|
||||
$onBackground: $color7;
|
||||
$surface: $color0;
|
||||
$onSurface: $color7;
|
||||
$surfaceVariant: $color1;
|
||||
$onSurfaceVariant: $color7;
|
||||
$outline: $color7;
|
||||
$shadow: #000000;
|
||||
$inverseSurface: invert($surface);
|
||||
$inverseOnSurface: invert($onSurface);
|
||||
$inversePrimary: invert($primary);
|
||||
|
||||
.primary { color: $primary; }
|
||||
.onPrimary { color: $onPrimary; }
|
||||
.primaryContainer { color: $primaryContainer; }
|
||||
.onPrimaryContainer { color: $onPrimaryContainer; }
|
||||
.secondary { color: $secondary; }
|
||||
.onSecondary { color: $onSecondary; }
|
||||
.secondaryContainer { color: $secondaryContainer; }
|
||||
.onSecondaryContainer { color: $onSecondaryContainer; }
|
||||
.tertiary { color: $tertiary; }
|
||||
.onTertiary { color: $onTertiary; }
|
||||
.tertiaryContainer { color: $tertiaryContainer; }
|
||||
.onTertiaryContainer { color: $tertiaryContainer; }
|
||||
.error { color: $error; }
|
||||
.onError { color: $onError; }
|
||||
.errorContainer { color: $errorContainer; }
|
||||
.onErrorContainer { color: $onErrorContainer; }
|
||||
.colorbarbg { color: $colorbarbg; }
|
||||
.background { color: $background; }
|
||||
.onBackground { color: $onBackground; }
|
||||
.surface { color: $surface; }
|
||||
.onSurface { color: $onSurface; }
|
||||
.surfaceVariant { color: $surfaceVariant; }
|
||||
.onSurfaceVariant { color: $onSurfaceVariant; }
|
||||
.outline { color: $outline; }
|
||||
.shadow { color: $shadow; }
|
||||
.inverseSurface { color: $inverseSurface; }
|
||||
.inverseOnSurface { color: $inverseOnSurface; }
|
||||
.inversePrimary { color: $inversePrimary; }
|
|
@ -0,0 +1,29 @@
|
|||
$darkmode: false;
|
||||
$primary: #000000;
|
||||
$onPrimary: #FFFFFF ;
|
||||
$primaryContainer: #d4d4d4;
|
||||
$onPrimaryContainer: #000000;
|
||||
$secondary: #000000;
|
||||
$onSecondary: #FFFFFF ;
|
||||
$secondaryContainer: #bebebe;
|
||||
$onSecondaryContainer: #000000;
|
||||
$tertiary: #000000;
|
||||
$onTertiary: #FFFFFF ;
|
||||
$tertiaryContainer: #FFFFFF ;
|
||||
$onTertiaryContainer: #000000;
|
||||
$error: #000000;
|
||||
$onError: #FFFFFF ;
|
||||
$errorContainer: #FFFFFF ;
|
||||
$onErrorContainer: #000000;
|
||||
$colorbarbg: #FFFFFF ;
|
||||
$background: #FFFFFF ;
|
||||
$onBackground: #000000;
|
||||
$surface: #f0f0f0;
|
||||
$onSurface: #000000;
|
||||
$surfaceVariant: #dddddd;
|
||||
$onSurfaceVariant: #000000;
|
||||
$outline: #525252;
|
||||
$shadow: #000000 ;
|
||||
$inverseSurface: #000000;
|
||||
$inverseOnSurface: #FFFFFF;
|
||||
$inversePrimary: #000000;
|
|
@ -0,0 +1,29 @@
|
|||
$darkmode: true;
|
||||
$primary: #e2e2e2;
|
||||
$onPrimary: #000000;
|
||||
$primaryContainer: #6b6b6b;
|
||||
$onPrimaryContainer: #e2e2e2;
|
||||
$secondary: #e2e2e2;
|
||||
$onSecondary: #000000;
|
||||
$secondaryContainer: #313131;
|
||||
$onSecondaryContainer: #e2e2e2;
|
||||
$tertiary: #e2e2e2;
|
||||
$onTertiary: #000000;
|
||||
$tertiaryContainer: #000000;
|
||||
$onTertiaryContainer: #e2e2e2;
|
||||
$error: #e2e2e2;
|
||||
$onError: #000000;
|
||||
$errorContainer: #000000;
|
||||
$onErrorContainer: #e2e2e2;
|
||||
$colorbarbg: #000000;
|
||||
$background: #000000;
|
||||
$onBackground: #e2e2e2;
|
||||
$surface: #161616;
|
||||
$onSurface: #e2e2e2;
|
||||
$surfaceVariant: #242424;
|
||||
$onSurfaceVariant: #e2e2e2;
|
||||
$outline: #a1a1a1;
|
||||
$shadow: #000000;
|
||||
$inverseSurface: #e2e2e2;
|
||||
$inverseOnSurface: #000000;
|
||||
$inversePrimary: #e2e2e2;
|
278
.config/ags/scripts/executable_grimblast.sh
Normal file
278
.config/ags/scripts/executable_grimblast.sh
Normal file
|
@ -0,0 +1,278 @@
|
|||
#!/usr/bin/env bash
|
||||
## Grimblast: a helper for screenshots within hyprland
|
||||
## Requirements:
|
||||
## - `grim`: screenshot utility for wayland
|
||||
## - `slurp`: to select an area
|
||||
## - `hyprctl`: to read properties of current window (provided by Hyprland)
|
||||
## - `hyprpicker`: to freeze the screen when selecting area
|
||||
## - `wl-copy`: clipboard utility (provided by wl-clipboard)
|
||||
## - `jq`: json utility to parse hyprctl output
|
||||
## - `notify-send`: to show notifications (provided by libnotify)
|
||||
## Those are needed to be installed, if unsure, run `grimblast check`
|
||||
##
|
||||
## See `man 1 grimblast` or `grimblast usage` for further details.
|
||||
|
||||
## Author: Misterio (https://github.com/misterio77)
|
||||
|
||||
## This tool is based on grimshot, with swaymsg commands replaced by their
|
||||
## hyprctl equivalents.
|
||||
## https://github.com/swaywm/sway/blob/master/contrib/grimshot
|
||||
jq=gojq
|
||||
getTargetDirectory() {
|
||||
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" &&
|
||||
. "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
|
||||
|
||||
echo "${XDG_SCREENSHOTS_DIR:-${XDG_PICTURES_DIR:-$HOME}}"
|
||||
}
|
||||
|
||||
tmp_editor_directory() {
|
||||
echo "/tmp"
|
||||
}
|
||||
|
||||
#Detect if $GRIMBLAST_EDITOR env exist
|
||||
env_editor_confirm() {
|
||||
if [ -n "$GRIMBLAST_EDITOR" ]; then
|
||||
echo "GRIMBLAST_EDITOR is set. Continuing..."
|
||||
else
|
||||
echo "GRIMBLAST_EDITOR is not set. Defaulting to gimp"
|
||||
GRIMBLAST_EDITOR=gimp
|
||||
fi
|
||||
}
|
||||
|
||||
NOTIFY=no
|
||||
CURSOR=
|
||||
FREEZE=
|
||||
WAIT=no
|
||||
SCALE=
|
||||
HYPRPICKER_PID=-1
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-n | --notify)
|
||||
NOTIFY=yes
|
||||
shift # past argument
|
||||
;;
|
||||
-c | --cursor)
|
||||
CURSOR=yes
|
||||
shift # past argument
|
||||
;;
|
||||
-f | --freeze)
|
||||
FREEZE=yes
|
||||
shift # past argument
|
||||
;;
|
||||
-w | --wait)
|
||||
shift
|
||||
WAIT=$1
|
||||
if echo "$WAIT" | grep "[^0-9]" -q; then
|
||||
echo "Invalid value for wait '$WAIT'" >&2
|
||||
exit 3
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-s | --scale)
|
||||
shift # past argument
|
||||
if [ $# -gt 0 ]; then
|
||||
SCALE="$1" # assign the next argument to SCALE
|
||||
shift # past argument
|
||||
else
|
||||
echo "Error: Missing argument for --scale option."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*) # unknown option
|
||||
break # done with parsing --flags
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
ACTION=${1:-usage}
|
||||
SUBJECT=${2:-screen}
|
||||
FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
|
||||
FILE_EDITOR=${3:-$(tmp_editor_directory)/$(date -Ins).png}
|
||||
|
||||
if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "edit" ] && [ "$ACTION" != "copysave" ] && [ "$ACTION" != "check" ]; then
|
||||
echo "Usage:"
|
||||
echo " grimblast [--notify] [--cursor] [--freeze] [--wait N] [--scale <scale>] (copy|save|copysave|edit) [active|screen|output|area] [FILE|-]"
|
||||
echo " grimblast check"
|
||||
echo " grimblast usage"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " copy: Copy the screenshot data into the clipboard."
|
||||
echo " save: Save the screenshot to a regular file or '-' to pipe to STDOUT."
|
||||
echo " copysave: Combine the previous 2 options."
|
||||
echo " edit: Open screenshot in the image editor of your choice (default is gimp). See man page for info."
|
||||
echo " check: Verify if required tools are installed and exit."
|
||||
echo " usage: Show this message and exit."
|
||||
echo ""
|
||||
echo "Targets:"
|
||||
echo " active: Currently active window."
|
||||
echo " screen: All visible outputs."
|
||||
echo " output: Currently active output."
|
||||
echo " area: Manually select a region or window."
|
||||
exit
|
||||
fi
|
||||
|
||||
notify() {
|
||||
notify-send -t 3000 -a grimblast "$@"
|
||||
}
|
||||
|
||||
notifyOk() {
|
||||
[ "$NOTIFY" = "no" ] && return
|
||||
|
||||
notify "$@"
|
||||
}
|
||||
|
||||
notifyError() {
|
||||
if [ $NOTIFY = "yes" ]; then
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"Error taking screenshot with grim"}
|
||||
notify -u critical "$TITLE" "$MESSAGE"
|
||||
else
|
||||
echo "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
resetFade() {
|
||||
if [[ -n $FADE && -n $FADEOUT ]]; then
|
||||
hyprctl keyword animation "$FADE" >/dev/null
|
||||
hyprctl keyword animation "$FADEOUT" >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
killHyprpicker() {
|
||||
if [ ! $HYPRPICKER_PID -eq -1 ]; then
|
||||
kill $HYPRPICKER_PID
|
||||
fi
|
||||
}
|
||||
|
||||
die() {
|
||||
killHyprpicker
|
||||
MSG=${1:-Bye}
|
||||
notifyError "Error: $MSG"
|
||||
exit 2
|
||||
}
|
||||
|
||||
check() {
|
||||
COMMAND=$1
|
||||
if command -v "$COMMAND" >/dev/null 2>&1; then
|
||||
RESULT="OK"
|
||||
else
|
||||
RESULT="NOT FOUND"
|
||||
fi
|
||||
echo " $COMMAND: $RESULT"
|
||||
}
|
||||
|
||||
takeScreenshot() {
|
||||
FILE=$1
|
||||
GEOM=$2
|
||||
OUTPUT=$3
|
||||
if [ -n "$OUTPUT" ]; then
|
||||
grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} -o "$OUTPUT" "$FILE" || die "Unable to invoke grim"
|
||||
elif [ -z "$GEOM" ]; then
|
||||
grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} "$FILE" || die "Unable to invoke grim"
|
||||
else
|
||||
grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} -g "$GEOM" "$FILE" || die "Unable to invoke grim"
|
||||
resetFade
|
||||
fi
|
||||
}
|
||||
|
||||
wait() {
|
||||
if [ "$WAIT" != "no" ]; then
|
||||
sleep "$WAIT"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "check" ]; then
|
||||
echo "Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH..."
|
||||
check grim
|
||||
check slurp
|
||||
check hyprctl
|
||||
check hyprpicker
|
||||
check wl-copy
|
||||
check $jq
|
||||
check notify-send
|
||||
exit
|
||||
elif [ "$SUBJECT" = "active" ]; then
|
||||
wait
|
||||
FOCUSED=$(hyprctl activewindow -j)
|
||||
GEOM=$(echo "$FOCUSED" | $jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
|
||||
APP_ID=$(echo "$FOCUSED" | $jq -r '.class')
|
||||
WHAT="$APP_ID window"
|
||||
elif [ "$SUBJECT" = "screen" ]; then
|
||||
wait
|
||||
GEOM=""
|
||||
WHAT="Screen"
|
||||
elif [ "$SUBJECT" = "output" ]; then
|
||||
wait
|
||||
GEOM=""
|
||||
OUTPUT=$(hyprctl monitors -j | $jq -r '.[] | select(.focused == true)' | $jq -r '.name')
|
||||
WHAT="$OUTPUT"
|
||||
elif [ "$SUBJECT" = "area" ]; then
|
||||
if [ "$FREEZE" = "yes" ] && [ "$(command -v "hyprpicker")" ] >/dev/null 2>&1; then
|
||||
hyprpicker -r -z &
|
||||
sleep 0.2
|
||||
HYPRPICKER_PID=$!
|
||||
fi
|
||||
|
||||
# get fade & fadeOut animation and unset it
|
||||
# this removes the black border seen around screenshots
|
||||
FADE="$(hyprctl -j animations | $jq -jr '.[0][] | select(.name == "fade") | .name, ",", (if .enabled == true then "1" else "0" end), ",", (.speed|floor), ",", .bezier')"
|
||||
FADEOUT="$(hyprctl -j animations | $jq -jr '.[0][] | select(.name == "fadeOut") | .name, ",", (if .enabled == true then "1" else "0" end), ",", (.speed|floor), ",", .bezier')"
|
||||
hyprctl keyword animation 'fade,0,1,default' >/dev/null
|
||||
hyprctl keyword animation 'fadeOut,0,1,default' >/dev/null
|
||||
|
||||
WORKSPACES="$(hyprctl monitors -j | $jq -r 'map(.activeWorkspace.id)')"
|
||||
WINDOWS="$(hyprctl clients -j | $jq -r --argjson workspaces "$WORKSPACES" 'map(select([.workspace.id] | inside($workspaces)))')"
|
||||
# shellcheck disable=2086 # if we don't split, spaces mess up slurp
|
||||
GEOM=$(echo "$WINDOWS" | $jq -r '.[] | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | slurp $SLURP_ARGS)
|
||||
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
killHyprpicker
|
||||
resetFade
|
||||
exit 1
|
||||
fi
|
||||
WHAT="Area"
|
||||
wait
|
||||
elif [ "$SUBJECT" = "window" ]; then
|
||||
die "Subject 'window' is now included in 'area'"
|
||||
else
|
||||
die "Unknown subject to take a screen shot from" "$SUBJECT"
|
||||
fi
|
||||
|
||||
if [ "$ACTION" = "copy" ]; then
|
||||
takeScreenshot - "$GEOM" "$OUTPUT" | wl-copy --type image/png || die "Clipboard error"
|
||||
notifyOk "$WHAT copied to buffer"
|
||||
elif [ "$ACTION" = "save" ]; then
|
||||
if takeScreenshot "$FILE" "$GEOM" "$OUTPUT"; then
|
||||
TITLE="Screenshot of $SUBJECT"
|
||||
MESSAGE=$(basename "$FILE")
|
||||
notifyOk "$TITLE" "$MESSAGE" -i "$FILE"
|
||||
echo "$FILE"
|
||||
else
|
||||
notifyError "Error taking screenshot with grim"
|
||||
fi
|
||||
elif [ "$ACTION" = "edit" ]; then
|
||||
env_editor_confirm
|
||||
if takeScreenshot "$FILE_EDITOR" "$GEOM" "$OUTPUT"; then
|
||||
TITLE="Screenshot of $SUBJECT"
|
||||
MESSAGE="Open screenshot in image editor"
|
||||
notifyOk "$TITLE" "$MESSAGE" -i "$FILE_EDITOR"
|
||||
$GRIMBLAST_EDITOR "$FILE_EDITOR"
|
||||
echo "$FILE_EDITOR"
|
||||
else
|
||||
notifyError "Error taking screenshot"
|
||||
fi
|
||||
else
|
||||
if [ "$ACTION" = "copysave" ]; then
|
||||
takeScreenshot - "$GEOM" "$OUTPUT" | tee "$FILE" | wl-copy --type image/png || die "Clipboard error"
|
||||
notifyOk "$WHAT copied to buffer and saved to $FILE" -i "$FILE"
|
||||
echo "$FILE"
|
||||
else
|
||||
notifyError "Error taking screenshot with grim"
|
||||
fi
|
||||
fi
|
||||
|
||||
killHyprpicker
|
28
.config/ags/scripts/executable_record-script.sh
Normal file
28
.config/ags/scripts/executable_record-script.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
getdate() {
|
||||
date '+%Y%m%d_%H-%M-%S'
|
||||
}
|
||||
getaudiooutput() {
|
||||
pactl list sources | grep 'Name' | grep 'monitor' | cut -d ' ' -f2
|
||||
}
|
||||
getactivemonitor() {
|
||||
hyprctl monitors -j | gojq -r '.[] | select(.focused == true) | .name'
|
||||
}
|
||||
|
||||
cd ~/Videos || exit
|
||||
if pgrep wf-recorder > /dev/null; then
|
||||
notify-send "Recording Stopped" "Stopped" -a 'record-script.sh' &
|
||||
pkill wf-recorder &
|
||||
else
|
||||
notify-send "Starting recording" 'recording_'"$(getdate)"'.mp4' -a 'record-script.sh'
|
||||
if [[ "$1" == "--sound" ]]; then
|
||||
wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" --audio="$(getaudiooutput)" & disown
|
||||
elif [[ "$1" == "--fullscreen-sound" ]]; then
|
||||
wf-recorder -o $(getactivemonitor) --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --audio="$(getaudiooutput)" & disown
|
||||
elif [[ "$1" == "--fullscreen" ]]; then
|
||||
wf-recorder -o $(getactivemonitor) --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t & disown
|
||||
else
|
||||
wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" & disown
|
||||
fi
|
||||
fi
|
83
.config/ags/scripts/executable_wayland-idle-inhibitor.py
Normal file
83
.config/ags/scripts/executable_wayland-idle-inhibitor.py
Normal file
|
@ -0,0 +1,83 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from signal import SIGINT, SIGTERM, signal
|
||||
from threading import Event
|
||||
import setproctitle
|
||||
|
||||
from pywayland.client.display import Display
|
||||
from pywayland.protocol.idle_inhibit_unstable_v1.zwp_idle_inhibit_manager_v1 import (
|
||||
ZwpIdleInhibitManagerV1,
|
||||
)
|
||||
from pywayland.protocol.wayland.wl_compositor import WlCompositor
|
||||
from pywayland.protocol.wayland.wl_registry import WlRegistryProxy
|
||||
from pywayland.protocol.wayland.wl_surface import WlSurface
|
||||
|
||||
|
||||
@dataclass
|
||||
class GlobalRegistry:
|
||||
surface: WlSurface | None = None
|
||||
inhibit_manager: ZwpIdleInhibitManagerV1 | None = None
|
||||
|
||||
|
||||
def handle_registry_global(
|
||||
wl_registry: WlRegistryProxy, id_num: int, iface_name: str, version: int
|
||||
) -> None:
|
||||
global_registry: GlobalRegistry = wl_registry.user_data or GlobalRegistry()
|
||||
|
||||
if iface_name == "wl_compositor":
|
||||
compositor = wl_registry.bind(id_num, WlCompositor, version)
|
||||
global_registry.surface = compositor.create_surface() # type: ignore
|
||||
elif iface_name == "zwp_idle_inhibit_manager_v1":
|
||||
global_registry.inhibit_manager = wl_registry.bind(
|
||||
id_num, ZwpIdleInhibitManagerV1, version
|
||||
)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
done = Event()
|
||||
signal(SIGINT, lambda _, __: done.set())
|
||||
signal(SIGTERM, lambda _, __: done.set())
|
||||
|
||||
global_registry = GlobalRegistry()
|
||||
|
||||
display = Display()
|
||||
display.connect()
|
||||
|
||||
registry = display.get_registry() # type: ignore
|
||||
registry.user_data = global_registry
|
||||
registry.dispatcher["global"] = handle_registry_global
|
||||
|
||||
def shutdown() -> None:
|
||||
display.dispatch()
|
||||
display.roundtrip()
|
||||
display.disconnect()
|
||||
|
||||
display.dispatch()
|
||||
display.roundtrip()
|
||||
|
||||
if global_registry.surface is None or global_registry.inhibit_manager is None:
|
||||
print("Wayland seems not to support idle_inhibit_unstable_v1 protocol.")
|
||||
shutdown()
|
||||
sys.exit(1)
|
||||
|
||||
inhibitor = global_registry.inhibit_manager.create_inhibitor( # type: ignore
|
||||
global_registry.surface
|
||||
)
|
||||
|
||||
display.dispatch()
|
||||
display.roundtrip()
|
||||
|
||||
print("Inhibiting idle...")
|
||||
done.wait()
|
||||
print("Shutting down...")
|
||||
|
||||
inhibitor.destroy()
|
||||
|
||||
shutdown()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setproctitle.setproctitle("wayland-idle-inhibitor.py")
|
||||
main()
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
hyprctl dispatch "$1" $(((($(hyprctl activeworkspace -j | gojq -r .id) - 1) / 10) * 10 + $2))
|
|
@ -0,0 +1,243 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
## Defaults
|
||||
keepGensDef=30; keepDaysDef=30
|
||||
keepGens=$keepGensDef; keepDays=$keepDaysDef
|
||||
|
||||
## Usage
|
||||
usage () {
|
||||
printf "Usage:\n\t ./trim-generations.sh <keep-gernerations> <keep-days> <profile> \n\n
|
||||
(defaults are: Keep-Gens=$keepGensDef Keep-Days=$keepDaysDef Profile=user)\n\n"
|
||||
printf "If you enter any parameters, you must enter all three, or none to use defaults.\n"
|
||||
printf "Example:\n\t trim-generations.sh 15 10 home-manager\n"
|
||||
printf " this will work on the home-manager profile and keep all generations from the\n"
|
||||
printf "last 10 days, and keep at least 15 generations no matter how old.\n"
|
||||
printf "\nProfiles available are:\tuser, home-manager, channels, system (root)\n"
|
||||
printf "\n-h or --help prints this help text."
|
||||
}
|
||||
|
||||
if [ $# -eq 1 ]; then # if help requested
|
||||
if [ $1 = "-h" ]; then
|
||||
usage
|
||||
exit 1;
|
||||
fi
|
||||
if [ $1 = "--help" ]; then
|
||||
usage
|
||||
exit 2;
|
||||
fi
|
||||
printf "Dont recognise your option exiting..\n\n"
|
||||
usage
|
||||
exit 3;
|
||||
|
||||
elif [ $# -eq 0 ]; then # print the defaults
|
||||
printf "The current defaults are:\n Keep-Gens=$keepGensDef Keep-Days=$keepDaysDef \n\n"
|
||||
read -p "Keep these defaults? (y/n):" answer
|
||||
|
||||
case "$answer" in
|
||||
[yY1] )
|
||||
printf "Using defaults..\n"
|
||||
;;
|
||||
[nN0] ) printf "ok, doing nothing, exiting..\n"
|
||||
exit 6;
|
||||
;;
|
||||
* ) printf "%b" "Doing nothing, exiting.."
|
||||
exit 7;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
## Handle parameters (and change if root)
|
||||
if [[ $EUID -ne 0 ]]; then # if not root
|
||||
profile=$(readlink /home/$USER/.nix-profile)
|
||||
else
|
||||
if [ -d /nix/var/nix/profiles/system ]; then # maybe this or the other
|
||||
profile="/nix/var/nix/profiles/system"
|
||||
elif [ -d /nix/var/nix/profiles/default ]; then
|
||||
profile="/nix/var/nix/profiles/default"
|
||||
else
|
||||
echo "Cant find profile for root. Exiting"
|
||||
exit 8
|
||||
fi
|
||||
fi
|
||||
if (( $# < 1 )); then
|
||||
printf "Keeping default: $keepGensDef generations OR $keepDaysDef days, whichever is more\n"
|
||||
elif [[ $# -le 2 ]]; then
|
||||
printf "\nError: Not enough arguments.\n\n" >&2
|
||||
usage
|
||||
exit 1
|
||||
elif (( $# > 4)); then
|
||||
printf "\nError: Too many arguments.\n\n" >&2
|
||||
usage
|
||||
exit 2
|
||||
else
|
||||
if [ $1 -lt 1 ]; then
|
||||
printf "using Gen numbers less than 1 not recommended. Setting to min=1\n"
|
||||
read -p "is that ok? (y/n): " asnwer
|
||||
#printf "$asnwer"
|
||||
case "$asnwer" in
|
||||
[yY1] )
|
||||
printf "ok, continuing..\n"
|
||||
;;
|
||||
[nN0] )
|
||||
printf "ok, doing nothing, exiting..\n"
|
||||
exit 6;
|
||||
;;
|
||||
* )
|
||||
printf "%b" "Doing nothing, exiting.."
|
||||
exit 7;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ $2 -lt 0 ]; then
|
||||
printf "using negative days number not recommended. Setting to min=0\n"
|
||||
read -p "is that ok? (y/n): " asnwer
|
||||
|
||||
case "$asnwer" in
|
||||
[yY1] )
|
||||
printf "ok, continuing..\n"
|
||||
;;
|
||||
[nN0] )
|
||||
printf "ok, doing nothing, exiting..\n"
|
||||
exit 6;
|
||||
;;
|
||||
* )
|
||||
printf "%b" "Doing nothing, exiting.."
|
||||
exit 7;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
keepGens=$1; keepDays=$2;
|
||||
(( keepGens < 1 )) && keepGens=1
|
||||
(( keepDays < 0 )) && keepDays=0
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
if [[ $3 == "user" ]] || [[ $3 == "default" ]]; then
|
||||
profile=$(readlink /home/$USER/.nix-profile)
|
||||
elif [[ $3 == "home-manager" ]]; then
|
||||
# home-manager defaults to $XDG_STATE_HOME; otherwise, use
|
||||
# `home-manager generations` and `nix-store --query --roots
|
||||
# /nix/store/...` to figure out what reference is keeping the old
|
||||
# generations alive.
|
||||
profile="${XDG_STATE_HOME:-$HOME/.local/state}/nix/profiles/home-manager"
|
||||
elif [[ $3 == "channels" ]]; then
|
||||
profile="/nix/var/nix/profiles/per-user/$USER/channels"
|
||||
else
|
||||
printf "\nError: Do not understand your third argument. Should be one of: (user / home-manager/ channels)\n\n"
|
||||
usage
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
if [[ $3 == "system" ]]; then
|
||||
profile="/nix/var/nix/profiles/system"
|
||||
elif [[ $3 == "user" ]] || [[ $3 == "default" ]]; then
|
||||
profile="/nix/var/nix/profiles/default"
|
||||
else
|
||||
printf "\nError: Do not understand your third argument. Should be one of: (user / system)\n\n"
|
||||
usage
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
printf "OK! \t Keep Gens = $keepGens \t Keep Days = $keepDays\n\n"
|
||||
fi
|
||||
|
||||
printf "Operating on profile: \t $profile\n\n"
|
||||
|
||||
## Runs at the end, to decide whether to delete profiles that match chosen parameters.
|
||||
choose () {
|
||||
local default="$1"
|
||||
local prompt="$2"
|
||||
local answer
|
||||
|
||||
read -p "$prompt" answer
|
||||
[ -z "$answer" ] && answer="$default"
|
||||
|
||||
case "$answer" in
|
||||
[yY1] ) #printf "answered yes!\n"
|
||||
nix-env --delete-generations -p $profile ${!gens[@]}
|
||||
exit 0
|
||||
;;
|
||||
[nN0] ) printf "Ok doing nothing exiting..\n"
|
||||
exit 6;
|
||||
;;
|
||||
* ) printf "%b" "Unexpected answer '$answer'!" >&2
|
||||
exit 7;
|
||||
;;
|
||||
esac
|
||||
} # end of function choose
|
||||
|
||||
# printf "profile = $profile\n\n"
|
||||
## Query nix-env for generations list
|
||||
IFS=$'\n' nixGens=( $(nix-env --list-generations -p $profile | sed 's:^\s*::; s:\s*$::' | tr '\t' ' ' | tr -s ' ') )
|
||||
timeNow=$(date +%s)
|
||||
|
||||
## Get info on oldest generation
|
||||
IFS=' ' read -r -a oldestGenArr <<< "${nixGens[0]}"
|
||||
oldestGen=${oldestGenArr[0]}
|
||||
oldestDate=${oldestGenArr[1]}
|
||||
printf "%-30s %s\n" "oldest generation:" $oldestGen
|
||||
#oldestDate=${nixGens[0]:3:19}
|
||||
printf "%-30s %s\n" "oldest generation created:" $oldestDate
|
||||
oldestTime=$(date -d "$oldestDate" +%s)
|
||||
oldestElapsedSecs=$((timeNow-oldestTime))
|
||||
oldestElapsedMins=$((oldestElapsedSecs/60))
|
||||
oldestElapsedHours=$((oldestElapsedMins/60))
|
||||
oldestElapsedDays=$((oldestElapsedHours/24))
|
||||
printf "%-30s %s\n" "minutes before now:" $oldestElapsedMins
|
||||
printf "%-30s %s\n" "hours before now:" $oldestElapsedHours
|
||||
printf "%-30s %s\n\n" "days before now:" $oldestElapsedDays
|
||||
|
||||
## Get info on current generation
|
||||
for i in "${nixGens[@]}"; do
|
||||
IFS=' ' read -r -a iGenArr <<< "$i"
|
||||
genNumber=${iGenArr[0]}
|
||||
genDate=${iGenArr[1]}
|
||||
if [[ "$i" =~ current ]]; then
|
||||
currentGen=$genNumber
|
||||
printf "%-30s %s\n" "current generation:" $currentGen
|
||||
currentDate=$genDate
|
||||
printf "%-30s %s\n" "current generation created:" $currentDate
|
||||
currentTime=$(date -d "$currentDate" +%s)
|
||||
currentElapsedSecs=$((timeNow-currentTime))
|
||||
currentElapsedMins=$((currentElapsedSecs/60))
|
||||
currentElapsedHours=$((currentElapsedMins/60))
|
||||
currentElapsedDays=$((currentElapsedHours/24))
|
||||
printf "%-30s %s\n" "minutes before now:" $currentElapsedMins
|
||||
printf "%-30s %s\n" "hours before now:" $currentElapsedHours
|
||||
printf "%-30s %s\n\n" "days before now:" $currentElapsedDays
|
||||
fi
|
||||
done
|
||||
|
||||
## Compare oldest and current generations
|
||||
timeBetweenOldestAndCurrent=$((currentTime-oldestTime))
|
||||
elapsedDays=$((timeBetweenOldestAndCurrent/60/60/24))
|
||||
generationsDiff=$((currentGen-oldestGen))
|
||||
|
||||
## Figure out what we should do, based on generations and options
|
||||
if [[ elapsedDays -le keepDays ]]; then
|
||||
printf "All generations are no more than $keepDays days older than current generation. \nOldest gen days difference from current gen: $elapsedDays \n\n\tNothing to do!\n"
|
||||
exit 4;
|
||||
elif [[ generationsDiff -lt keepGens ]]; then
|
||||
printf "Oldest generation ($oldestGen) is only $generationsDiff generations behind current ($currentGen). \n\n\t Nothing to do!\n"
|
||||
exit 5;
|
||||
else
|
||||
printf "\tSomething to do...\n"
|
||||
declare -a gens
|
||||
for i in "${nixGens[@]}"; do
|
||||
IFS=' ' read -r -a iGenArr <<< "$i"
|
||||
genNumber=${iGenArr[0]}
|
||||
genDiff=$((currentGen-genNumber))
|
||||
genDate=${iGenArr[1]}
|
||||
genTime=$(date -d "$genDate" +%s)
|
||||
elapsedSecs=$((timeNow-genTime))
|
||||
genDaysOld=$((elapsedSecs/60/60/24))
|
||||
if [[ genDaysOld -gt keepDays ]] && [[ genDiff -ge keepGens ]]; then
|
||||
gens["$genNumber"]="$genDate, $genDaysOld day(s) old"
|
||||
fi
|
||||
done
|
||||
printf "\nFound the following generation(s) to delete:\n"
|
||||
for K in "${!gens[@]}"; do
|
||||
printf "generation $K \t ${gens[$K]}\n"
|
||||
done
|
||||
printf "\n"
|
||||
choose "y" "Do you want to delete these? [Y/n]: "
|
||||
fi
|
30
.config/ags/scripts/sway/executable_swayToRelativeWs.sh
Normal file
30
.config/ags/scripts/sway/executable_swayToRelativeWs.sh
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Check if sway is running
|
||||
if ! pgrep -x sway > /dev/null; then
|
||||
echo "Sway is not running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Get the current workspace number
|
||||
current=$(swaymsg -t get_workspaces | gojq '.[] | select(.focused==true) | .num')
|
||||
|
||||
# Check if a number was passed as an argument
|
||||
if [[ "$1" =~ ^[+-]?[0-9]+$ ]]; then
|
||||
new_workspace=$((current + $1))
|
||||
else
|
||||
new_workspace=$((current + 1))
|
||||
fi
|
||||
|
||||
# Check if the new workspace number is out of bounds
|
||||
if [[ $new_workspace -lt 1 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Switch to the new workspace
|
||||
if [[ $2 == 'move' ]]; then
|
||||
swaymsg move container to workspace $new_workspace
|
||||
else
|
||||
swaymsg workspace $new_workspace
|
||||
fi
|
21
.config/ags/scripts/templates/fuzzel/fuzzel.ini
Normal file
21
.config/ags/scripts/templates/fuzzel/fuzzel.ini
Normal file
|
@ -0,0 +1,21 @@
|
|||
font=Gabarito
|
||||
terminal=foot -e
|
||||
prompt=">> "
|
||||
layer=overlay
|
||||
|
||||
[colors]
|
||||
background={{ $background }}ff
|
||||
text={{ $onBackground }}ff
|
||||
selection={{ $surfaceVariant }}ff
|
||||
selection-text={{ $onSurfaceVariant }}ff
|
||||
border={{ $surfaceVariant }}ff
|
||||
match={{ $primary }}ff
|
||||
selection-match={{ $primary }}ff
|
||||
|
||||
|
||||
[border]
|
||||
radius=17
|
||||
width=2
|
||||
|
||||
[dmenu]
|
||||
exit-immediately-if-empty=yes
|
144
.config/ags/scripts/templates/gradience/preset.json
Normal file
144
.config/ags/scripts/templates/gradience/preset.json
Normal file
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
"name": "Material3_Generated",
|
||||
"variables": {
|
||||
"theme_fg_color": "#AEE5FA",
|
||||
"theme_text_color": "#AEE5FA",
|
||||
"theme_bg_color": "#1a1b26",
|
||||
"theme_base_color": "#1a1b26",
|
||||
"theme_selected_bg_color": "#AEE5FA",
|
||||
"theme_selected_fg_color": "rgba(0, 0, 0, 0.87)",
|
||||
"insensitive_bg_color": "#1a1b26",
|
||||
"insensitive_fg_color": "rgba(192, 202, 245, 0.5)",
|
||||
"insensitive_base_color": "#24283b",
|
||||
"theme_unfocused_fg_color": "#AEE5FA",
|
||||
"theme_unfocused_text_color": "#c0caf5",
|
||||
"theme_unfocused_bg_color": "#1a1b26",
|
||||
"theme_unfocused_base_color": "#1a1b26",
|
||||
"theme_unfocused_selected_bg_color": "#a9b1d6",
|
||||
"theme_unfocused_selected_fg_color": "rgba(0, 0, 0, 0.87)",
|
||||
"unfocused_insensitive_color": "rgba(192, 202, 245, 0.5)",
|
||||
"borders": "rgba(192, 202, 245, 0.12)",
|
||||
"unfocused_borders": "rgba(192, 202, 245, 0.12)",
|
||||
"warning_color": "#FDD633",
|
||||
"error_color": "#BA1B1B",
|
||||
"success_color": "#81C995",
|
||||
"wm_title": "#AEE5FA",
|
||||
"wm_unfocused_title": "rgba(192, 202, 245, 0.7)",
|
||||
"wm_highlight": "rgba(192, 202, 245, 0.1)",
|
||||
"wm_bg": "#1a1b26",
|
||||
"wm_unfocused_bg": "#1a1b26",
|
||||
"wm_button_close_icon": "#1a1b26",
|
||||
"wm_button_close_hover_bg": "#a9b1d6",
|
||||
"wm_button_close_active_bg": "#c7c7c7",
|
||||
"content_view_bg": "#1a1b26",
|
||||
"placeholder_text_color": "silver",
|
||||
"text_view_bg": "#1d1d1d",
|
||||
"budgie_tasklist_indicator_color": "#90D1F6",
|
||||
"budgie_tasklist_indicator_color_active": "#90D1F6",
|
||||
"budgie_tasklist_indicator_color_active_window": "#999999",
|
||||
"budgie_tasklist_indicator_color_attention": "#FDD633",
|
||||
"STRAWBERRY_100": "#FF9262",
|
||||
"STRAWBERRY_300": "#FF793E",
|
||||
"STRAWBERRY_500": "#F15D22",
|
||||
"STRAWBERRY_700": "#CF3B00",
|
||||
"STRAWBERRY_900": "#AC1800",
|
||||
"ORANGE_100": "#FFDB91",
|
||||
"ORANGE_300": "#FFCA40",
|
||||
"ORANGE_500": "#FAA41A",
|
||||
"ORANGE_700": "#DE8800",
|
||||
"ORANGE_900": "#C26C00",
|
||||
"BANANA_100": "#FFFFA8",
|
||||
"BANANA_300": "#FFFA7D",
|
||||
"BANANA_500": "#FFCE51",
|
||||
"BANANA_700": "#D1A023",
|
||||
"BANANA_900": "#A27100",
|
||||
"LIME_100": "#A2F3BE",
|
||||
"LIME_300": "#8ADBA6",
|
||||
"LIME_500": "#73C48F",
|
||||
"LIME_700": "#479863",
|
||||
"LIME_900": "#1C6D38",
|
||||
"BLUEBERRY_100": "#94A6FF",
|
||||
"BLUEBERRY_300": "#6A7CE0",
|
||||
"BLUEBERRY_500": "#3F51B5",
|
||||
"BLUEBERRY_700": "#213397",
|
||||
"BLUEBERRY_900": "#031579",
|
||||
"GRAPE_100": "#D25DE6",
|
||||
"GRAPE_300": "#B84ACB",
|
||||
"GRAPE_500": "#9C27B0",
|
||||
"GRAPE_700": "#830E97",
|
||||
"GRAPE_900": "#6A007E",
|
||||
"COCOA_100": "#9F9792",
|
||||
"COCOA_300": "#7B736E",
|
||||
"COCOA_500": "#574F4A",
|
||||
"COCOA_700": "#463E39",
|
||||
"COCOA_900": "#342C27",
|
||||
"SILVER_100": "#EEE",
|
||||
"SILVER_300": "#CCC",
|
||||
"SILVER_500": "#AAA",
|
||||
"SILVER_700": "#888",
|
||||
"SILVER_900": "#666",
|
||||
"SLATE_100": "#888",
|
||||
"SLATE_300": "#666",
|
||||
"SLATE_500": "#444",
|
||||
"SLATE_700": "#222",
|
||||
"SLATE_900": "#111",
|
||||
"BLACK_100": "#474341",
|
||||
"BLACK_300": "#403C3A",
|
||||
"BLACK_500": "#393634",
|
||||
"BLACK_700": "#33302F",
|
||||
"BLACK_900": "#2B2928",
|
||||
"accent_bg_color": "{{ $primary }}",
|
||||
"accent_fg_color": "{{ $onPrimary }}",
|
||||
"accent_color": "{{ $primary }}",
|
||||
"destructive_bg_color": "{{ $error }}",
|
||||
"destructive_fg_color": "{{ $onError }}",
|
||||
"destructive_color": "{{ $error }}",
|
||||
"success_bg_color": "#81C995",
|
||||
"success_fg_color": "rgba(0, 0, 0, 0.87)",
|
||||
"warning_bg_color": "#FDD633",
|
||||
"warning_fg_color": "rgba(0, 0, 0, 0.87)",
|
||||
"error_bg_color": "{{ $error }}",
|
||||
"error_fg_color": "{{ $onError }}",
|
||||
"window_bg_color": "{{ $background }}",
|
||||
"window_fg_color": "{{ $onBackground }}",
|
||||
"view_bg_color": "{{ $surface }}",
|
||||
"view_fg_color": "{{ $onSurface }}",
|
||||
"headerbar_bg_color": "mix(@dialog_bg_color, @window_bg_color, 0.5)",
|
||||
"headerbar_fg_color": "{{ $onSecondaryContainer }}",
|
||||
"headerbar_border_color": "{{ $secondaryContainer }}",
|
||||
"headerbar_backdrop_color": "@headerbar_bg_color",
|
||||
"headerbar_shade_color": "rgba(0, 0, 0, 0.09)",
|
||||
"card_bg_color": "{{ $background }}",
|
||||
"card_fg_color": "{{ $onSecondaryContainer }}",
|
||||
"card_shade_color": "rgba(0, 0, 0, 0.09)",
|
||||
"dialog_bg_color": "{{ $secondaryContainer }}",
|
||||
"dialog_fg_color": "{{ $onSecondaryContainer }}",
|
||||
"popover_bg_color": "{{ $secondaryContainer }}",
|
||||
"popover_fg_color": "{{ $onSecondaryContainer }}",
|
||||
"thumbnail_bg_color": "#1a1b26",
|
||||
"thumbnail_fg_color": "#AEE5FA",
|
||||
"shade_color": "rgba(0, 0, 0, 0.36)",
|
||||
"scrollbar_outline_color": "rgba(0, 0, 0, 0.5)",
|
||||
|
||||
"sidebar_bg_color": "@window_bg_color",
|
||||
"sidebar_fg_color":"@window_fg_color",
|
||||
"sidebar_border_color": "@sidebar_bg_color",
|
||||
"sidebar_backdrop_color": "@sidebar_bg_color"
|
||||
},
|
||||
"palette": {
|
||||
"blue_": {},
|
||||
"green_": {},
|
||||
"yellow_": {},
|
||||
"orange_": {},
|
||||
"red_": {},
|
||||
"purple_": {},
|
||||
"brown_": {},
|
||||
"light_": {},
|
||||
"dark_": {}
|
||||
},
|
||||
"custom_css": {
|
||||
"gtk4": "",
|
||||
"gtk3": ""
|
||||
},
|
||||
"plugins": {}
|
||||
}
|
34
.config/ags/scripts/templates/hypr/hyprland/colors.conf
Normal file
34
.config/ags/scripts/templates/hypr/hyprland/colors.conf
Normal file
|
@ -0,0 +1,34 @@
|
|||
# exec = export SLURP_ARGS='-d -c {{ $onSecondaryContainer }}BB -b {{ $secondaryContainer }}44 -s 00000000'
|
||||
|
||||
general {
|
||||
col.active_border = rgba({{ $onSurface }}39)
|
||||
col.inactive_border = rgba({{ $outline }}30)
|
||||
}
|
||||
|
||||
misc {
|
||||
background_color = rgba({{ $surface }}FF)
|
||||
}
|
||||
|
||||
plugin {
|
||||
hyprbars {
|
||||
# Honestly idk if it works like css, but well, why not
|
||||
bar_text_font = Rubik, Geist, AR One Sans, Reddit Sans, Inter, Roboto, Ubuntu, Noto Sans, sans-serif
|
||||
bar_height = 30
|
||||
bar_padding = 10
|
||||
bar_button_padding = 5
|
||||
bar_precedence_over_border = true
|
||||
bar_part_of_window = true
|
||||
|
||||
bar_color = rgba({{ $background }}FF)
|
||||
col.text = rgba({{ $onBackground }}FF)
|
||||
|
||||
|
||||
# example buttons (R -> L)
|
||||
# hyprbars-button = color, size, on-click
|
||||
hyprbars-button = rgb({{ $onBackground }}), 13, , hyprctl dispatch killactive
|
||||
hyprbars-button = rgb({{ $onBackground }}), 13, , hyprctl dispatch fullscreen 1
|
||||
hyprbars-button = rgb({{ $onBackground }}), 13, , hyprctl dispatch movetoworkspacesilent special
|
||||
}
|
||||
}
|
||||
|
||||
windowrulev2 = bordercolor rgba({{ $primary }}AA) rgba({{ $primary }}77),pinned:1
|
97
.config/ags/scripts/templates/hypr/hyprlock.conf
Normal file
97
.config/ags/scripts/templates/hypr/hyprlock.conf
Normal file
|
@ -0,0 +1,97 @@
|
|||
$text_color = rgba({{ $onBackground }}FF)
|
||||
$entry_background_color = rgba({{ $background }}11)
|
||||
$entry_border_color = rgba({{ $outline }}55)
|
||||
$entry_color = rgba({{ $onSurfaceVariant }}FF)
|
||||
$font_family = Gabarito
|
||||
$font_family_clock = Gabarito
|
||||
$font_material_symbols = Material Symbols Rounded
|
||||
|
||||
background {
|
||||
color = rgba({{ $background }}77)
|
||||
# path = {{ SWWW_WALL }}
|
||||
path = screenshot
|
||||
blur_size = 5
|
||||
blur_passes = 4
|
||||
}
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 50
|
||||
outline_thickness = 2
|
||||
dots_size = 0.1
|
||||
dots_spacing = 0.3
|
||||
outer_color = $entry_border_color
|
||||
inner_color = $entry_background_color
|
||||
font_color = $entry_color
|
||||
# fade_on_empty = true
|
||||
|
||||
position = 0, 20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label { # Clock
|
||||
monitor =
|
||||
text = $TIME
|
||||
shadow_passes = 1
|
||||
shadow_boost = 0.5
|
||||
color = $text_color
|
||||
font_size = 65
|
||||
font_family = $font_family_clock
|
||||
|
||||
position = 0, 300
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
label { # Greeting
|
||||
monitor =
|
||||
text = hi $USER !!!
|
||||
shadow_passes = 1
|
||||
shadow_boost = 0.5
|
||||
color = $text_color
|
||||
font_size = 20
|
||||
font_family = $font_family
|
||||
|
||||
position = 0, 240
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
label { # lock icon
|
||||
monitor =
|
||||
text = lock
|
||||
shadow_passes = 1
|
||||
shadow_boost = 0.5
|
||||
color = $text_color
|
||||
font_size = 21
|
||||
font_family = $font_material_symbols
|
||||
|
||||
position = 0, 65
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
label { # "locked" text
|
||||
monitor =
|
||||
text = locked
|
||||
shadow_passes = 1
|
||||
shadow_boost = 0.5
|
||||
color = $text_color
|
||||
font_size = 14
|
||||
font_family = $font_family
|
||||
|
||||
position = 0, 50
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label { # Status
|
||||
monitor =
|
||||
text = cmd[update:5000] ~/.config/hypr/hyprlock/status.sh
|
||||
shadow_passes = 1
|
||||
shadow_boost = 0.5
|
||||
color = $text_color
|
||||
font_size = 14
|
||||
font_family = $font_family
|
||||
|
||||
position = 30, -30
|
||||
halign = left
|
||||
valign = top
|
||||
}
|
1
.config/ags/scripts/templates/terminal/sequences.txt
Normal file
1
.config/ags/scripts/templates/terminal/sequences.txt
Normal file
|
@ -0,0 +1 @@
|
|||
]4;0;#$background #\]4;1;#$error #\]4;2;#$secondaryContainer #\]4;3;#$onSecondaryContainer #\]4;4;#$onSecondaryContainer #\]4;5;#$onSecondaryContainer #\]4;6;#$onSecondaryContainer #\]4;7;#$onSurfaceVariant #\]4;8;#$onSurfaceVariant #\]4;9;#$error #\]4;10;#$secondaryContainer #\]4;11;#$onSecondaryContainer #\]4;12;#$onSecondaryContainer #\]4;13;#$onSecondaryContainer #\]4;14;#$onSecondaryContainer #\]4;15;#$onSurfaceVariant #\]10;#$onSurfaceVariant #\]11;[$alpha]#$background #\]12;#$onSurfaceVariant #\]13;#$onSurfaceVariant #\]17;#$onSurfaceVariant #\]19;#$background #\]4;232;#$onSurfaceVariant #\]4;256;#$onSurfaceVariant #\]708;[$alpha]#$background #\
|
Loading…
Add table
Add a link
Reference in a new issue