From c93482f2e0ba9f73b5be47d9ae417e246b7ab222 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 1 Sep 2024 23:19:16 +0800 Subject: init hyprland --- dot-config/hypr/autostart.conf | 54 +++++++++++ dot-config/hypr/binds.conf | 142 +++++++++++++++++++++++++++++ dot-config/hypr/env.conf | 40 +++++++++ dot-config/hypr/hypridle.conf | 12 +++ dot-config/hypr/hyprland.conf | 160 +++++++++++++++++++++++++++++++++ dot-config/hypr/hyprlock.conf | 140 +++++++++++++++++++++++++++++ dot-config/hypr/hyprpaper.conf | 1 + dot-config/hypr/rules.conf | 105 ++++++++++++++++++++++ dot-config/waybar/colors.css | 22 +++++ dot-config/waybar/config.jsonc | 14 +++ dot-config/waybar/modules.jsonc | 194 ++++++++++++++++++++++++++++++++++++++++ dot-config/waybar/style.css | 124 +++++++++++++++++++++++++ dot-config/wezterm/looks.lua | 10 +++ dot-config/wezterm/wezterm.lua | 32 +++++++ 14 files changed, 1050 insertions(+) create mode 100644 dot-config/hypr/autostart.conf create mode 100644 dot-config/hypr/binds.conf create mode 100644 dot-config/hypr/env.conf create mode 100644 dot-config/hypr/hypridle.conf create mode 100644 dot-config/hypr/hyprland.conf create mode 100644 dot-config/hypr/hyprlock.conf create mode 100644 dot-config/hypr/hyprpaper.conf create mode 100644 dot-config/hypr/rules.conf create mode 100644 dot-config/waybar/colors.css create mode 100644 dot-config/waybar/config.jsonc create mode 100644 dot-config/waybar/modules.jsonc create mode 100644 dot-config/waybar/style.css create mode 100644 dot-config/wezterm/looks.lua create mode 100644 dot-config/wezterm/wezterm.lua diff --git a/dot-config/hypr/autostart.conf b/dot-config/hypr/autostart.conf new file mode 100644 index 00000000..829cea6d --- /dev/null +++ b/dot-config/hypr/autostart.conf @@ -0,0 +1,54 @@ +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +exec-once = dbus-update-activation-environment --all && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME + +# Waybar +exec-once = waybar +# Hypr-Eco +exec-once = hyprpaper +exec-once = $SCRIPTSDIR/hyprpaper.sh +exec-once = hypridle + +# Fix hidpi +exec-once = xrdb -merge ~/.Xresources + +# Auth agent +# exec-once = systemctl --user start plasma-polkit-agent # doesnt respect themeing +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +# keyring agent +exec-once = gnome-keyring-daemon --start --components=pkcs11,secrets,ssh +# Location service +exec-once = /usr/lib/geoclue-2.0/demos/agent & +# input method +exec-once = fcitx -d +# app armor notifications +exec-once = aa-notify -p -s 1 -w 60 -f /var/log/audit/audit.log & + +# Clipboard history +exec-once = wl-paste --watch cliphist store & +exec-once = wl-paste --type text --watch cliphist store +exec-once = wl-paste --type image --watch cliphist store + +# Notification agent +exec-once = swaync + +# audio auto adjust +exec-once = $HOME/scripts/audio-autoAdjust.sh + +# startup sound +exec-once = $HOME/scripts/startupsound.sh + +# misc +exec-once = udiskie +exec-once = bitwarden-desktop +exec-once = kdeconnectd +# exec-once = input-leap # doesnt work yet +exec-once = nextcloud --background +exec-once = discord --start-minimized +exec-once = beeper --hidden diff --git a/dot-config/hypr/binds.conf b/dot-config/hypr/binds.conf new file mode 100644 index 00000000..213a0af2 --- /dev/null +++ b/dot-config/hypr/binds.conf @@ -0,0 +1,142 @@ +#################### +### KEYBINDINGSS ### +#################### + +binds { + allow_workspace_cycles = yes +} + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Launching... +bind = $mainMod, return, exec, $terminal start +bind = $mainMod shift, return, exec, $terminal start --class float +# bind = $mainMod space, return, exec, $terminal start --class pseudo +# bind = super alt, Delete, exec, rofi_powermenu +# bind = alt, F1, exec, rofi_launcher +# bind = alt, F2, exec, rofi_runner +bind = $mainMod, c, exec, rofi_configs +bind = $mainMod, m, exec, rofi_music +bind = $mainMod, n, exec, nmd +bind = $mainMod, r, exec, rofi_asroot +bind = $mainMod, s, exec, rofi_screenshot +bind = $mainMod, v, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy +bind = $mainMod, w, exec, rofi_windows +bind = $mainMod, x, exec, rofi_powermenu +bind = $mainMod, b, exec, rofi_bluetooth +# GUI +bind = $mainMod shift, f, exec, $fileManager +bind = $mainMod shift, w, exec, $browser --restore-last-session +bind = $mainMod shift, e, exec, code +bind = $mainMod shift, d, exec, discord --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto +bind = $mainMod shift, b, exec, beeper +# CLI +bind = ctrl alt, a, exec, pulsemixer +bind = ctrl alt, v, exec, $editor +bind = ctrl alt, r, exec, ranger +bind = ctrl alt, b, exec, sudo nice -n -20 sudo btop +# Emergency +bind = ctrl shift, escape, exec, sudo btop # fix this +bind = ctrl alt, delete, exec, rofi_shutdown_menu +bind = $mainMod, p, exec, hyprpicker --autocopy +# More +# bind = ctrl alt, m, exec, music +bind = ctrl alt, l, exec, hyprlock +# Misc +bind = $mainMod shift, g, exec, gtk-launch shortwave.desktop +# bind = $mainMod shift, c, exec, gtk-launch google-chat.desktop + +# XF86 keys & Misc +bind = ,XF86Print, exec, $HOME/scripts/sysutil.sh screenshot --now +bind = alt, XF86AudioMute, exec, $HOME/scripts/sysutil.sh screenshot --in5sec +bind = $mainMod shift, s, exec, $HOME/scripts/sysutil.sh screenshot --area +# bind into hyprland configs +# XF86Audio{RaiseVolume,LowerVolume} +# bspvolume{ --inc, --dec} + +# # Mic Volume control +# XF86Audio{Mute,MicMute} +# bspvolume{ --toggle, --toggle-mic} +# +# # Music control +# XF86Audio{Next,Prev,Play,Stop} +# {playerctl -p spotify next, playerctl -p spotifyprevious,bsppp,playerctl -p spotify stop} + +# super + XF86PowerOff +# $HOME/.config/rofi/scripts/rofi_shutdown + +# XF86PowerOff +# $HOME/.config/rofi/scripts/rofi_shutdown +# bind = ,XF86AudioRaiseVolume, exec, bspvolume --inc +# bind = ,XF86AudioLowerVolume, exec, bspvolume --dec +# bind = ,XF86AudioMute, exec, bspvolume --toggle +# bind = ,XF86AudioMicMute, exec, bspvolume --toggle-mic +bind = ,XF86AudioNext, exec, playerctl -p spotify next +bind = ,XF86AudioPrev, exec, playerctl -p spotify previous +bind = ,XF86AudioPlay, exec, playerctl -p spotify play-pause +bind = ,XF86AudioStop, exec, playerctl -p spotify stop +# bind = XF86PowerOff, exec, $HOME/.config/rofi/scripts/rofi_shutdown + + +# Window management +# bind = $mainMod, d, exec, HIDE_UNHIDE_WINDOW +bind = $mainMod, q, killactive, +# bind = $mainMod shift, q, FORCEkillactive, +# bind = ctrl alt, escape, exec , mousekill +bind = ctrl $mainMod shift, r, exec, systemctl restart $sessionManager +bind = ctrl $mainMod, escape, exec, killall waybar; waybar +# restart bar +bind = ctrl alt, left, workspace, -1 +bind = ctrl alt, right, workspace, +1 +bind = $mainMod shift, left, movewindow, l +bind = $mainMod shift, right, movewindow, r +bind = $mainMod shift, up, movewindow, u +bind = $mainMod shift, down, movewindow, d +bind = alt shift, right, resizeactive, 10 0 +bind = alt shift, left, resizeactive, -10 0 +bind = alt shift, up, resizeactive, 0 -10 +bind = alt shift, down, resizeactive, 0 10 +bind = $mainMod, f, fullscreen, +bind = $mainMod, space, togglefloating, +bind = $mainMod shift, space, pseudo, # dwindle +bind = $mainMod shift, h, togglesplit, # dwindle + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +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 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 + +# Scroll through existing workspaces with mainMod + scroll +# use waybar +# bind = $mainMod, mouse_down, workspace, e+1 +# bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/dot-config/hypr/env.conf b/dot-config/hypr/env.conf new file mode 100644 index 00000000..e7240338 --- /dev/null +++ b/dot-config/hypr/env.conf @@ -0,0 +1,40 @@ +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 +env = HYPRCURSOR_THEME,Bibata-rainbow-modern + +# Nvidia +env = LIBVA_DRIVER_NAME,nvidia +env = GBM_BACKEND,nvidia-drm +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = __GL_GSYNC_ALLOWED,1 + +# XDG +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland + +# QT +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_QPA_PLATFORM=wayland;xcb # Not yet working for onlyoffice-editor +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_QPA_PLATFORMTHEME,qt6ct +# env = SDL_VIDEODRIVER,wayland +env = MOZ_ENABLE_WAYLAND,1 +env = _JAVA_AWT_WM_NONREPARENTING,1 + +# Scale +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +# env = GDK_DPI_SCALE,1.5 +# env = QT_SCALE_FACTOR,2 + +# Input method +env = GTK_IM_MODULE,fcitx +env = QT_IM_MODULE,fcitx +env = XMODIFIERS,@im=fcitx +env = SDL_IM_MODULE,fcitx diff --git a/dot-config/hypr/hypridle.conf b/dot-config/hypr/hypridle.conf new file mode 100644 index 00000000..ace90550 --- /dev/null +++ b/dot-config/hypr/hypridle.conf @@ -0,0 +1,12 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. + before_sleep_cmd = loginctl lock-session # lock before suspend. + after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. +} + +listener { + timeout = 1800000 # 30min + on-timeout = $HOME/scripts/hypridle.sh --idle # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = $HOME/scripts/hypridle.sh --stopidle # monitor backlight restore. +} + diff --git a/dot-config/hypr/hyprland.conf b/dot-config/hypr/hyprland.conf new file mode 100644 index 00000000..530b069f --- /dev/null +++ b/dot-config/hypr/hyprland.conf @@ -0,0 +1,160 @@ + +# ####################################################################################### +# AUTOGENERATED HYPR CONFIG. +# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +# This is an example Hyprland config file. +# Refer to the wiki for more information. +# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,highres@160,auto,auto,bitdepth,10 + + +################### +### MY PROGRAMS ### +################### + +# Program defaults +$terminal = wezterm +$editor = lvim +$browser = thorium-browser +$fileManager = thunar +$sessionManager = sddm +$menu = wofi --show drun + +# Dirs +$HYPRDIR = $HOME/.config/hypr +$WAYBARDIR = $HOME/.config/waybar +$SCRIPTSDIR = $HOME/scripts + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 10 + + border_size = 3 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg # DO THIS LATER + # col.inactive_border = rgba(595959aa) + # col.active_border = rgb(00a7f5) rgb(538620) rgb(538620) rgb(00a7f5) 90deg + # col.inactive_border = rgb(00a7f5) rgb(538620) rgb(538620) rgb(00a7f5) 90deg + # col.active_border = rgb(00a7f5) rgb(538620) + # col.inactive_border = rgb(00a7f5) rgb(538620) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +xwayland { + force_zero_scaling = true +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 7 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 0.95 + + drop_shadow = true + shadow_range = 15 + shadow_render_power = 9 + col.shadow = rgba(1a1a1aee) + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = true + size = 8 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = true + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers + focus_on_activate = true + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( + vfr = true +} + + +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + numlock_by_default = true + # touchpad { + # natural_scroll = false + # } +} + + + +source = ~/.config/hypr/env.conf +source = ~/.config/hypr/rules.conf +source = ~/.config/hypr/binds.conf +source = ~/.config/hypr/autostart.conf diff --git a/dot-config/hypr/hyprlock.conf b/dot-config/hypr/hyprlock.conf new file mode 100644 index 00000000..816def9f --- /dev/null +++ b/dot-config/hypr/hyprlock.conf @@ -0,0 +1,140 @@ +general { + immediate_render = true +} + +background { + monitor = + path = ~/.cache/cwall.png + # only png supported for now + color = rgba(25, 20, 20, 1.0) + + # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations + blur_passes = 0 # 0 disables blurring + blur_size = 2 + noise = 0 + contrast = 0 + brightness = 0 + vibrancy = 0 + vibrancy_darkness = 0.0 +} + +input-field { + monitor = + size = 300, 30 + outline_thickness = 0 + dots_size = 0.25 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.55 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + dots_rounding = -1 + outer_color = rgba(242, 243, 244, 0) + inner_color = rgba(242, 243, 244, 0) + font_color = rgba(242, 243, 244, 0.75) + fade_on_empty = false + placeholder_text = # Text rendered in the input box when it's empty. + hide_input = false + check_color = rgba(204, 136, 34, 0) + fail_color = rgba(204, 34, 34, 0) # if authentication failed, changes outer_color and fail message color + fail_text = $FAIL ($ATTEMPTS) # can be set to empty + fail_transition = 300 # transition time in ms between normal outer_color and fail_color + capslock_color = -1 + numlock_color = -1 + bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) + invert_numlock = false # change color if numlock is off + swap_font_color = false # see below + position = 0, -468 + halign = center + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(~/scripts/song-status)" + color = rgba(242, 243, 244, 0.75) + font_size = 14 + font_family = SF Pro Text + position = 20, 512 + halign = left + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(~/scripts/network-status)‎" + color = rgba(242, 243, 244, 0.75) + font_size = 16 + font_family = SF Pro Text + position = -35, 512 + halign = right + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(~/scripts/layout-status)‎" + color = rgba(242, 243, 244, 0.75) + font_size = 15 + font_family = SF Pro Text + position = -150, 512 + halign = right + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(date +"%A, %B %d")" + color = rgba(242, 243, 244, 0.75) + font_size = 20 + font_family = SF Pro Display Bold + position = 0, 405 + halign = center + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(date +"%k:%M")" + color = rgba(242, 243, 244, 0.75) + font_size = 93 + font_family = SF Pro Display Bold + position = 0, 310 + halign = center + valign = center +} + + +label { + monitor = + text = Pratik Gayen + color = rgba(242, 243, 244, 0.75) + font_size = 12 + font_family = SF Pro Display Bold + position = 0, -407 + halign = center + valign = center +} + +label { + monitor = + text = Touch ID or Enter Password + color = rgba(242, 243, 244, 0.75) + font_size = 10 + font_family = SF Pro Display + position = 0, -438 + halign = center + valign = center +} + +image { + monitor = + path = ~/Pictures/fullpfp.png + border_color = 0xffdddddd + border_size = 0 + size = 73 + rounding = -1 + rotate = 0 + reload_time = -1 + reload_cmd = + position = 0, -353 + halign = center + valign = center +} diff --git a/dot-config/hypr/hyprpaper.conf b/dot-config/hypr/hyprpaper.conf new file mode 100644 index 00000000..4cf552c5 --- /dev/null +++ b/dot-config/hypr/hyprpaper.conf @@ -0,0 +1 @@ +splash = false diff --git a/dot-config/hypr/rules.conf b/dot-config/hypr/rules.conf new file mode 100644 index 00000000..f2b60079 --- /dev/null +++ b/dot-config/hypr/rules.conf @@ -0,0 +1,105 @@ +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ + +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + +# Terminal applications on workspace 1 +windowrulev2 = workspace 1, class:($terminal|Alacritty|Xfce4-terminal|Kitty) + +# Web browsers on workspace 2 +windowrulev2 = workspace 2, class:($browser|Thorium-browser|Brave-browser|chromium|firefox) + +# File managers on workspace 3 +windowrulev2 = workspace 3, class:($fileManager|Pcmanfm|Thunar|qBittorrent|Caja) + +# Code editors on workspace 4 +windowrulev2 = workspace 4, class:(Geany|code-oss|Code - OSS|install4j-burp-StartBurp|burp-StartBurp|Unity|jetbrains-pycharm-ce) + +# Office applications on workspace 5 +windowrulev2 = workspace 5, class:(Gucharmap|Atril|Evince|libreoffice-writer|libreoffice-calc|libreoffice-impress|libreoffice|Soffice|Typora|obsidian|figma-linux|anytype|craft-nativefier-e0958b) + +# Communication apps on workspace 6 +windowrulev2 = workspace 6, class:(Thunderbird|TelegramDesktop|Hexchat|discord|vesktop|beeper|Beeper|VencordDesktop|Chat-gpt|Whatsapp-for-linux|Chatbox) + +# Media applications on workspace 7 +windowrulev2 = workspace 7, class:(Audacity|Music|MPlayer|Lxmusic|Inkscape|Gimp|Blender|obs|zoom|Zoom|Pitivi|kdenlive|openshot|vlc|Spotify|Spotify Premium|cider|Cider|shotwell|Shotwell) + +# Games on workspace 8 +windowrulev2 = workspace 8, class:(Minecraft|Badlion|War|steam_proton|csgo_linux64|minecraft-launcher|Lutris|genshinimpact.exe|moe.launcher.an-anime-game-launcher) + +# System applications on workspace 9 +windowrulev2 = workspace 9, class:(Virt-manager|blueman-adapters|GParted|Xdm-app|timeshift-gtk|Nextcloud|gearlever) + +# Settings applications on workspace 9 +windowrulev2 = workspace 9, class:(Lxappearance|Lxtask|Lxrandr|Arandr|System-config-printer.py|Pavucontrol|Exo-helper-1|Protonvpn|Xfce4-power-manager-settings|Mysql-workbench-bin|Grub-customizer|Nitrogen|archlinux-tweak-tool.py|pamac-manager|helvum|Vmware|Btrfs Assistant|Bitwarden|wootility-lekker) + +# Miscellaneous applications on workspace 10 +windowrulev2 = workspace 10, class:(maxautoclicker|os_server|Os_server) + +# floating applications +windowrulev2 = float, class:(alacritty-float|Pcmanfm|Onboard|Yad|zoom|Xdm-app|wechat|WeChat|sxiv|Sxiv|Firefox:Places|Viewnior|feh|Nm-connection-editor|install4j-burp-StartBurp|thorium-app.shortwave.com__-Default|thorium-mdpkiolbdkhdjpekfbkbmhigcaggjagi-Profile_1|float|thorium-lnachpgegbbmnnlgpokibfjlmppeciah-Default) + +# Sticky applications +windowrulev2 = pin, class:(thorium-app.shortwave.com__-Default|thorium-mdpkiolbdkhdjpekfbkbmhigcaggjagi-Profile_1|thorium-lnachpgegbbmnnlgpokibfjlmppeciah-Default) + +# Special rules for Conky and stalonetray +windowrulev2 = float, class:(Conky), manage=off +windowrulev2 = float, class:(stalonetray), manage=off + +# PIP +# windowrulev2 = fullscreen, class:(.*), title:("Picture in picture") +# windowrule = pin, title:("Picture in picture") +# windowrulev2 = size 800 450, title:^("Picture in picture")$ +# doenst work + +# stayfocused rules +windowrulev2 = stayfocused, class:^polkit-gnome-authentication-agent-1$ +windowrulev2 = stayfocused, class:^(pinentry-) + +# Opacity rules +windowrulev2 = opacity 1.00 0.90, class:^Bar$ +windowrulev2 = opacity 1.00 0.90, class:^slop$ +windowrulev2 = opacity 0.85 0.75, class:^Alacritty$ && focused +windowrulev2 = opacity 0.75 0.65, class:^Alacritty$ && !focused +windowrulev2 = opacity 0.85 0.75, class:^code-oss$ +windowrulev2 = opacity 0.85 0.75, class:^Code$ +windowrulev2 = opacity 0.85 0.75, class:^Beeper$ +windowrulev2 = opacity 1.00 0.90, class:^TelegramDesktop$ +windowrulev2 = opacity 0.90 0.80, class:^Spotify$ +windowrulev2 = opacity 0.90 0.80, class:^Cider$ +windowrulev2 = opacity 0.50 0.40, class:^fcitx$ +windowrulev2 = opacity 0.90 0.80, class:^Brave-browser$ +windowrulev2 = opacity 0.80 0.70, class:^Thunar$ +windowrulev2 = opacity 0.65 0.55, class:^discord$ +windowrulev2 = opacity 0.90 0.80, class:^Caja$ +windowrulev2 = opacity 0.80 0.70, class:^polkit-gnome-authentication-agent-1$ + + +# Layer rules/blur +layerrule = blur,rofi +layerrule = ignorezero,rofi +layerrule = blur,notifications +layerrule = ignorezero,notifications +layerrule = blur,swaync-notification-window +layerrule = ignorezero,swaync-notification-window +layerrule = blur,swaync-control-center +layerrule = ignorezero,swaync-control-center +layerrule = blur,logout_dialog +layerrule = blur,waybar + +# xwaylandvideobridge +windowrulev2 = opacity 0.0 override, class:^(xwaylandvideobridge)$ +windowrulev2 = noanim, class:^(xwaylandvideobridge)$ +windowrulev2 = noinitialfocus, class:^(xwaylandvideobridge)$ +windowrulev2 = maxsize 1 1, class:^(xwaylandvideobridge)$ +windowrulev2 = noblur, class:^(xwaylandvideobridge)$ diff --git a/dot-config/waybar/colors.css b/dot-config/waybar/colors.css new file mode 100644 index 00000000..7d10a906 --- /dev/null +++ b/dot-config/waybar/colors.css @@ -0,0 +1,22 @@ +@define-color BACKGROUND rgba (36, 41, 49, 0.7); +@define-color FOREGROUND rgba (216, 222, 233, 1); +@define-color ALTBACKGROUND rgba (57, 64, 79, 0.8); +@define-color ALTFOREGROUND rgba (118, 139, 178, 1); +@define-color ACCENT rgba (129, 161, 193, 1); +@define-color BLACK rgba (59, 66, 82, 1); +@define-color RED rgba (191, 97, 106, 1); +@define-color GREEN rgba (163, 190, 140, 1); +@define-color YELLOW rgba (235, 203, 139, 1); +@define-color BLUE rgba (129, 161, 193, 1); +@define-color MAGENTA rgba (180, 142, 173, 1); +@define-color CYAN rgba (136, 192, 208, 1); +@define-color WHITE rgba (229, 233, 240, 1); +@define-color ALTBLACK rgba (76, 86, 106, 1); +@define-color ALTRED rgba (191, 97, 106, 1); +@define-color ALTGREEN rgba (163, 190, 140, 1); +@define-color ALTYELLOW rgba (235, 203, 139, 1); +@define-color ALTBLUE rgba (129, 161, 193, 1); +@define-color ALTMAGENTA rgba (180, 142, 173, 1); +@define-color ALTCYAN rgba (143, 188, 187, 1); +@define-color ALTWHITE rgba (236, 239, 244, 1); + diff --git a/dot-config/waybar/config.jsonc b/dot-config/waybar/config.jsonc new file mode 100644 index 00000000..ae6723db --- /dev/null +++ b/dot-config/waybar/config.jsonc @@ -0,0 +1,14 @@ +// -*- mode: jsonc -*- +{ + "include": "~/.config/waybar/modules.jsonc", + "position": "top", + "layer": "top", + "margin-top": 10, + "margin-bottom": 0, + "margin-left": 25, + "margin-right": 25, + "modules-left": ["custom/launcher", "group/musicworkspace"], + "modules-center": ["hyprland/window", "cava"], + "modules-right": ["cpu", "memory", "custom/gpu", "temperature", "network", "group/misc", "group/power"], + // "reload_style_on_change": true, +} diff --git a/dot-config/waybar/modules.jsonc b/dot-config/waybar/modules.jsonc new file mode 100644 index 00000000..5534fc76 --- /dev/null +++ b/dot-config/waybar/modules.jsonc @@ -0,0 +1,194 @@ +{ + // Modules configuration + "clock": { + "format": " {:%H:%M}", + "tooltip": "true", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": " {:%d/%m}", + "on-click-right": "swaync-client -t -sw" + }, + + + "hyprland/workspaces": { + "active-only": false, + "all-outputs": true, + "disable-scroll": false, + "on-scroll-up": "hyprctl dispatch workspace -1", + "on-scroll-down": "hyprctl dispatch workspace +1", + "format": "{icon}", + "on-click": "activate", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "6": "", + "7": "", + "8": "", + "9": "", + "urgent": "", + // "active": "", + "default": " ", + "sort-by-number": true + }, + // "format-icons": { + // "default": "", + // "active": " ", + // }, + + "persistent-workspaces": { + "*": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], + } + }, + "mpris": { + "format": "{player_icon} {dynamic}", + "format-paused": "{status_icon} {dynamic}", + "dynamic-order": ["title", "position", "length"], + "player-icons": { + "default": "▶", + "mpv": "🎵" + }, + "status-icons": { + "paused": "⏸" + }, + "interval": 1, + }, + "group/musicworkspace": { + "orientation": "horizontal", + "modules": ["hyprland/workspaces", "mpris"], + "drawer": {} + }, + + "memory": { + "format": "󰍛 {}%", + "format-alt": "󰍛 {used}/{total} GiB", + "tooltip-format": "swap: {swapPercentage}%", + "interval": 1 + }, + + "cpu": { + "format": " {usage}%", + "format-alt": " {avg_frequency} GHz", + "interval": 1 + }, + + "network": { + "format-wifi": "󰤨  {bandwidthDownBytes}  {bandwidthUpBytes}", + "format-ethernet": " {ifname}: Aesthetic", + "format-linked": " {ifname} (No IP)", + "format-disconnected": "󰤭", + "format-alt": " {ifname}: {ipaddr}/{cidr}", + "tooltip-format": "Strength: {signalStrength}%", + // "on-click-right": "nm-connection-editor", + "on-click-right": "nmd", + "interval": 1 + }, + + "tray": { + "icon-size": 16, + "spacing": 5 + }, + "custom/launcher": { + "format": "󰣇", + // "on-click": "bash $HOME/.config/rofi/launcher.sh", + // "on-click": "wofi --show drun -I -a -n -W 500 -H 376 -s ~/.config/wofi/themes/gruvbox.css", + // "on-click-right": "bash $HOME/.config/rofi/run.sh" + // "on-click-right": "wofi --show run -I -a -n -W 500 -H 376 -s ~/.config/wofi/themes/gruvbox.css" + }, + // "hyprland/window": { + + // }, + "custom/gpu": { + "format": " {}%", + "format-alt": " {}°C", + "exec-if": "nvidia-smi", + "exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits", + "exec-alt": "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits", + "interval": 3 + }, + "temperature": { + "format": " {}°C", + "critical-threshold": 80, + }, +// "cava": { +// // "cava_config": "$XDG_CONFIG_HOME/cava/cava.conf", +// "framerate": 30, +// "autosens": 1, +// "sensitivity": 100, +// "bars": 14, +// "lower_cutoff_freq": 50, +// "higher_cutoff_freq": 10000, +// "method": "pulse", +// "source": "auto", +// "stereo": true, +// "reverse": false, +// "bar_delimiter": 0, +// "monstercat": false, +// "waves": false, +// "noise_reduction": 0.77, +// "input_delay": 2, +// "format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ], +// "actions": { +// "on-click-right": "mode" +// } +// }, + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "", + "inhibited-notification": "", + "inhibited-none": "", + "dnd-inhibited-notification": "", + "dnd-inhibited-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + "group/misc": { + "orientation": "horizontal", + "modules": ["clock", "custom/notification", "tray"], + "drawer": {} + }, + "custom/quit": { + "format": "󰗼", + "tooltip": false, + "on-double-click": "hyprctl dispatch exit" + }, + "custom/lock": { + "format": "󰍁", + "tooltip": false, + "on-double-click": "hyprlock" + }, + "custom/reboot": { + "format": "󰜉", + "tooltip": false, + "on-double-click": "reboot" + }, + "custom/shutdown": { + "format": "", + "tooltip": false, + "on-double-click": "shutdown now" + }, + "group/power": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "children-class": "not-shutdown", + }, + "modules": [ + "custom/shutdown", + "custom/quit", + "custom/lock", + "custom/reboot", + ] + }, +} diff --git a/dot-config/waybar/style.css b/dot-config/waybar/style.css new file mode 100644 index 00000000..9d07da0c --- /dev/null +++ b/dot-config/waybar/style.css @@ -0,0 +1,124 @@ +@import url("./colors.css"); + + +* { + border: none; + font-family: Iosevka, FontAwesome, Noto Sans CJK, Jetbrains Nerd Font, sans-serif; + font-size: 16px; + min-height: 0; + margin-bottom: 0; + color: @ACCENT +} + +.module { + background: @BACKGROUND; + border-radius: 8px; + margin: 4px; + padding: 4px 4px 4px 4px; + border: 2px solid @ACCENT; + padding-right: 16px; + padding-left: 16px; +} + +window#waybar { + font-family: Iosevka, FontAwesome, Noto Sans CJK, "JetBrains Mono NerdFont"; + background-color: transparent; + font-size: 0.8rem; +} + +window#waybar.empty #window,#modules-center { + background-color: transparent; + border: none; +} + +tooltip { + background-color: @BACKGROUND; + color: @ACCENT; + border-radius: 4px; + padding: 4px; + font-size: 0.8rem; +} + +/* @keyframes glowing { + 0% { + background-position: 0 0 + } + + 50% { + background-position: 400% 0 + } + + to { + background-position: 0 0 + } +} */ + + +/* .modules-center { + background: linear-gradient(45deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8)); + background-size: 400%; + border-radius: 8px; + animation: glowing 20s linear infinite; +} */ + + +#custom-launcher { + color: @BLUE; + border-radius: 10px; + padding: 0px 16px 0px 16px; + padding-left: 12px; + font-size: 28px; + /* font-size: 2.5rem; */ +} + +/* #custom-gmail.unread { */ +/* color: @WHITE; */ +/* } */ +/* #custom-gmail.inaccurate { */ +/* color: @YELLOW; */ +/* } */ +/* #custom-gmail.error { */ +/* color: @RED; */ +/* } */ + +#workspaces { + background-color: @BACKGROUND; + border-radius: 10px; +} + +#workspaces button { + opacity: 0.8; + border-radius: 12px; + background-color: @YELLOW; + margin-top: 4px; + margin-bottom: 2px; + margin-left: 1px; + margin-right: 1px; + transition: all 0.2s; +} + +#workspaces button.empty { + background-color: @FOREGROUND; + opacity: 0.4; + border-radius: 12px; +} + +#workspaces button.active { + background-color: @ACCENT; + margin-left: 1px; + margin-right: 1px; + padding-left: 14px; + padding-right: 14px; + opacity: 1; +} + + +#workspaces button.urgent { + background-color: @RED; + border-radius: 16px 16px 16px 16px; + opacity: 1; +} + +#temperature.critical { + color: @RED; +} diff --git a/dot-config/wezterm/looks.lua b/dot-config/wezterm/looks.lua new file mode 100644 index 00000000..4d00320f --- /dev/null +++ b/dot-config/wezterm/looks.lua @@ -0,0 +1,10 @@ +local wezterm = require 'wezterm' +local module = {} + +function module.apply_to_config(config) + config.font = wezterm.font 'JetBrains Mono' + config.enable_tab_bar = false + config.window_background_opacity = 0.7 +end + +return module diff --git a/dot-config/wezterm/wezterm.lua b/dot-config/wezterm/wezterm.lua new file mode 100644 index 00000000..c8f56944 --- /dev/null +++ b/dot-config/wezterm/wezterm.lua @@ -0,0 +1,32 @@ +local wezterm = require 'wezterm' +local colors = require 'looks' + +local config = wezterm.config_builder() + +colors.apply_to_config(config) +config.set_environment_variables = { + TERM = "wezterm" +} +config.keys = { + { + key = 'F', + mods = 'CTRL|SHIFT', + action = wezterm.action.Search({ CaseInSensitiveString = '' }) + } +} +-- config.skip_close_confirmation_for_processes_named = { +-- 'bash', +-- 'sh', +-- 'zsh', +-- 'fish', +-- 'tmux', +-- 'nu', +-- 'vim', +-- 'v', +-- 'nvim', +-- 'lvim', +-- } + +config.window_close_confirmation = 'NeverPrompt' + +return config -- cgit v1.2.3