ags: sync

This commit is contained in:
end-4
2024-01-25 22:25:27 +07:00
parent ed24fe4ae3
commit 7e73e24dd8
64 changed files with 2674 additions and 1723 deletions
@@ -134,7 +134,7 @@ apply_gtk() { # Using gradience-cli
# (which is unreadable when broken when you use dark mode)
if [ "$lightdark" = "-l" ]; then
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'
gsettings set org.gnome.desktop.interface color-scheme 'default'
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'
@@ -34,6 +34,7 @@ elif len(sys.argv) > 1 and sys.argv[1] == '--color':
newtheme = themeFromSourceColor(argbFromHex(colorstr))
else:
# try:
# imagePath = subprocess.check_output("ags run-js 'wallpaper.get(0)'", shell=True)
imagePath = subprocess.check_output("swww query | awk -F 'image: ' '{print $2}'", shell=True)
imagePath = imagePath[:-1].decode("utf-8")
img = Image.open(imagePath)
@@ -1,16 +1,15 @@
#!/usr/bin/bash
# Switches swww wallpaper
# Requires: coreutils, xrandr, hyprland
if [ "$1" == "--noswitch" ]; then
imgpath=$(swww query | 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')
screensizey=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2 | head -1)
cursorposx=$(hyprctl cursorpos -j | gojq '.x')
cursorposy=$(hyprctl cursorpos -j | gojq '.y')
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
@@ -18,8 +17,9 @@ else
exit 0
fi
echo Sending "$imgpath" to swww. Cursor pos: ["$cursorposx, $cursorposy_inverted"]
# Change swww wallpaper
# 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"
+4 -4
View File
@@ -5,7 +5,10 @@ getdate() {
}
cd ~/Videos || exit
if [[ "$(pidof wf-recorder)" == "" ]]; then
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=alsa_output.pci-0000_08_00.6.analog-stereo.monitor & disown
@@ -16,7 +19,4 @@ if [[ "$(pidof wf-recorder)" == "" ]]; then
else
wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" & disown
fi
else
kill --signal SIGINT wf-recorder
notify-send "Recording Stopped" "Stopped" -a 'record-script.sh'
fi
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# 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
+3 -26
View File
@@ -1,19 +1,9 @@
# -*- conf -*-
shell=fish
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
term=xterm-256color
# login-shell=no
# app-id=foot
title=foot
# locked-title=no
font=SpaceMono Nerd Font:size=11
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# line-height=<font metrics>
letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
@@ -34,17 +24,8 @@ bold-text-in-bright=no
# selection-target=primary
# workers=<number of logical CPUs>
[bell]
# urgent=no
# notify=no
# command=
# command-focused=no
[scrollback]
lines=10000
# multiplier=3.0
# indicator-position=relative
# indicator-format=
[url]
# launch=xdg-open ${url}
@@ -55,15 +36,11 @@ lines=10000
[cursor]
style=beam
# color=111111 dcdccc
color=$background # $onBackground #
# blink=no
beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[colors]
alpha=1
@@ -122,10 +99,10 @@ search-start=Control+f
# show-urls-copy=none
[search-bindings]
# cancel=Control+g Control+c Escape
cancel=Escape
find-prev=Shift+F3
find-next=F3 Control+G
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
@@ -87,9 +87,9 @@
"BLACK_500": "#393634",
"BLACK_700": "#33302F",
"BLACK_900": "#2B2928",
"accent_bg_color": "#51d7ef",
"accent_fg_color": "#00363f",
"accent_color": "#51d7ef",
"accent_bg_color": "#e4b5ff",
"accent_fg_color": "#471868",
"accent_color": "#e4b5ff",
"destructive_bg_color": "#ffb4a9",
"destructive_fg_color": "#680003",
"destructive_color": "#ffb4a9",
@@ -99,22 +99,22 @@
"warning_fg_color": "rgba(0, 0, 0, 0.87)",
"error_bg_color": "#ffb4a9",
"error_fg_color": "#680003",
"window_bg_color": "#0F1011",
"window_fg_color": "#e1e3e4",
"view_bg_color": "#191c1d",
"view_fg_color": "#e1e3e4",
"window_bg_color": "#111012",
"window_fg_color": "#e7e0e5",
"view_bg_color": "#1d1b1e",
"view_fg_color": "#e7e0e5",
"headerbar_bg_color": "mix(@dialog_bg_color, @window_bg_color, 0.5)",
"headerbar_fg_color": "#cde7ed",
"headerbar_border_color": "#334a4f",
"headerbar_fg_color": "#eedcf5",
"headerbar_border_color": "#4f4256",
"headerbar_backdrop_color": "@headerbar_bg_color",
"headerbar_shade_color": "rgba(0, 0, 0, 0.09)",
"card_bg_color": "#0F1011",
"card_fg_color": "#cde7ed",
"card_bg_color": "#111012",
"card_fg_color": "#eedcf5",
"card_shade_color": "rgba(0, 0, 0, 0.09)",
"dialog_bg_color": "#334a4f",
"dialog_fg_color": "#cde7ed",
"popover_bg_color": "#334a4f",
"popover_fg_color": "#cde7ed",
"dialog_bg_color": "#4f4256",
"dialog_fg_color": "#eedcf5",
"popover_bg_color": "#4f4256",
"popover_fg_color": "#eedcf5",
"thumbnail_bg_color": "#1a1b26",
"thumbnail_fg_color": "#AEE5FA",
"shade_color": "rgba(0, 0, 0, 0.36)",