diff --git a/.gitignore b/.gitignore index 8ed9d74..f4aefec 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ epdfview btop xpra psysh +zoom* diff --git a/MangoHud/MangoHud.conf b/MangoHud/MangoHud.conf index ef29a01..7dab9d8 100644 --- a/MangoHud/MangoHud.conf +++ b/MangoHud/MangoHud.conf @@ -7,9 +7,11 @@ round_corners=0 background_alpha=0.6 background_color=000000 -font_size=20 +font_size=22 text_color=FFFFFF position=top-left +toggle_hud=Shift_R+F12 + table_columns=4 gpu_text=780M gpu_stats @@ -27,15 +29,18 @@ ram ram_color=C26693 fps fps_limit_method=late +toggle_fps_limit=Shift_L+F1 fps_limit=0 -vsync=0 -gl_vsync=0 +vsync=3 +gl_vsync=-1 af=0 picmip=0 + output_folder=/home/tanveer log_duration=30 autostart_log=0 log_interval=100 +toggle_logging==Shift_L+F2 diff --git a/eww/eww.scss b/eww/eww.scss index e0aae2f..9ab9003 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -66,7 +66,7 @@ .lyrics { color: #EBCB8B; margin : -10px 0px 0px 0px; - font-family: IBM Plex Sans Text; + font-family: IBM Plex Sans; font-size : 18px; } .music_bar { diff --git a/eww/eww.yuck b/eww/eww.yuck index 94704e1..b021f3d 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -43,7 +43,7 @@ :y "50" :width "30%" :height "40px" - :anchor "bottom left") + :anchor "bottom right") :stacking "bg" :reserve (struts :distance "10px" :side "bottom") :windowtype "dock" @@ -56,7 +56,7 @@ :y "50" :width "30%" :height "40px" - :anchor "bottom left") + :anchor "bottomleft") :stacking "bg" :reserve (struts :distance "10px" :side "bottom") :windowtype "dock" @@ -70,9 +70,7 @@ (defwidget music [] (box :class "genwin" :orientation "h" :spacing 50 :space-evenly "false" :vexpand "false" :hexpand "false" - (box :class "box_art" :vexpand "false" :hexpand "false" - (circular-progress :class "music_bar" :value CURRENT :thickness 10 :clockwise true :start-at "${(CURRENT+75)%100}" - (image :path "${song.cover}" :image-height 270 :image-width 270))) + (box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false" (label :tooltip "${song.name}" :halign "center" :class "song" :wrap "false" :limit-width 32 :text "${song.name}") (label :halign "center" :class "artist" :wrap "false" :limit-width 20 :text "${song.artist}") @@ -82,4 +80,7 @@ (button :class "btn_play" :onclick "./script play_toggle" STATUS) (button :class "btn_controls" :tooltip "Seek +1%" :onclick "./script seek '1'" "") (button :class "btn_controls" :tooltip "Upcoming : ${song.next}" :onclick "./script next" "󰒭")) - (label :wrap "true" :class "lyrics" :text LYRICS)))) + (label :wrap "true" :class "lyrics" :text LYRICS)) + (box :class "box_art" :vexpand "false" :hexpand "false" + (circular-progress :class "music_bar" :value CURRENT :thickness 10 :clockwise true :start-at "${(CURRENT+75)%100}" + (image :path "${song.cover}" :image-height 270 :image-width 270))))) diff --git a/hypr/brightness b/hypr/brightness new file mode 100755 index 0000000..215a3e6 --- /dev/null +++ b/hypr/brightness @@ -0,0 +1,52 @@ +#!/bin/sh + +########################################################################################## +# NOTE: you need to be member of "video" group or maybe "input" group for this to work.. # +########################################################################################## + +######## +# MAIN # +######## + +# dir where the backlight component resides.. +root_dir="/sys/class/backlight" + +######################################################################### +# brighness directory can be different per device, check above root_dir # +######################################################################### +#for intel +#backlight_dir="intel_backlight0" + +#for acpi (generic) +#backlight_dir="acpi_backlight0" + +#for amd +backlight_dir="amdgpu_bl1" + +#file read +brightness_file="$root_dir/$backlight_dir/brightness" +current=$(cat "$brightness_file") +max=$(cat "$root_dir/$backlight_dir/max_brightness") + +#runtime values +opr=$1 # [+|-], required +increment=${2:-5} # [ default:5, optional] "around 2% brightness" + +#shellcheck disable=SC2004 +[ "$opr" = "s" ] && printf "%s" "$((${current}00/${max}))" && exit 0 + +#validation +(! printf '%s' "$opr" | grep -qE '[+-]') && notify-send -u critical "Unknown Operator, use only + or -" && exit 1 + +#shellcheck disable=SC2086,SC1102 +new="$(( $current $opr $increment ))" + +#constraints +[ "$new" -ge "$max" ] && new=$max +[ "$new" -le 0 ] && new=0 + +#new brightness value +printf '%s' "$new" > "$brightness_file" + +#shellcheck disable=SC2004 +notify-send -i "lol" "☀️ $((${new}00/${max}))" -t 1000 -h "string:x-canonical-private-synchronous:${0##*/}" diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 6230fae..ff10ce4 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,15 +1,32 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,highrr,auto,1.6,bitdepth,10 -#monitor=,2880x1800@120,auto,1.6,bitdepth,10 +monitor=,highrr,auto,1.5,bitdepth,10 +#monitor=,2880x1800@120.000999,auto,1.5,bitdepth,10 $hypr_dir="$HOME/.config/hypr" $accent=D81860 #envs -env = XDG_SESSION_TYPE,wayland -env = WLR_NO_HARDWARE_CURSORS,1 +env = BROWSER,google-chrome-stable +env = EDITOR,nvim +env = GDK_BACKEND,wayland,x11 +env = GDK_SCALE,2 #xwayland fractional scaling +env = GTK_THEME,Materia-dark env = GLOBAL_ACCENT,$accent - +env = IMAGE,nsxiv +env = LIBSEAT_BACKEND,logind +env = MOZ_ENABLE_WAYLAND,1 +env = OPENER,xdg-open +env = QT_QPA_PLATFORMTHEME,qt5ct +env = QT_QPA_PLATFORM,wayland +env = SDL_VIDEODRIVER,wayland +env = TERMINAL,foot +env = VIDEO,mpv +env = VISUAL,nvim +env = WLR_NO_HARDWARE_CURSORS,1 +env = WM,hyprland +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland # See https://wiki.hyprland.org/Configuring/Keywords/ for more # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ @@ -87,6 +104,11 @@ gestures { misc { force_default_wallpaper = 0 vfr = 1 + vrr = 2 +} + +xwayland { + force_zero_scaling = false } # See https://wiki.hyprland.org/Configuring/Keywords/ for more @@ -164,11 +186,11 @@ binde=, XF86AudioRaiseVolume, exec, pamixer --set-limit 140 --allow-boost -i 2 & binde=, XF86AudioMute, exec, pamixer --set-limit 140 --allow-boost -t && $hypr_dir/volume binde=, XF86AudioPlay, exec, echo cycle pause | socat - "/tmp/yt-music/yt-music-mpvsocket" binde=, XF86AudioPause, exec, echo cycle pause | socat - "/tmp/yt-music/yt-music-mpvsocket" -binde=$mainMod, F10, exec, $HOME/repos_scripts/yt-music search_play +binde= $mainMod, F10, exec, $HOME/repos_scripts/yt-music search_play binde=, XF86AudioNext, exec, $HOME/repos_scripts/yt-music play_next binde=, XF86AudioPrev, exec, $HOME/repos_scripts/yt-music play_next menu -binde=, XF86MonBrightnessDown, exec, light -U 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -h "string:x-canonical-private-synchronous:brightness" -binde=, XF86MonBrightnessUp, exec, light -A 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -h "string:x-canonical-private-synchronous:brightness" +binde=, XF86MonBrightnessUp, exec, $hypr_dir/brightness '+' +binde=, XF86MonBrightnessDown, exec, $hypr_dir/brightness '-' #windows rules windowrulev2=workspace 1,class:^(google-chrome)$ @@ -179,16 +201,19 @@ windowrulev2=workspace 4,class:^(pavucontrol)$ windowrulev2=workspace 4,class:^(org.freedesktop.Xwayland)$ windowrulev2=fullscreen,class:^(org.freedesktop.Xwayland)$ windowrulev2=workspace 4,class:^(virt-manager)$ -windowrulev2 = bordercolor rgba(64f2a4FF), xwayland: 1 +windowrulev2=bordercolor rgba(64f2a4FF), xwayland: 1 + +#workspace rules +workspace = 1, on-created-empty:google-chrome-stable +workspace = 2, on-created-empty:foot #startup applications exec-once=dbus-update-activation-environment --systemd --all exec-once=ssh-agent exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once=node $HOME/github/arrpc/src > /tmp/arrpc-log -exec-once=swaybg -i $HOME/.config/wall/9.png +exec-once=swaybg -i $HOME/.config/wall/19.jpg -m fill exec-once=xrdb -merge $HOME/.config/.Xresource exec-once=$hypr_dir/workspace 'focus' exec-once=$hypr_dir/battery #exec-once=sleep 2 && $hypr_dir/workspace -exec-once=google-chrome-stable diff --git a/hypr/info b/hypr/info index 736383f..f0bc66f 100755 --- a/hypr/info +++ b/hypr/info @@ -1,20 +1,19 @@ #!/bin/sh -i=1 -mem_total=$(sed -nE 's_.*MemTotal:[[:space:]]*(.*) kB_\1_p' /proc/meminfo) -mem_total_mb=$((mem_total / 1024)) -while [ $i -le 5 ]; do - mem=$(sed -nE 's_.*Active:[[:space:]]*(.*) kB_\1_p' /proc/meminfo) - mem="$((mem / 1024))" - temp=$(cat /sys/class/thermal/thermal_zone0/temp) - temp=$((temp / 1000)) - bat_stats=$(cat /sys/class/power_supply/BAT0/status) - vol_stats=$(pamixer --get-mute) - charge=$(cat /sys/class/power_supply/BAT*/capacity) - [ "$bat_stats" = "Discharging" ] && bat_icon=🔋 || bat_icon=🔌 - [ "$bat_stats" = "Discharging" ] && [ "$charge" -lt 20 ] && bat_icon="🪫" - [ "$vol_stats" = "true" ] && vol_icon=🔇 || vol_icon=🔊 - notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem MB / $mem_total_mb MB\n$bat_icon Battery : $charge (${bat_stats})\n☀️ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 & - : $((i += 1)) - sleep 1 +top -ibn5 -d1 | while read -r line;do + new_cpu=$(printf "%s" "$line" | sed -nE 's_%Cpu\(s\):[[:space:]]*(.*) us,.*_\1 %_p') + new_mem=$(printf "%s" "$line" | sed -nE 's_MiB Mem :[[:space:]]*(.*) total,.*,[[:space:]]*(.*) used,.*_\2 MB / \1 MB_p') + cpu=${new_cpu:-$cpu} + mem=${new_mem:-$mem} + if [ -n "$new_mem" ];then + + temp=$(cat /sys/class/thermal/thermal_zone0/temp) + : $((temp /= 1000)) + bat_stats=$(cat /sys/class/power_supply/BAT0/status) + vol_stats=$(pamixer --get-volume-human) + charge=$(cat /sys/class/power_supply/BAT0/capacity) + [ "$bat_stats" = "Discharging" ] && { [ "$charge" -lt 20 ] && bat_icon=🪫 || bat_icon=🔋 ;} || bat_icon=🔌 + [ "$vol_stats" = "muted" ] && vol_icon=🔇 || vol_icon=🔊 + notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀️ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $(cut -d ">" -f1 /tmp/yt-music/current 2>/dev/null | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 & + fi done diff --git a/hypr/rungame b/hypr/rungame index a47c794..3674439 100755 --- a/hypr/rungame +++ b/hypr/rungame @@ -12,4 +12,4 @@ gamename=$(basename "$game") notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "Launching $gamename" -RADV_PERFTEST=gpl DXVK_ASYNC=1 gamemoderun mangohud wine "$gamename" +WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 gamemoderun wine "$gamename" diff --git a/mpv/mpv.conf b/mpv/mpv.conf index a448fe0..94aed4d 100644 --- a/mpv/mpv.conf +++ b/mpv/mpv.conf @@ -1,4 +1,4 @@ -#hwdec=auto +hwdec=auto profile=gpu-hq gpu-context=wayland input-ipc-server=/tmp/mpvsocket diff --git a/wall/19.jpg b/wall/19.jpg new file mode 100644 index 0000000..662120e Binary files /dev/null and b/wall/19.jpg differ diff --git a/wall/9.png b/wall/9.png old mode 100755 new mode 100644 index 412036a..5ccfd3e Binary files a/wall/9.png and b/wall/9.png differ