diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml index b5fbd2f..099f389 100644 --- a/alacritty/alacritty.toml +++ b/alacritty/alacritty.toml @@ -1,13 +1,53 @@ -import = ["~/.config/alacritty/catppuccin/catppuccin-frappe.toml"] [cursor.style] shape = "Underline" +[env] +TERM = "xterm-256color" + [font] -size = 23 +size = 13 + +[colors] +footer_bar = { foreground = "#181818", background = "#d8d8d8" } [font.normal] -family = "Hack Nerd Font" +family = "HackNerdFont" + +[[keyboard.bindings]] +action = "ScrollPageUp" +key = "PageUp" +mode = "~Alt" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollPageDown" +key = "PageDown" +mode = "~Alt" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollToTop" +key = "Home" +mode = "~Alt" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollToBottom" +key = "End" +mode = "~Alt" +mods = "Shift" + +[terminal.shell] +args = ["--login"] +program = "/bin/zsh" [window] -opacity = 0.2 +opacity = 0.5 +padding = {x = 25, y = 25} + +[general] +import = ["/home/trianta/.config/alacritty/catppuccin/catppuccin-frappe.toml"] + +[terminal] + diff --git a/hypr/colorscheme.conf b/hypr/colorscheme.conf new file mode 100755 index 0000000..90504ef --- /dev/null +++ b/hypr/colorscheme.conf @@ -0,0 +1,37 @@ +# foreground +$fg = ebdbb2 +$fg0 = fbf1c7 +$fg1 = ebdbb2 +$fg2 = d5c4a1 +$fg3 = bdae93 +$fg4 = a89984 + +# background +$bg = 282828 +$bg0_h = 1d2021 +$bg0_s = 32302f +$bg1 = 3c3836 +$bg2 = 504945 +$bg3 = 665c54 +$bg4 = 7c6f64 + +# colors +$gray = a89984 +$red = cc241d +$green = 98971a +$yellow = d79921 +$blue = 458588 +$purple = b16286 +$aqua = 689d6a +$orange = d65d0e +$peach = fe640b + +# alternates +$alt_gray = 928374 +$alt_red = fb4934 +$alt_green = b8bb26 +$alt_yellow = fabd2f +$alt_blue = 83a598 +$alt_purple = d3869b +$alt_aqua = 8ec07c +$alt_orange = fe8019 diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 1aa01b0..6502112 100755 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,137 +1,444 @@ -# Monitor -monitor=,highrr,auto,1.00 +source = ~/.config/hypr/colorscheme.conf # Catppuccin colorscheme -# Startup -exec-once = hyprpaper -exec-once = waybar -c ~/.config/waybar/config.json -exec-once = pulseaudio -exec-once = linux-discord-rich-presence --config ~/.config/linux-discord-rich-presencerc -exec-once = syncthing --no-browser +# < Start Section > +# monitors -# Settings -input { - kb_layout = us - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 2 - - touchpad { - natural_scroll = no - } - - sensitivity = 0 +monitorv2 { + output = eDP-1 + mode = highrr + position = 0x0 # alt: 0x0 + bitdepth = 8 + cm = edid } +# HDMI port +monitorv2 { + output = + mode = highrr + position = 1920x0 # alt: 0x0 + scale = 1.00 + bitdepth = 8 + cm = edid +} + +# < End Section > + + + +# < Start Section > +# environment variables + +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland +env = MOZ_ENABLE_WAYLAND,1 +env = HYPRCURSOR_THEME, volantes +env = HYPRCURSOR_SIZE, 30 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_QPA_PLATFORM,wayland;xcb +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_QPA_PLATFORMTHEME,qt5ct + +#env = HYPRLAND_TRACE,1 +#env = AQ_TRACE,1 + +# < End Section > + + + +# < Start Section > +# startup applications + +# environment launches +exec-once = ~/.config/hypr/scripts/resetxdgportal.sh # reset XDPH for screenshare +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE +exec-once = dbus-update-activation-environment --systemd --all +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = /usr/lib/polkit-kde-authentication-agent-1 # authentication dialogue for GUI apps +exec-once = gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Mocha' +exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' +exec-once = sleep 1 && hyprpm reload +#exec-once = wayvnc --output=DP-3 0.0.0.0 + +# xrandr settings +#exec-once = ~/.config/hypr/scripts/xrandr.sh + +# background applications +exec-once = waybar -c ~/.config/waybar/config +exec-once = dunst +exec-once = swww-daemon +exec-once = syncthing --no-browser +#exec-once = xwaylandvideobridge +#exec-once = pulsemeeter + +# main applications +exec-once = thunderbird +#exec-once = obs +#exec-once = vesktop --ozone-platform-hint=auto --enable-webrtc-pipewire-capturer --enable-features=WaylandWindowDecorations +exec-once = commet +#exec-once = spotify +#exec-once = dopamine +exec-once = alacritty +exec-once = floorp +exec-once = env JAVA_HOME=/usr/lib/jvm/java-17-openjdk bolt > /tmp/bolt-launcher.log 2>&1 + +# obsidian planner +exec-once = ~/sync/obsidian/Trinote/create-week.sh + +# completion alert +# exec-once = sleep 5 && pw-play --volume=2.0 ~/.alert/finished.mp3 + +# first time lock +exec-once = hyprlock + +# < End Section > + + + +# < Start Section > +# workspace rules + +# smart gaps +#workspace = w[tv1], gapsout:25 725 25 725, gapsin:0 +workspace = w[tv1] r[4-5], gapsout:0 0 0 0, gapsin:0 + +# gaps numbers (top, right, bottom, left) +# Workspaces swapped for ease of use +workspace = 1, monitor:eDP-1, persistent:true, default:true +workspace = 2, monitor:eDP-1, persistent:true +workspace = 3, monitor:eDP-1, persistent:true +workspace = 4, monitor:eDP-1, persistent:true +workspace = 5, monitor:HDMI-A-1, persistent:true, gapsout:0 +workspace = 6, monitor:eDP-1, persistent:true + + +# < End Section > + + + +# < Start Section > +# variables + + general { - gaps_in = 5 - gaps_out = 10 - border_size = 0 - layout = dwindle + gaps_in = 5 + gaps_out = 20 + border_size = 3 + #col.active_border = rgb($yellow) + col.active_border = rgb($fg) + col.inactive_border = rgb($bg) + layout = dwindle + resize_on_border = false + allow_tearing = false } decoration { rounding = 10 - blur { - enabled = false - size = 3 - passes = 1 - } - drop_shadow = false - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) - active_opacity = 0.75 - inactive_opacity = 0.75 + rounding_power = 2 + + shadow { + enabled = true + range = 32 + render_power = 2 + color = rgba(00000050) + } + dim_special = 0.3 + fullscreen_opacity = 1.0 + + blur { + enabled = true + special = true + size = 3 + passes = 4 + new_optimizations = true + ignore_opacity = true + xray = true + vibrancy = 0.1696 + } } animations { - enabled = yes - animation = windows, 1, 8, default - animation = windowsOut, 1, 8, default - animation = border, 1, 8, default - animation = borderangle, 1, 8, default - animation = fade, 1, 8, default - animation = workspaces, 1, 8, default, slidefade 80% + enabled = true + + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = zoomFactor, 1, 7, quick } -dwindle { - pseudotile = yes - preserve_split = yes +input { + kb_layout = us + kb_options = caps:escape + follow_mouse = 2 + mouse_refocus = true + force_no_accel = 1 + touchpad { + natural_scroll = true + } } -master { - new_is_master = true -} - -gestures { - workspace_swipe = off +group { + col.border_active = rgba(ca9ee6ff) rgba(f2d5cfff) 45deg + col.border_inactive = rgba(b4befecc) rgba(6c7086cc) 45deg + col.border_locked_active = rgba(ca9ee6ff) rgba(f2d5cfff) 45deg + col.border_locked_inactive = rgba(b4befecc) rgba(6c7086cc) 45deg } misc { - vfr = true - disable_hyprland_logo = true - disable_splash_rendering = true - force_default_wallpaper = 0 + disable_hyprland_logo = true + disable_splash_rendering = true + force_default_wallpaper = 0 + vrr = 1 + vfr = true + middle_click_paste = false + render_unfocused_fps = 15 } -device:epic-mouse-v1 { - sensitivity = -0.5 +xwayland { + enabled = true + use_nearest_neighbor = true + force_zero_scaling = false } -# Window rules -windowrule = float, ^(SnakePlusPlus)$ -windowrule = center, ^(SnakePlusPlus)$ +cursor { + inactive_timeout = 2 + no_warps = false + persistent_warps = true + default_monitor = eDP-1 + warp_on_change_workspace = false +} -# General binds +debug { + disable_logs = true + #overlay + full_cm_proto = true +} + +render { + new_render_scheduling = true + direct_scanout = true +} + +# Disable touchscreen +device { + name = gxtp7386:00-27c6:011a + enabled = false +} + + +# < End Section > + + + +# < Start Section > +# master layout + +master { + new_status = master +} + +# < End Section > + + + +# < Start Section > +# dwindle layout + +dwindle { + pseudotile = true + preserve_split = true + smart_resizing = true +} + +# < End Section > + + + +# < Start Section > +# window rules + +# core +windowrule { + name = globals + match:class = ^(.*)$ + suppress_event = maximize fullscreen + render_unfocused = true + opacity = 0.75 0.75 + pseudo = false +} + +windowrule = match:workspace 1, float true +windowrule = match:workspace 2, float true +windowrule = match:class ^(qt5ct)$, float true +windowrule = match:class ^(nwg-look)$, float true +windowrule = match:class ^(pavucontrol)$, float true +windowrule = match:class ^(org.kde.polkit-kde-authentication-agent-1)$, float true +windowrule = match:class ^(org.speedcrunch.speedcrunch)$, float true + +# main +#windowrule = match:class ^(discord)$, workspace 1 silent +#windowrule = match:class ^(vesktop)$, workspace 1 silent +windowrule = match:class ^(chat.commet.commetapp)$, workspace 1 silent +windowrule = match:class ^(thunderbird)$, workspace 1 silent +windowrule = match:class ^(Dopamine)$, workspace 1 silent +windowrule = match:class ^(spotify)$, workspace 1 silent +windowrule = match:class ^(steam)$, workspace 6 silent + +# workspace 2 group +windowrule = match:class ^(floorp)$, workspace 3 silent +windowrule = match:class ^(floorp)$, tile true +windowrule = match:class ^(Alacritty)$, workspace 2 silent +windowrule = match:class ^(Alacritty)$, tile true +windowrule = match:class ^(net-runelite-client-RuneLite)$, opacity 1.00 override 1.00 override + +# tag games +windowrule = match:xdg_tag proton-game, tag +game +windowrule = match:title ^(Warframe)$, tag +game +windowrule = match:class ^(org.prismlauncher.PrismLauncher)$, tag +game +windowrule = match:class ^(Minecraft.*)$, tag +game +windowrule = match:class ^(steam_app_.*)$, tag +game +windowrule = match:class ^(steam_proton)$, tag +game +windowrule = match:class ^(cstrike_linux64)$, tag +game +windowrule = match:class ^(dota2)$, tag +game +windowrule = match:class ^(gamescope)$, tag +game +windowrule = match:class ^(wowclassic.exe)$, tag +game +windowrule = match:title ^(World of Warcraft)$, tag +game +windowrule = match:class ^(RuneScape)$, tag +game +#windowrule = match:class ^(bolt.*)$, tag +game +windowrule = match:class ^(Minecraft.*)$, tag +game +#windowrule = match:class ^(net-runelite-client-RuneLite)$, tag +game +# Runelite opacity likes to skip after login +windowrule = match:class ^(net-runelite-client-RuneLite)$, opacity 1.00 override 1.00 override + +windowrule { + name = games + match:tag = game + workspace = 4 silent + opacity = 1.00 override 1.00 override + float = true + no_initial_focus = true + suppress_event = maximize +} + +# layer rules +layerrule = match:namespace waybar, blur true +layerrule = match:namespace waybar, ignore_alpha 0 + +# xwaylandvideobridge +windowrule = match:class ^(xwaylandvideobridge)$, opacity 0.0 override +windowrule = match:class ^(xwaylandvideobridge)$, no_anim true +windowrule = match:class ^(xwaylandvideobridge)$, no_initial_focus true +windowrule = match:class ^(xwaylandvideobridge)$, max_size 1 1 +windowrule = match:class ^(xwaylandvideobridge)$, no_blur true + +# < End Section > + + + +# < Start Section > +# keybinds + +# main modifier $mainMod = SUPER -bind = $mainMod, RETURN, exec, alacritty -bind = $mainMod SHIFT, P, pseudo + +# passthrough +#bind = , mouse:275, pass, class:^(discord)$ +#bind = , mouse:275, sendshortcut, ALT, V, class:^(vesktop)$ +#bind = SHIFT, mouse:275, sendshortcut, ALT, V, class:^(vesktop)$ + +# core binds bind = $mainMod SHIFT, Q, killactive -bind = $mainMod SHIFT, L, exec, swaylock -e -c 000000 -bind = $mainMod, M, exit, -bind = $mainMod, F, fullscreen +bind = $mainMod SHIFT, M, exit bind = $mainMod, SPACE, togglefloating -bind = $mainMod, S, exec, wofi --show drun -bind = $mainMod SHIFT, S, exec, hyprshot -m region --clipboard-only +bind = $mainMod, C, centerwindow +bind = $mainMod, F, fullscreen +bind = $mainMod SHIFT, L, exec, hyprlock +bind = $mainMod $CONTROL, ESCAPE, exec, killall waybar || waybar -c ~/.config/waybar/config # toggle waybar -# Laptop binds -binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%- -binde = , XF86MonBrightnessUp, exec, brightnessctl set 5%+ -binde = , XF86AudioMute, exec, pulseaudio-ctl mute -binde = , XF86AudioLowerVolume, exec, pulseaudio-ctl down -binde = , XF86AudioRaiseVolume, exec, pulseaudio-ctl up +# main application shortcuts +bind = $mainMod, RETURN, exec, alacritty +bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | wl-copy +bind = $mainMod SHIFT, 7, exec, taskset -c 1-7 prismlauncher +bind = $mainMod, S, exec, pkill -x rofi || rofi -show drun +bind = $mainMod, 9, exec, taskset -c 1-7 steam +bind = $mainMod, 0, exec, JAVA_HOME=/usr/lib/jvm/java-17-openjdk bolt --ozone-platform=wayland > /tmp/bolt-launcher.log 2>&1 +# generic audio control +binde = , XF86AudioPlay, exec, playerctl play-pause +binde = , XF86AudioStop, exec, playerctl stop +binde = , XF86AudioPrev, exec, playerctl previous +binde = , XF86AudioNext, exec, playerctl next +binde = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle +binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% +binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% -# Move focus +# custom audio control +binde = $mainMod, F1, exec, playerctl play-pause +binde = $mainMod, F2, exec, playerctl previous +binde = $mainMod, F3, exec, playerctl next + +# move focus bind = $mainMod, h, movefocus, l bind = $mainMod, l, movefocus, r bind = $mainMod, k, movefocus, u bind = $mainMod, j, movefocus, d -# Switch workspaces with mainMod + [0-9] +# workspaces bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod, 6, workspace, 6 bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 1, centerwindow bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 2, centerwindow bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 3, centerwindow bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 4, centerwindow bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 5, centerwindow +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 6, centerwindow +bind = $mainMod ALT, 1, movetoworkspacesilent, 1 +bind = $mainMod ALT, 2, movetoworkspacesilent, 2 +bind = $mainMod ALT, 3, movetoworkspacesilent, 3 +bind = $mainMod ALT, 4, movetoworkspacesilent, 4 +bind = $mainMod ALT, 5, movetoworkspacesilent, 5 +bind = $mainMod ALT, 6, movetoworkspacesilent, 6 -# Move/resize windows with mainMod + LMB/RMB and dragging +# resizing windows +binde = $mainMod, right, resizeactive, 5 0 +binde = $mainMod, left, resizeactive, -5 0 +binde = $mainMod, up, resizeactive, 0 -5 +binde = $mainMod, down, resizeactive, 0 5 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow -# sets repeatable binds for resizing the active window -binde = $mainMod, right, resizeactive, 10 0 -binde = $mainMod, left, resizeactive, -10 0 -binde = $mainMod, up, resizeactive, 0 -10 -binde = $mainMod, down, resizeactive, 0 10 +# recordings +bind = SUPER, R, pass, class:^(com\.obsproject\.Studio)$ +bind = SUPER, F9, pass, class:^(com\.obsproject\.Studio)$ +bind = SUPER, F10, pass, class:^(com\.obsproject\.Studio)$ +# < End Section > diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf new file mode 100644 index 0000000..360defa --- /dev/null +++ b/hypr/hyprlock.conf @@ -0,0 +1,83 @@ +source = $HOME/.config/hypr/colorscheme.conf + +$font = JetBrainsMono Nerd Font + +# GENERAL +general { + disable_loading_bar = true + hide_cursor = true +} + +# BACKGROUND +background { + monitor = + blur_passes = 0 + color = $bg +} + +background { + monitor = eDP-1 + path = ~/.profile/wallpaper-locked.png + blur_passes = 0 + color = $bg +} + +# TIME +label { + monitor = eDP-1 + text = cmd[update:30000] echo "$(date +"%R")" + color = $gray + font_size = 90 + font_family = $font + position = -30, 0 + halign = right + valign = top +} + +# DATE +label { + monitor = eDP-1 + text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")" + color = $gray + font_size = 25 + font_family = $font + position = -30, -150 + halign = right + valign = top +} + +# USER AVATAR + +image { + monitor = eDP-1 + path = ~/.profile/pfp.png + size = 100 + border_color = $orange + + position = 0, 75 + halign = center + valign = center +} + +# INPUT FIELD +input-field { + monitor = eDP-1 + size = 300, 60 + outline_thickness = 4 + dots_size = 0.2 + dots_spacing = 0.2 + dots_center = true + outer_color = $orange + inner_color = rgb($bg) + font_color = rgb($gray) + fade_on_empty = false + placeholder_text = 󰌾 Logged in as $USER + hide_input = false + check_color = rgb($orange) + fail_color = rgb($red) + fail_text = $FAIL ($ATTEMPTS) + capslock_color = rgb($red) + position = 0, -35 + halign = center + valign = center +} diff --git a/hypr/scripts/globalcontrol.sh b/hypr/scripts/globalcontrol.sh new file mode 100755 index 0000000..3638e9f --- /dev/null +++ b/hypr/scripts/globalcontrol.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env sh + +# wallpaper var +EnableWallDcol=0 +ConfDir="${XDG_CONFIG_HOME:-$HOME/.config}" +CloneDir="$HOME/Hyprdots" +ThemeCtl="$ConfDir/hypr/theme.ctl" +cacheDir="$HOME/.cache/hyprdots" + +# theme var +gtkTheme=`gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g"` +gtkMode=`gsettings get org.gnome.desktop.interface color-scheme | sed "s/'//g" | awk -F '-' '{print $2}'` + +# hypr var +hypr_border=`hyprctl -j getoption decoration:rounding | jq '.int'` +hypr_width=`hyprctl -j getoption general:border_size | jq '.int'` + +# notification var +#ncolor="-h string:bgcolor:#191724 -h string:fgcolor:#faf4ed -h string:frcolor:#56526e" +# +#if [ "${gtkMode}" == "light" ] ; then +# ncolor="-h string:bgcolor:#f4ede8 -h string:fgcolor:#9893a5 -h string:frcolor:#908caa" +#fi + +# pacman fns +pkg_installed() +{ + local PkgIn=$1 + + if pacman -Qi $PkgIn &> /dev/null + then + #echo "${PkgIn} is already installed..." + return 0 + else + #echo "${PkgIn} is not installed..." + return 1 + fi +} + +get_aurhlpr() +{ + if pkg_installed yay + then + aurhlpr="yay" + elif pkg_installed paru + then + aurhlpr="paru" + fi +} + +check(){ + local Pkg_Dep=$(for PkgIn in "$@"; do ! pkg_installed $PkgIn && echo "$PkgIn"; done) + +if [ -n "$Pkg_Dep" ]; then echo -e "$0 Dependencies:\n$Pkg_Dep" + read -p "ENTER to install (Other key: Cancel): " ans + if [ -z "$ans" ]; then get_aurhlpr ; $aurhlpr -S $Pkg_Dep + else echo "Skipping installation of packages" ;exit 1 + fi +fi +} diff --git a/hypr/scripts/logoutlaunch.sh b/hypr/scripts/logoutlaunch.sh new file mode 100755 index 0000000..51b2785 --- /dev/null +++ b/hypr/scripts/logoutlaunch.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env sh + +# Check if wlogout is already running +if pgrep -x "wlogout" > /dev/null +then + pkill -x "wlogout" + exit 0 +fi + +# set file variables +ScrDir=`dirname "$(realpath "$0")"` +source $ScrDir/globalcontrol.sh +wLayout="${XDG_CONFIG_HOME:-$HOME/.config}/wlogout/layout_$1" +wlTmplt="${XDG_CONFIG_HOME:-$HOME/.config}/wlogout/style_$1.css" + +if [ ! -f $wLayout ] || [ ! -f $wlTmplt ] ; then + echo "ERROR: Config $1 not found..." + exit 1; +fi + +# detect monitor res +x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width') +y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height') +hypr_scale=$(hyprctl -j monitors | jq '.[] | select (.focused == true) | .scale' | sed 's/\.//') + + +# scale config layout and style +case $1 in + 1) wlColms=6 + export mgn=$(( y_mon * 28 / hypr_scale )) + export hvr=$(( y_mon * 23 / hypr_scale )) ;; + 2) wlColms=2 + export x_mgn=$(( x_mon * 35 / hypr_scale )) + export y_mgn=$(( y_mon * 25 / hypr_scale )) + export x_hvr=$(( x_mon * 32 / hypr_scale )) + export y_hvr=$(( y_mon * 20 / hypr_scale )) ;; +esac + +# scale font size +export fntSize=$(( y_mon * 2 / 100 )) + +# detect gtk system theme +export BtnCol=`[ "$gtkMode" == "dark" ] && ( echo "white" ) || ( echo "black" )` +export WindBg=`[ "$gtkMode" == "dark" ] && ( echo "rgba(0,0,0,0.5)" ) || ( echo "rgba(255,255,255,0.5)" )` + +if [ "$EnableWallDcol" -eq 1 ] ; then + export wbarTheme="Wall-Dcol" +else + export wbarTheme="${gtkTheme}" +fi + +# eval hypr border radius +export active_rad=$(( hypr_border * 5 )) +export button_rad=$(( hypr_border * 8 )) + +# eval config files +wlStyle=`envsubst < $wlTmplt` + +# launch wlogout +wlogout -b $wlColms -c 0 -r 0 -m 0 --layout $wLayout --css <(echo "$wlStyle") --protocol layer-shell + diff --git a/hypr/scripts/resetxdgportal.sh b/hypr/scripts/resetxdgportal.sh new file mode 100755 index 0000000..b6f3018 --- /dev/null +++ b/hypr/scripts/resetxdgportal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-gnome +killall xdg-desktop-portal-kde +killall xdg-desktop-portal-lxqt +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/lib/xdg-desktop-portal-hyprland & +/usr/lib/xdg-desktop-portal & diff --git a/hypr/scripts/xrandr.sh b/hypr/scripts/xrandr.sh new file mode 100755 index 0000000..892fdd9 --- /dev/null +++ b/hypr/scripts/xrandr.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Custom resolution through xrandr (21:9) +xrandr --newmode "2560x1080" 677.75 2560 2784 3064 3568 1080 1083 1093 1188 -hsync +vsync +xrandr --newmode "2560x1080R" 373.00 2560 2608 2640 2720 1080 1083 1093 1144 +hsync -vsync +xrandr --addmode DP-1 2560x1080 +xrandr --addmode DP-1 2560x1080R + +# 3200x900 suggestion (32:9) +xrandr --newmode "3200x900" 704.50 3200 3472 3824 4448 900 903 913 991 -hsync +vsync +xrandr --addmode DP-1 3200x900 + +# 3200x1100 suggestion +xrandr --newmode "3200x1100" 863.75 3200 3480 3832 4464 1100 1103 1113 1210 -hsync +vsync +xrandr --addmode DP-1 3200x1100 + +# 3200x1100 suggestion (21:9) +xrandr --newmode "2100x900" 462.50 2100 2280 2512 2920 900 903 913 991 -hsync +vsync +xrandr --addmode DP-1 2100x900 + +sleep 2 && xrandr --output DP-1 --primary # Set primary monitor for xwayland diff --git a/waybar/config b/waybar/config new file mode 100644 index 0000000..09b8cb0 --- /dev/null +++ b/waybar/config @@ -0,0 +1,130 @@ +[ + { + "name": "main", + "layer": "bottom", + "position": "top", + "height": 40, + "spacing": 0, + "output": "eDP-1", + "reload_style_on_change": true, + "modules-left": [ + "custom/appmenu", + "disk", + "memory", + "cpu", + "custom/gpu", + "temperature" + ], + "modules-center": [ + "hyprland/workspaces" + ], + "modules-right": [ + "tray", + "wireplumber", + "network#wifi", + "battery", + "clock", + "custom/poweroff" + ], + "battery": { + "interval": 20, + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": [" ", " ", " ", " ", " "], + "max-length": 25 + }, + "clock": { + "interval": 1, + "format": "{:%H:%M:%S %p}", + "format-alt": "{:%Y-%m-%d}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "cpu": { + "format": " {usage}%", + "interval": 5, + "tooltip": false + }, + "disk": { + "format": " {percentage_used}%", + "tooltip-format": "{used} / {total} used" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "memory": { + "format": " {}%", + "tooltip-format": "{used:0.1f}G / {total:0.1f}G used" + }, + "temperature": { + "format": "{icon} {temperatureC}°C ", + "format-icons": ["", "", "", "", ""], + "hwmon-path": "/sys/class/thermal/thermal_zone2/temp", + "critical-threshold": 80, + "interval": 5 + }, + "temperature": { + "critical-threshold": 80, + "format": "{icon} {temperatureC}°C", + "format-icons": ["", "", "", "", ""], + "hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input" + }, + "network#wifi": { + "interface": "wlo1", + "format-wifi": "󰣺 {signalStrength}%", + "format-disconnected": "󰣽", + "tooltip-format": "{ifname}: {ipaddr}/{cidr}" + }, + "sway/mode": { + "format": "{}" + }, + "hyprland/workspaces": { + "format": "{icon}", + "sort-by-number": true, + "all-outputs": true, + "disable-scroll": true, + "active-only": false, + "format-icons": { + "active": "", + "default": "", + "persistent": "", + }, + "persistent-workspaces": { + "1": [ ], + "2": [ ], + "3": [ ], + "4": [ ], + "5": [ ] + } + + }, + "wireplumber": { + "format": " {volume}%", + "format-muted": " 0%", + "on-click": "pavucontrol", + "on-click-right": "helvum", + "max-volume": 100, + "scroll-step": 5 + }, + "tray": { + "icon-size": 21, + "spacing": 10 + }, + "custom/appmenu": { + "format": "", + "on-click": "pkill -x rofi || rofi -show drun" + }, + "custom/poweroff": { + "tooltip": false, + "format": " ", + "on-click": "pgrep poweroff.sh || $HOME/.config/waybar/scripts/poweroff.sh" + }, + } +] + diff --git a/waybar/style.css b/waybar/style.css index e29a7bf..e6422d6 100755 --- a/waybar/style.css +++ b/waybar/style.css @@ -4,58 +4,82 @@ border: none; border-radius: 0px; min-height: 0; + font-weight: bold; font-size: 14px; font-family: "Hack Nerd Font"; } window#waybar { - background-color: transparent; - color: @text; -} - -#workspaces { - margin: 4px 0; - border-radius: 5px; - background: transparent; + background-color: alpha(@crust, 0.3); + border-radius: 0px; + border-bottom: 0px solid @overlay0; } #workspaces button { - color: @overlay0; - background: transparent; - transition: all 0.1s ease; + color: @peach; + border-radius: 8px; + margin: 4px 2px; + padding: 0px 8px; + padding-right: 12px; /* why?? */ + transition: all 0.4s ease; } #workspaces button.active { - color: @lavender; - border-top: 2px solid @lavender; - transition: all 0.1s ease; + background-color: alpha(@peach, 0.2); + transition: all 0.4s ease; } +.modules-left, +.modules-center, +.modules-right { + padding-top: 0px; + padding-bottom: 0px; +} + +.modules-left { + padding-left: 0px; +} + +.modules-right { + padding-right: 0px; +} + +#battery, #clock, #cpu, #disk, #memory, -#network, #temperature, #tray, -#pulseaudio, +#wireplumber, +#workspaces, +#network, +#custom-appmenu, +#custom-gpu, #custom-poweroff, #custom-weather { - padding: 0 10px; + background-color: transparent; + border-radius: 10px; + border: none; + margin-left: 6px; + margin-right: 6px; + color: @peach; + min-width: 45px; } -#pulseaudio { - color: @sapphire; +#network { + margin: 0px; + padding: 0px; } -#disk { - color: @peach; + +#custom-appmenu, +#workspaces label, +#network { + font-size: 14px; } -#memory { - color: @teal; -} -#cpu { - color: @lavender; -} -#temperature { - color: @sky; + + +#clock { + min-width: 80px; } +