diff --git a/Assets/general.png b/Assets/general.png new file mode 100644 index 0000000..9c02321 Binary files /dev/null and b/Assets/general.png differ diff --git a/Assets/hyprlock.png b/Assets/hyprlock.png new file mode 100644 index 0000000..f8c9bb7 Binary files /dev/null and b/Assets/hyprlock.png differ diff --git a/Assets/rofi_app-launcher.png b/Assets/rofi_app-launcher.png new file mode 100644 index 0000000..b9f84c7 Binary files /dev/null and b/Assets/rofi_app-launcher.png differ diff --git a/Assets/rofi_clipboard.png b/Assets/rofi_clipboard.png new file mode 100644 index 0000000..b834d15 Binary files /dev/null and b/Assets/rofi_clipboard.png differ diff --git a/Assets/rofi_wifi.png b/Assets/rofi_wifi.png new file mode 100644 index 0000000..c0da428 Binary files /dev/null and b/Assets/rofi_wifi.png differ diff --git a/Assets/waybar.png b/Assets/waybar.png new file mode 100644 index 0000000..b3ce4ef Binary files /dev/null and b/Assets/waybar.png differ diff --git a/Configs/hypr/hyprland.conf b/Configs/hypr/hyprland.conf new file mode 100644 index 0000000..3382f15 --- /dev/null +++ b/Configs/hypr/hyprland.conf @@ -0,0 +1,170 @@ + +# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ + + +# Keybinds +source = ~/.config/hypr/keybindings.conf + +################2 +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor = eDP-1,1920x1080@60,0x0,1 + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +exec-once = hyprpaper +exec-once = waybar -c $HOME/.config/waybar/config.jsonc -s $HOME/.config/waybar/styles.css +exec-once = dunst +exec-once = wl-paste --type text --watch cliphist store # clipboard store text data +exec-once = wl-paste --type image --watch cliphist store # clipboard store image data + + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ +env = XCURSOR_SIZE,20 +env = HYPRCURSOR_SIZE,20 + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 7 + + border_size = 3 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col.active_border = rgb(9399b2) rgb(45475a) 45deg + col.inactive_border = rgba(595959aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = true + resize_corner = 4 + + layout = dwindle + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 13 + + # Change transparency of focused and unfocused windows + active_opacity = 0.97 + inactive_opacity = 0.95 + + drop_shadow = true + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = false + size = 3 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = yes + bezier = wind, 0.05, 0.9, 0.1, 1.05 + bezier = winIn, 0.1, 1.1, 0.1, 1.1 + bezier = winOut, 0.3, -0.3, 0, 1 + bezier = liner, 1, 1, 1, 1 + animation = windows, 1, 6, wind, slide + animation = windowsIn, 1, 6, winIn, slide + animation = windowsOut, 1, 5, winOut, slide + animation = windowsMove, 1, 5, wind, slide + # animation = border, 1, 1, liner + # animation = borderangle, 1, 30, liner, loop + animation = fade, 1, 10, default + animation = workspaces, 1, 5, wind +} + +# 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 +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us,ru + kb_variant = + kb_model = + kb_options = grp:win_space_toggle + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = true + scroll_factor = 0.8 + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#gestures +gestures { + workspace_swipe = true +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.3 +} + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + +# Floating windows +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +# Ignore maximize requests from apps. You'll probably like this. +windowrulev2 = suppressevent maximize, class:.* + +# Fix some dragging issues with XWayland +windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 diff --git a/Configs/hypr/hyprlock.conf b/Configs/hypr/hyprlock.conf new file mode 100644 index 0000000..e32232f --- /dev/null +++ b/Configs/hypr/hyprlock.conf @@ -0,0 +1,69 @@ +background { + monitor = + path = $HOME/Pictures/Wallpapers/1.jpg + + blur_passes = 1 # 0 disables blurring + blur_size = 4 + noise = 0.0117 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +input-field { + monitor = + size = 200, 50 + outline_thickness = 3 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + dots_rounding = -1 # -1 default circle, -2 follow input-field rounding + outer_color = rgba(11111be6) + inner_color = rgba(11111be6) + font_color = rgba(cdd6f4ff) + fade_on_empty = true + fade_timeout = 3000 # Milliseconds before fade_on_empty is triggered. + placeholder_text = Input Password... # Text rendered in the input box when it's empty. + hide_input = false + rounding = -1 # -1 means complete rounding (circle/oval) + check_color = rgb(204, 136, 34) + fail_color = rgb(204, 34, 34) # 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, -20 + halign = center + valign = center +} + +label { + monitor = + #clock + text = cmd[update:1000] echo "$TIME" + color = rgb(cdd6f4) + font_size = 90 + font_family = Fira Semibold + position = 0, 150 + halign = center + valign = center + shadow_passes = 5 + shadow_size = 10 +} + +label { + monitor = + text = $USER + color = rgb(cdd6f4) + font_size = 30 + font_family = Fira Semibold + position = 0, 50 + halign = center + valign = center + shadow_passes = 5 + shadow_size = 10 +} diff --git a/Configs/hypr/hyprpaper.conf b/Configs/hypr/hyprpaper.conf new file mode 100644 index 0000000..477236f --- /dev/null +++ b/Configs/hypr/hyprpaper.conf @@ -0,0 +1,6 @@ +preload = $HOME/Pictures/Wallpapers/3.jpg + +wallpaper = eDP-1,$HOME/Pictures/Wallpapers/3.jpg + +#enable splash text rendering over the wallpaper +splash = false \ No newline at end of file diff --git a/Configs/hypr/keybindings.conf b/Configs/hypr/keybindings.conf new file mode 100644 index 0000000..984a835 --- /dev/null +++ b/Configs/hypr/keybindings.conf @@ -0,0 +1,94 @@ +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$terminal = kitty +$fileManager = dolphin +$menu = rofi -show drun +$editor = code +$browser = brave + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, W, exec, $terminal +bind = $mainMod, R, exec, $menu +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, C, exec, $editor +bind = $mainMod, B, exec, $browser +bind = $mainMod, K, exec, keepassxc +bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy + +bind = $mainMod, F2, exec, killall waybar && waybar -c $HOME/.config/waybar/config.jsonc -s $HOME/.config/waybar/styles.css && dunstify "Waybar restarted" + +bind = $mainMod, Q, killactive, +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, F, togglefloating, +bind = $mainMod, D, 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, movetoworkspace, 10 + +# Special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +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 + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 5%- + +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous + +# Screenshots +bind = $mainMod, PRINT, exec, hyprshot -m window -o ~/Pictures/Screen # Screenshot a window +bind = , PRINT, exec, hyprshot -m output -o ~/Pictures/Screen # Screenshot a monitor +bind = $shiftMod, PRINT, exec, hyprshot -m region -o ~/Pictures/Screen # Screenshot a region diff --git a/Configs/rofi/config.rasi b/Configs/rofi/config.rasi new file mode 100644 index 0000000..139673f --- /dev/null +++ b/Configs/rofi/config.rasi @@ -0,0 +1 @@ +@theme "/home/rzx/.config/rofi/themes/launcher.rasi" diff --git a/Configs/rofi/theme.rasi b/Configs/rofi/theme.rasi new file mode 100644 index 0000000..1a6728b --- /dev/null +++ b/Configs/rofi/theme.rasi @@ -0,0 +1,10 @@ +* { + main-bg: #11111be6; + main-fg: #cdd6f4ff; + main-br: #cdd6f4ff; + main-ex: #f5e0dcff; + select-bg: #cdd6f4ff; + select-fg: #11111bff; + separatorcolor: transparent; + border-color: transparent; +} \ No newline at end of file diff --git a/Configs/rofi/themes/launcher.rasi b/Configs/rofi/themes/launcher.rasi new file mode 100644 index 0000000..1458b66 --- /dev/null +++ b/Configs/rofi/themes/launcher.rasi @@ -0,0 +1,93 @@ +@import "~/.config/rofi/theme.rasi" + +* { + font: "Roboto 12"; + + background-color: transparent; + text-color: @main-fg; + + margin: 0px; + padding: 0px; + spacing: 0px; +} + +window { + location: center; + width: 480; + border-radius: 24px; + + background-color: @main-bg; +} + +mainbox { + padding: 12px; +} + +inputbar { + background-color: @main-bg; + border-color: @border-color; + + border: 2px; + border-radius: 10px; + + padding: 8px 16px; + spacing: 8px; + children: [ entry ]; +} + +entry { + placeholder: "Search"; + placeholder-color: @main-fg; +} + +message { + margin: 12px 0 0; + border-radius: 16px; + border-color: @main-br; + background-color: @main-fg; +} + +textbox { + padding: 8px 24px; +} + +listview { + background-color: transparent; + + margin: 12px 0 0; + lines: 8; + columns: 1; + + fixed-height: false; +} + +element { + padding: 8px 16px; + spacing: 8px; + border-radius: 16px; +} + +element normal active { + text-color: @select-fg; +} + +element alternate active { + text-color: @main-ex; +} + +element selected normal, element selected active { + background-color: @select-bg; +} + +element-icon { + size: 1em; + vertical-align: 0.5; +} + +element-text { + text-color: inherit; +} + +element selected { + text-color: @select-fg; +} \ No newline at end of file diff --git a/Configs/rofi/wifi.rasi b/Configs/rofi/wifi.rasi new file mode 100644 index 0000000..8e8c68a --- /dev/null +++ b/Configs/rofi/wifi.rasi @@ -0,0 +1,107 @@ +// Config // +configuration { + modi: "drun"; + show-icons: false; +} + +@theme "~/.config/rofi/theme.rasi" + +// Main // +window { + height: 16em; + width: 18em; + transparency: "real"; + fullscreen: false; + enabled: true; + cursor: "default"; + spacing: 0em; + padding: 0em; +// border-color: @main-br; + background-color: @main-bg; +} +mainbox { + enabled: true; + spacing: 0em; + padding: 0.5em 0em; + orientation: vertical; + children: [ "wallbox" , "listbox" ]; + background-color: transparent; +} +wallbox { + spacing: 0em; + margin: 0em 0.5em; + padding: -1.2em; + expand: false; + orientation: horizontal; + background-color: transparent; + children: [ "inputbar" ]; +} + +// Inputs // +inputbar { + enabled: true; + padding: -0.2em 0.3em; + children: [ "entry" ]; + background-color: @main-bg; + expand: true; +} +entry { + enabled: true; + padding: 1.8em; + text-color: @main-fg; + background-color: transparent; +} + +// Lists // +listbox { + spacing: 0em; + padding: 0em; + orientation: vertical; + children: [ "dummy" , "listview" , "dummy" ]; + background-color: transparent; +} +listview { + enabled: true; + padding: 0.4em 0.5em; + spacing: 0em; + columns: 1; + lines: 7; + cycle: false; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + expand: false; + fixed-height: true; + fixed-columns: false; + expand: false; + cursor: "default"; + background-color: transparent; + text-color: @main-fg; +} +dummy { + spacing: 0em; + padding: 0em; + background-color: transparent; +} + +// Elements // +element { + enabled: true; + padding: 0.4em; + cursor: pointer; + background-color: transparent; + text-color: @main-fg; +} +element selected.normal { + background-color: @select-bg; + text-color: @select-fg; + border-radius: 0.5em; +} +element-text { + vertical-align: 0.0; + horizontal-align: 0.0; + cursor: inherit; + background-color: transparent; + text-color: inherit; +} \ No newline at end of file diff --git a/Configs/waybar/config.jsonc b/Configs/waybar/config.jsonc new file mode 100644 index 0000000..a045b2c --- /dev/null +++ b/Configs/waybar/config.jsonc @@ -0,0 +1,388 @@ +{ + "layer": "top", + "position": "top", + "mode": "dock", + "height": 28, // uncomment to set fixed height + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "reload_style_on_change": true, + + // Positions + "modules-left": [ + "custom/ws", // window icon + "custom/left1", + + "hyprland/workspaces", // workspaces + "custom/right1", + + "custom/paddw", + "hyprland/window" // window title + ], + + "modules-center": [ + "custom/paddc", + "custom/left2", + "custom/cpuinfo", // temperature + + "custom/left3", + "memory", // memory + + "custom/left4", + "custom/cpu", // cpu + "custom/leftin1", + + "custom/left5", + "idle_inhibitor", // arch logo + "custom/right2", + + "custom/rightin1", + "clock#time", // time + "custom/right3", + + "clock#date", // date + "custom/right4", + + "custom/wifi", // connection + "custom/right5" + ], + + "modules-right": [ + "tray", // tray + + "custom/left6", + "hyprland/language", // language + + "custom/left7", + "pulseaudio", // output device + + "custom/left8", + "custom/backlight", // brightness + + "custom/left9", + "battery", // battery + + "custom/leftin2", + "custom/power" // power button + ], + + // Modules + "custom/ws": { + "format": "  ", + "tooltip": false, + "min-length": 3, + "max-length": 4 + }, + + "hyprland/workspaces": { + "all-outputs": false, + "active-only": false, + "on-click": "activate", + "disable-scroll": false, + "on-scroll-up": "hyprctl dispatch workspace -1", + "on-scroll-down": "hyprctl dispatch workspace +1", + "persistent-workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [] + }, + "sort-by-number": true + }, + + "hyprland/window": { + "format": "{}", + "separate-outputs": true, + "rewrite": { + // desktop + "": " Hyprland", + + // terminal + "sejjy@archlinux:(.*)": " $1", + "(.*)sejjy@archlinux:~": " sejjy@archlinux", + + // Firefox + "(.*) — Mozilla Firefox": "󰈹 $1", + "(.*)Mozilla Firefox": "󰈹 Firefox", + + // VSCode + "(.*) - Visual Studio Code": "󰨞 $1", + "(.*)Visual Studio Code": "󰨞 Visual Studio Code", + + // Spotify + "(.*)Spotify": " Spotify", + "(.*)Spotify Premium": " Spotify Premium", + + // Discord + "vesktop": " Discord", + "• Discord(.*)": "Discord$1", + "(.*)Discord(.*)": " $1Discord$2", + + // OBS Studio + "OBS(.*)": "󰐌 OBS Studio", + + // VLC Media Player + "VLC media player": "󰕼 VLC Media Player", + "(.*) - VLC media player": "󰕼 $1", + + // GIMP + "GNU Image Manipulation Program": " GNU Image Manipulation Program", + + // Godot + "Godot": " Godot Engine", + "Godot Engine - (.*)": " $1", + "(.*) - Godot Engine": " $1", + + // OnlyOffice + "ONLYOFFICE Desktop Editors": " OnlyOffice Desktop", + "(.*).docx": " $1.docx", + "(.*).xlsx": " $1.xlsx", + "(.*).pptx": " $1.pptx", + "(.*).pdf": " $1.pdf", + + // file manager + "/": " File Manager", + + // qView + "qView": " qView", + "(.*).jpg": " $1.jpg", + "(.*).png": " $1.png", + "(.*).svg": " $1.svg", + + // Timeshift + "Timeshift-gtk": " Timeshift", + + // security + "Authenticate": " Authenticate" + }, + "min-length": 5, + "max-length": 45 + }, + + "custom/cpuinfo": { + "exec": "~/.config/waybar/scripts/cpuinfo.sh", + "return-type": "json", + "format": "{}", + "tooltip": true, + "interval": 5, + "min-length": 8, + "max-length": 8 + }, + + "memory": { + "states": { "c": 90 }, + "format": "󰘚 {percentage}%", + "format-c": "󰀪 {percentage}%", + "tooltip": true, + "tooltip-format": "Memory Used: {used:0.1f} GB / {total:0.1f} GB", + "interval": 5, + "min-length": 7, + "max-length": 7 + }, + + "custom/cpu": { + "exec": "~/.config/waybar/scripts/cpuusage.sh", + "return-type": "json", + "tooltip": true, + "interval": 5, + "min-length": 6, + "max-length": 6 + }, + + "idle_inhibitor": { + "format": "rzx.ovh", + "tooltip": true, + "tooltip-format-activated": "Presentation Mode", + "tooltip-format-deactivated": "Idle Mode", + "start-activated": false, + "timeout": 5 + }, + + "clock#time": { + "format": "󱑂 {:%H:%M}", + "tooltip": true, + "tooltip-format": "12-hour Format: {:%I:%M %p}", + "min-length": 8, + "max-length": 8 + }, + + "clock#date": { + "format": "󰨳 {:%m-%d}", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "mode-mon-col": 6, + "on-click-right": "mode", + "format": { "today": "{}" } + }, + "actions": { "on-click-right": "mode" }, + "min-length": 8, + "max-length": 8 + }, + + "custom/wifi": { + "exec": "~/.config/waybar/scripts/wifiinfo.sh", + "return-type": "json", + "format": "{}", // in wifiinfo.sh, change "Wi-Fi" to "${essid}" to display network name + "tooltip": true, + "on-click": "~/.config/waybar/scripts/wifimenu.sh", + "interval": 1, + "min-length": 7, + "max-length": 7 + }, + + "tray": { + "icon-size": 18, + "rotate": 0, + "spacing": 10 + }, + + "hyprland/language": { + "format": "{}", + "format-en": "EN", + "format-ru": "RU", + "min-length": 5, + "max-length": 5 + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "󰝟 {volume}%", + "format-icons": { + "headphone": "󰋋", + "default": ["󰕿", "󰖀", "󰕾"] + }, + "tooltip": true, + "tooltip-format": "Device: {desc}", + "on-click": "~/.config/waybar/scripts/volumecontrol.sh -o m", + "on-scroll-up": "~/.config/waybar/scripts/volumecontrol.sh -o i", + "on-scroll-down": "~/.config/waybar/scripts/volumecontrol.sh -o d", + "min-length": 6, + "max-length": 6 + }, + + "custom/backlight": { + "exec": "~/.config/waybar/scripts/brightnesscontrol.sh", + "return-type": "json", + "format": "{}", + "tooltip": true, + "on-scroll-up": "~/.config/waybar/scripts/brightnesscontrol.sh -o i", + "on-scroll-down": "~/.config/waybar/scripts/brightnesscontrol.sh -o d", + "interval": 1, + "min-length": 6, + "max-length": 6 + }, + + "battery": { + "states": { + "warning": 30, + "critical": 20 + }, + "format": "{icon} {capacity}%", + "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], + "format-charging": "󱘖 {capacity}%", + "tooltip-format": "Time to Empty: {time}", + "tooltip-format-charging": "Time to Full: {time}", + "interval": 1, + "min-length": 6, + "max-length": 6 + }, + + "custom/power": { + "format": " ", + "tooltip": false, + "on-click": "~/.config/waybar/scripts/logoutlaunch.sh 2", + "on-click-right": "~/.config/waybar/scripts/logoutlaunch.sh 1", + "interval": 86400 + }, + + // Padding + "custom/paddw": { + "format": " ", + "tooltip": false + }, + + // adjust padding in style.css if you have a long network name + // so that the modules remain centered. + "custom/paddc": { + "format": " ", + "tooltip": false + }, + + // Left Arrows + "custom/left1": { + "format": "", + "tooltip": false + }, + "custom/left2": { + "format": "", + "tooltip": false + }, + "custom/left3": { + "format": "", + "tooltip": false + }, + "custom/left4": { + "format": "", + "tooltip": false + }, + "custom/left5": { + "format": "", + "tooltip": false + }, + "custom/left6": { + "format": "", + "tooltip": false + }, + "custom/left7": { + "format": "", + "tooltip": false + }, + "custom/left8": { + "format": "", + "tooltip": false + }, + "custom/left9": { + "format": "", + "tooltip": false + }, + + // Right Arrows + "custom/right1": { + "format": "", + "tooltip": false + }, + "custom/right2": { + "format": "", + "tooltip": false + }, + "custom/right3": { + "format": "", + "tooltip": false + }, + "custom/right4": { + "format": "", + "tooltip": false + }, + "custom/right5": { + "format": "", + "tooltip": false + }, + + // Left Inverse + "custom/leftin1": { + "format": "", + "tooltip": false + }, + "custom/leftin2": { + "format": "", + "tooltip": false + }, + + // Right Inverse + "custom/rightin1": { + "format": "", + "tooltip": false + } +} \ No newline at end of file diff --git a/Configs/waybar/scripts/brightnesscontrol.sh b/Configs/waybar/scripts/brightnesscontrol.sh new file mode 100755 index 0000000..4257450 --- /dev/null +++ b/Configs/waybar/scripts/brightnesscontrol.sh @@ -0,0 +1,92 @@ +#!/bin/bash + +# Print error message for invalid arguments +print_error() { + cat <<"EOF" +Usage: ./brightnesscontrol.sh +Valid actions are: + i -- ncrease brightness [+5%] + d -- ecrease brightness [-5%] +EOF +} + +# Send a notification with brightness info +send_notification() { + brightness=$(brightnessctl info | grep -oP "(?<=\()\d+(?=%)") + notify-send -r 91190 "Brightness: ${brightness}%" +} + +# Get the current brightness percentage and device name +get_brightness() { + brightness=$(brightnessctl -m | grep -o '[0-9]\+%' | head -c-2) + device=$(brightnessctl -m | head -n 1 | awk -F',' '{print $1}' | sed 's/_/ /g; s/\<./\U&/g') # Get device name + current_brightness=$(brightnessctl -m | head -n 1 | awk -F',' '{print $3}') # Get current brightness + max_brightness=$(brightnessctl -m | head -n 1 | awk -F',' '{print $5}') # Get max brightness +} +get_brightness + +# Handle options +while getopts o: opt; do + case "${opt}" in + o) + case $OPTARG in + i) # Increase brightness + if [[ $brightness -lt 10 ]]; then + brightnessctl set +1% + else + brightnessctl set +5% + fi + send_notification + ;; + d) # Decrease brightness + if [[ $brightness -le 1 ]]; then + brightnessctl set 1% + elif [[ $brightness -le 10 ]]; then + brightnessctl set 1%- + else + brightnessctl set 5%- + fi + send_notification + ;; + *) + print_error + ;; + esac + ;; + *) + print_error + ;; + esac +done + +# Determine the icon based on brightness level +get_icon() { + if ((brightness <= 5)); then + icon="" + elif ((brightness <= 15)); then + icon="" + elif ((brightness <= 30)); then + icon="" + elif ((brightness <= 45)); then + icon="" + elif ((brightness <= 55)); then + icon="" + elif ((brightness <= 65)); then + icon="" + elif ((brightness <= 80)); then + icon="" + elif ((brightness <= 95)); then + icon="" + else + icon="" + fi +} + +# Backlight module and tooltip +get_icon +module="${icon} ${brightness}%" + +tooltip="Device Name: ${device}" +tooltip+="\nBrightness: ${current_brightness} / ${max_brightness}" + +echo "{\"text\": \"${module}\", \"tooltip\": \"${tooltip}\"}" diff --git a/Configs/waybar/scripts/cpuinfo.sh b/Configs/waybar/scripts/cpuinfo.sh new file mode 100755 index 0000000..d506e57 --- /dev/null +++ b/Configs/waybar/scripts/cpuinfo.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Get CPU clock speeds +freqlist=$(awk '/cpu MHz/ {print $4}' /proc/cpuinfo) # Extract clock speed in MHz +maxfreq=$(sed 's/...$//' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) # Max CPU frequency +frequency=$(echo "$freqlist" | tr ' ' '\n' | awk "{sum+=\$1} END {printf \"%.0f/$maxfreq MHz\", sum/NR}") # Average frequency + +# Get CPU temperature in Celsius +temp=$(sensors | awk '/Package id 0/ {print $4}' | awk -F '[+.]' '{print $2}') # Package temperature +if [[ -z "$temp" ]]; then + temp=$(sensors | awk '/Tctl/ {print $2}' | tr -d '+°C') # Fallback to Tctl if Package id 0 is empty +fi +if [[ -z "$temp" ]]; then + temp="N/A" # If no temp found, set to N/A +fi + +# Map icons based on temperature and utilization +set_ico="{\"thermo\":{\"0\":\"󱃃\",\"45\":\"󰔏\",\"65\":\"󱃂\",\"85\":\"󰸁\"},\"util\":{\"0\":\"󰾆\",\"30\":\"󰾅\",\"60\":\"󰓅\",\"90\":\"󰀪\"}}" +eval_ico() { + local key="$1" + local value="$2" + map_ico=$(echo "$set_ico" | jq -r --arg aky "$key" --argjson avl "$value" '.[$aky] | keys_unsorted | map(tonumber) | map(select(. <= $avl)) | max') + echo "$set_ico" | jq -r --arg aky "$key" --arg avl "$map_ico" '.[$aky] | .[$avl]' # Get the corresponding icon +} + +thermo=$(eval_ico thermo "$temp") # Get temperature icon + +tooltip="Clock Speed: ${frequency}" + +# Module and tooltip +echo "{\"text\": \"${thermo} ${temp}°C\", \"tooltip\": \"$tooltip\"}" diff --git a/Configs/waybar/scripts/cpuusage.sh b/Configs/waybar/scripts/cpuusage.sh new file mode 100755 index 0000000..6f1dea2 --- /dev/null +++ b/Configs/waybar/scripts/cpuusage.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Get CPU model (removed "(R)", "(TM)", and clock speed) +model=$(awk -F ': ' '/model name/{print $2}' /proc/cpuinfo | head -n 1 | sed 's/@.*//; s/ *\((R)\|(TM)\)//g; s/^[ \t]*//; s/[ \t]*$//') + +# Get CPU usage percentage +load=$(vmstat 1 2 | tail -1 | awk '{print 100 - $15}') + +# Determine CPU state based on usage +if [ "$load" -le 25 ]; then + state="Low" +elif [ "$load" -le 50 ]; then + state="Medium" +else + state="High" +fi + +tooltip="${model}" +tooltip+="\nCPU Usage: ${state}" + +# Module and tooltip +echo "{\"text\": \"󰻠 ${load}%\", \"tooltip\": \"${tooltip}\"}" diff --git a/Configs/waybar/scripts/image.png b/Configs/waybar/scripts/image.png new file mode 100644 index 0000000..c2ba29c Binary files /dev/null and b/Configs/waybar/scripts/image.png differ diff --git a/Configs/waybar/scripts/logoutlaunch.sh b/Configs/waybar/scripts/logoutlaunch.sh new file mode 100755 index 0000000..f750662 --- /dev/null +++ b/Configs/waybar/scripts/logoutlaunch.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# Check if wlogout is already running +if pgrep -x "wlogout" > /dev/null; then + pkill -x "wlogout" + exit 0 +fi + +# Define configuration directories +confDir="${XDG_CONFIG_HOME:-$HOME/.config}" + +# Style selection +[ -z "${1}" ] || wlogoutStyle="${1}" +wLayout="${confDir}/wlogout/layout_${wlogoutStyle}" +wlTmplt="${confDir}/wlogout/style_${wlogoutStyle}.css" + +if [ ! -f "${wLayout}" ] || [ ! -f "${wlTmplt}" ]; then + echo "ERROR: Config ${wlogoutStyle} not found..." + wlogoutStyle=1 + wLayout="${confDir}/wlogout/layout_${wlogoutStyle}" + wlTmplt="${confDir}/wlogout/style_${wlogoutStyle}.css" +fi + +# Detect monitor resolution +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 "${wlogoutStyle}" in + 1) + wlColms=6 + export mgn=$(( y_mon * 38 / hypr_scale )) + export hvr=$(( y_mon * 33 / hypr_scale )) + ;; + 2) + wlColms=2 + export x_mgn=$(( x_mon * 38 / hypr_scale )) + export y_mgn=$(( y_mon * 28 / hypr_scale )) + export x_hvr=$(( x_mon * 35 / hypr_scale )) + export y_hvr=$(( y_mon * 23 / hypr_scale )) + ;; +esac + +# Scale font size +export fntSize=$(( y_mon * 2 / 100 )) + +export BtnCol="white" # Default button color + +# Evaluate hypr border radius +hypr_border="$(hyprctl -j getoption decoration:rounding | jq '.int')" +export hypr_border +export active_rad=$(( hypr_border * 5 )) +export button_rad=$(( hypr_border * 8 )) + +# Evaluate 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/Configs/waybar/scripts/volumecontrol.sh b/Configs/waybar/scripts/volumecontrol.sh new file mode 100755 index 0000000..17838c0 --- /dev/null +++ b/Configs/waybar/scripts/volumecontrol.sh @@ -0,0 +1,111 @@ +#!/bin/bash + +# Define functions +print_error() { + cat <<"EOF" +Usage: ./volumecontrol.sh -[device] +...valid devices are... + i -- input device + o -- output device + p -- player application +...valid actions are... + i -- increase volume [+5] + d -- decrease volume [-5] + m -- mute [x] +EOF + exit 1 +} + +send_notification() { + vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | sed 's/%//') + notify-send -r 91190 "Volume: ${vol}%" +} + +notify_mute() { + mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') + if [ "${mute}" = "yes" ]; then + notify-send -r 91190 "Muted" + else + notify-send -r 91190 "Unmuted" + fi +} + +action_volume() { + case "${1}" in + i) + # Check current volume and increase only if below 100 + current_vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | sed 's/%//') + if [ "$current_vol" -lt 100 ]; then + new_vol=$((current_vol + 5)) + if [ "$new_vol" -gt 100 ]; then + new_vol=100 + fi + pactl set-sink-volume @DEFAULT_SINK@ "${new_vol}%" + fi + ;; + d) + # Decrease volume, ensuring it doesn't drop below 0% + current_vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | sed 's/%//') + new_vol=$((current_vol - 5)) + if [ "$new_vol" -lt 0 ]; then + new_vol=0 + fi + pactl set-sink-volume @DEFAULT_SINK@ "${new_vol}%" + ;; + esac +} + +select_output() { + if [ "$@" ]; then + desc="$*" + device=$(pactl list sinks | grep -C2 -F "Description: $desc" | grep Name | cut -d: -f2 | xargs) + if pactl set-default-sink "$device"; then + notify-send -r 91190 "Activated: $desc" + else + notify-send -r 91190 "Error activating $desc" + fi + else + pactl list sinks | grep -ie "Description:" | awk -F ': ' '{print $2}' | sort + fi +} + +# Evaluate device option +while getopts iops: DeviceOpt; do + case "${DeviceOpt}" in + i) + nsink=$(pactl list sources short | awk '{print $2}') + [ -z "${nsink}" ] && echo "ERROR: Input device not found..." && exit 0 + srce="--default-source" + ;; + o) + nsink=$(pactl list sinks short | awk '{print $2}') + [ -z "${nsink}" ] && echo "ERROR: Output device not found..." && exit 0 + srce="" + ;; + p) + nsink=$(playerctl --list-all | grep -w "${OPTARG}") + [ -z "${nsink}" ] && echo "ERROR: Player ${OPTARG} not active..." && exit 0 + # shellcheck disable=SC2034 + srce="${nsink}" + ;; + s) + # Select an output device + select_output "$@" + exit + ;; + *) print_error ;; + esac +done + +# Set default variables +shift $((OPTIND - 1)) + +# Execute action +case "${1}" in +i) action_volume i ;; +d) action_volume d ;; +m) pactl set-sink-mute @DEFAULT_SINK@ toggle && notify_mute && exit 0 ;; +*) print_error ;; +esac + +send_notification diff --git a/Configs/waybar/scripts/wifiinfo.sh b/Configs/waybar/scripts/wifiinfo.sh new file mode 100755 index 0000000..c3726a6 --- /dev/null +++ b/Configs/waybar/scripts/wifiinfo.sh @@ -0,0 +1,178 @@ +#!/bin/bash + +# This script gathers detailed Wi-Fi connection information. +# It collects the following fields: +# +# - SSID (Service Set Identifier): The name of the Wi-Fi network you +# are currently connected to. Example: "My_Network" +# +# - IP Address: The IP address assigned to the device by the router. +# This is typically a private IP within the local network. Example: +# "192.168.1.29/24" (with subnet mask) +# +# - Router (Gateway): The IP address of the router (default gateway) +# that your device uses to communicate outside the local network. +# Example: "192.168.1.1" +# +# - MAC Address: The unique Media Access Control address of the local +# device's Wi-Fi adapter. Example: "F8:34:41:07:1B:65" +# +# - Security: The encryption protocol being used to secure your Wi-Fi +# connection. Common security protocols include: +# - WPA2 (Wi-Fi Protected Access 2): The most commonly used security +# standard, offering strong encryption (AES). +# - WPA3: The latest version, providing even stronger security, +# especially in public or open networks. +# - WEP (Wired Equivalent Privacy): An outdated and insecure protocol +# that should not be used. +# Example: "WPA2" indicates that the connection is secured using WPA2 +# with AES encryption. +# +# - BSSID (Basic Service Set Identifier): The MAC address of the Wi-Fi +# access point you are connected to. Example: "A4:22:49:DA:91:A0" +# +# - Channel: The wireless channel your Wi-Fi network is using. This is +# associated with the frequency band. Example: "100 (5500 MHz)" +# indicates the channel number (100) and the frequency (5500 MHz), +# which is within the 5 GHz band. +# +# - RSSI (Received Signal Strength Indicator): The strength of the +# Wi-Fi signal, typically in dBm (decibels relative to 1 milliwatt). +# Closer to 0 means stronger signal, with values like -40 dBm being +# very good. Example: "-40 dBm" +# +# - Signal: The signal quality, which is represented as a percentage, +# where higher numbers mean better signal. Example: "100" +# indicates perfect signal strength. +# +# - Rx Rate (Receive Rate): The maximum data rate (in Mbit/s) at which +# the device can receive data from the Wi-Fi access point. Example: +# "866.7 MBit/s" indicates a high-speed connection on a modern +# standard. +# +# - Tx Rate (Transmit Rate): The maximum data rate (in Mbit/s) at +# which the device can send data to the Wi-Fi access point. Example: +# "866.7 MBit/s" +# +# - PHY Mode (Physical Layer Mode): The Wi-Fi protocol or standard in +# use. Common modes include 802.11n, 802.11ac, and 802.11ax (Wi-Fi +# 6). Example: "802.11ac" indicates you're using the 5 GHz band with +# a modern high-speed standard. + +if ! command -v nmcli &>/dev/null; then + echo "{\"text\": \"󰤮 Wi-Fi\", \"tooltip\": \"nmcli utility is missing\"}" + exit 1 +fi + +# Check if Wi-Fi is enabled +wifi_status=$(nmcli radio wifi) + +if [ "$wifi_status" = "disabled" ]; then + tooltip="Wi-Fi Disabled" + icon="󰤮" # Icon for no connection or disabled + echo "{\"text\": \"${icon} Wi-Fi\", \"tooltip\": \"${tooltip}\"}" + exit 0 +fi + +wifi_info=$(nmcli -t -f active,ssid,signal,security dev wifi | grep "^yes") + +# If no ESSID is found, set a default value +if [ -z "$wifi_info" ]; then + essid="No Connection" + signal=0 + tooltip="No Connection" +else + # Some defaults + ip_address="127.0.0.1" + # gateway="127.0.0.1" + # mac_address="N/A" + security=$(echo "$wifi_info" | awk -F: '{print $4}') + # bssid="N/A" + chan="N/A" + # rssi="N/A" + rx_bitrate="" + tx_bitrate="" + phy_mode="" + signal=$(echo "$wifi_info" | awk -F: '{print $3}') + + active_device=$(nmcli -t -f DEVICE,STATE device status | + grep -w "connected" | + grep -v -E "^(dummy|lo:)" | + awk -F: '{print $1}') + + if [ -n "$active_device" ]; then + output=$(nmcli -e no -g ip4.address,ip4.gateway,general.hwaddr device show "$active_device") + + ip_address=$(echo "$output" | sed -n '1p') + # gateway=$(echo "$output" | sed -n '2p') + # mac_address=$(echo "$output" | sed -n '3p') + + line=$(nmcli -e no -t -f active,bssid,chan,freq device wifi | grep "^yes") + + # bssid=$(echo "$line" | awk -F':' '{print $2":"$3":"$4":"$5":"$6":"$7}') + chan=$(echo "$line" | awk -F':' '{print $8}') + freq=$(echo "$line" | awk -F':' '{print $9}') + chan="$chan ($freq)" + + if command -v iw &>/dev/null; then + iw_output=$(iw dev "$active_device" station dump) + # rssi=$(echo "$iw_output" | grep "signal:" | awk '{print $2 " dBm"}') + + # Upload speed + rx_bitrate=$(echo "$iw_output" | grep "rx bitrate:" | awk '{print $3 " " $4}') + + # Download speed + tx_bitrate=$(echo "$iw_output" | grep "tx bitrate:" | awk '{print $3 " " $4}') + + # Physical Layer Mode + if echo "$iw_output" | grep -E -q "rx bitrate:.* VHT"; then + phy_mode="802.11ac" # Wi-Fi 5 + elif echo "$iw_output" | grep -E -q "rx bitrate:.* HT"; then + phy_mode="802.11n" # Wi-Fi 4 + elif echo "$iw_output" | grep -E -q "rx bitrate:.* HE"; then + phy_mode="802.11ax" # Wi-Fi 6 + fi + fi + + # Get the current Wi-Fi ESSID + essid=$(echo "$wifi_info" | awk -F: '{print $2}') + + tooltip="${essid}\n" + tooltip+="\nIP Address: ${ip_address}" + # tooltip+="\nRouter: ${gateway}" + # tooltip+="\nMAC Address: ${mac_address}" + tooltip+="\nSecurity: ${security}" + # tooltip+="\nBSSID: ${bssid}" + tooltip+="\nChannel: ${chan}" + # tooltip+="\nRSSI: ${rssi}" + tooltip+="\nStrength: ${signal} / 100" + + if [ -n "$rx_bitrate" ]; then + tooltip+="\nRx Rate: ${rx_bitrate}" + fi + + if [ -n "$tx_bitrate" ]; then + tooltip+="\nTx Rate: ${tx_bitrate}" + fi + + if [ -n "$phy_mode" ]; then + tooltip+="\nPHY Mode: ${phy_mode}" + fi + fi +fi + +# Determine Wi-Fi icon based on signal strength +if [ "$signal" -ge 80 ]; then + icon="󰤨" # Strong signal +elif [ "$signal" -ge 60 ]; then + icon="󰤥" # Good signal +elif [ "$signal" -ge 40 ]; then + icon="󰤢" # Weak signal +elif [ "$signal" -ge 20 ]; then + icon="󰤟" # Very weak signal +else + icon="󰤮" # No signal +fi + +# Change "Wi-Fi" to "${essid}" to display network name +echo "{\"text\": \"${icon} Wi-Fi\", \"tooltip\": \"${tooltip}\"}" diff --git a/Configs/waybar/scripts/wifimenu.sh b/Configs/waybar/scripts/wifimenu.sh new file mode 100755 index 0000000..4facd2d --- /dev/null +++ b/Configs/waybar/scripts/wifimenu.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +hypr_border=1 +roconf="$HOME/.config/rofi/wifi.rasi" + +# Set rofi scaling +[[ "${rofiScale}" =~ ^[0-9]+$ ]] || rofiScale=10 +r_scale="configuration { font: \"JetBrainsMono Nerd Font ${rofiScale}\"; }" +wind_border=$((hypr_border * 3 / 2)) +elem_border=$([ "$hypr_border" -eq 0 ] && echo "5" || echo "$hypr_border") + +# Ensure that hypr_width, wind_border, and elem_border have valid numeric values +[[ "${hypr_width}" =~ ^[0-9]+$ ]] || hypr_width=2 +[[ "${wind_border}" =~ ^[0-9]+$ ]] || wind_border=0 +[[ "${elem_border}" =~ ^[0-9]+$ ]] || elem_border=0 + +# Get monitor resolution and calculate center position +readarray -t monRes < <(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width,.height,.scale') +monRes[2]="${monRes[2]//./}" +monRes[0]=$((monRes[0] * 100 / monRes[2])) +monRes[1]=$((monRes[1] * 100 / monRes[2])) + +x_pos_center=$((monRes[0] / 2)) +y_pos_center=$((monRes[1] / 2)) + +# Rofi override to center window on screen +r_override="window { anchor: center; x-offset: -${x_pos_center}px; y-offset: -${y_pos_center}px; border: ${hypr_width}px; border-radius: 15px; } wallbox { border-radius: 10px; } element { border-radius: 10px; }" + +# Notify the user about fetching Wi-Fi networks +notify-send "Searching for available Wi-Fi networks..." + +# Get a list of available Wi-Fi connections and format it +wifi_list=$(nmcli --fields "SECURITY,SSID" device wifi list | sed 1d | sed 's/ */ /g' | sed -E "s/WPA*.?\S/  /g" | sed "s/^--/  /g" | sed "s/  / /g" | sed "/--/d") + +# Check Wi-Fi status +connected=$(nmcli -fields WIFI g) +if [[ "$connected" =~ "enabled" ]]; then + toggle=" 󰤭 Disable Wi-Fi" +elif [[ "$connected" =~ "disabled" ]]; then + toggle=" 󰤨 Enable Wi-Fi" +fi + +# Use rofi to select Wi-Fi network +chosen_network=$(echo -e "  Manual Entry\n$toggle\n$wifi_list" | uniq -u | rofi -dmenu -i -selected-row 1 -theme-str "entry { placeholder: \"Search\"; }" -theme-str "${r_scale}" -theme-str "${r_override}" -config "${roconf}" -p "Wi-Fi SSID") + +# Get the name of the connection +read -r chosen_id <<< "${chosen_network:3}" + +# Perform actions based on the selected option +if [ "$chosen_network" = "" ]; then + exit +elif [ "$chosen_network" = " 󰤨 Enable Wi-Fi" ]; then + nmcli radio wifi on +elif [ "$chosen_network" = " 󰤭 Disable Wi-Fi" ]; then + nmcli radio wifi off +elif [ "$chosen_network" = "  Manual Entry" ]; then + # Prompt for manual SSID and password + manual_ssid=$(rofi -dmenu -theme-str "entry { placeholder: \"SSID\"; }" -theme-str "${r_scale}" -theme-str "${r_override}" -config "${roconf}" -p "Enter SSID:") + if [ -z "$manual_ssid" ]; then + exit + fi + + manual_password=$(rofi -dmenu -theme-str "entry { placeholder: \"Password\"; }" -theme-str "${r_scale}" -theme-str "${r_override}" -config "${roconf}" -p "Enter Password (optional):") + + if [ -z "$manual_password" ]; then + nmcli device wifi connect "$manual_ssid" + else + nmcli device wifi connect "$manual_ssid" password "$manual_password" + fi +else + # Message to show when connection is activated successfully + success_message="You are now connected to \"$chosen_id\"." + + # Get saved connections + saved_connections=$(nmcli -g NAME connection) + if [[ $(echo "$saved_connections" | grep -w "$chosen_id") = "$chosen_id" ]]; then + nmcli connection up id "$chosen_id" | grep "successfully" && notify-send "Connection Established" "$success_message" + else + if [[ "$chosen_network" =~ " " ]]; then + wifi_password=$(rofi -dmenu -theme-str "entry { placeholder: \"Password: \"; }" -theme-str "${r_scale}" -theme-str "${r_override}" -config "${roconf}" -p "Password: ") + fi + nmcli device wifi connect "$chosen_id" password "$wifi_password" | grep "successfully" && notify-send "Connection Established" "$success_message" + fi +fi diff --git a/Configs/waybar/styles.css b/Configs/waybar/styles.css new file mode 100644 index 0000000..fe1d419 --- /dev/null +++ b/Configs/waybar/styles.css @@ -0,0 +1,366 @@ +/* Global Styling */ +* { + border: none; + font-family: "JetBrainsMono Nerd Font"; + font-weight: bold; + font-size: 14px; + min-height: 14px; + color: rgba(200, 200, 200, 1.0); +} + +@import "./theme.css"; + +/* Main Background */ +window#waybar { + background: @background; +} + +/* [new] Drop Shadow */ +window#waybar > box { + background-color: transparent; + box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 1); + margin: 2px 2px 2px 2px; +} + +/* Tooltip Styling */ +tooltip { + color: @foreground; + background: @background; + border: solid; + border-width: 1.5px; + border-radius: 7px; + border-color: white; +} + +/* Workspace Button */ +#workspaces button { + color: @foreground; + border-radius: 8px; + box-shadow: none; + margin-top: 2px; + margin-right: 0px; + margin-bottom: 2px; + margin-left: 0px; + padding: 0px; + padding-right: 2px; + padding-left: 2px; + animation: ws_normal 20s ease-in-out 1; +} + +/* Active Workspace Button */ +#workspaces button.active { + color: @active-fg; + background: @active-bg; + text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 1); + margin-right: 2px; + margin-left: 2px; + padding-right: 6px; + padding-left: 6px; + animation: ws_active 20s ease-in-out 1; + transition: all 0.4s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +/* Hover Effect for Workspace Buttons */ +#workspaces button:hover { + color: @hover-fg; + background: @hover-bg; + box-shadow: none; + animation: ws_hover 20s ease-in-out 1; + transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +/* General Module Styling */ +#custom-ws, +#workspaces, +#window, +#custom-cpuinfo, +#memory, +#custom-cpu, +#clock, +#custom-wifi, +#pulseaudio, +#custom-backlight, +#battery, +#custom-power { + opacity: 1; + margin-bottom: 0px; + padding-right: 4px; + padding-left: 4px; + text-shadow: 0px 0px 2px rgba(0, 0, 0, 1); +} + +/* General Left Arrow Styling */ +#custom-left1, +#custom-left2, +#custom-left3, +#custom-left4, +#custom-left5, +#custom-left6, +#custom-left7, +#custom-left8, +#custom-left9 { + font-size: 11pt; + text-shadow: -1px 0px 2px rgba(0, 0, 0, 1); +} + +/* General Right Arrow Styling */ +#custom-right1, +#custom-right2, +#custom-right3, +#custom-right4, +#custom-right5 { + font-size: 11pt; + padding-right: 3px; + text-shadow: 1px 0px 2px rgba(0, 0, 0, 1); +} + +/* Color Definitions */ +@define-color workspaces #181825; +@define-color cpuinfo #181825; +@define-color memory #1e1e2e; +@define-color cpu #313244; +@define-color arch #9399b2; +@define-color time #313244; +@define-color date #1e1e2e; +@define-color wifi #181825; +@define-color language #161621; +@define-color pulseaudio #181825; +@define-color backlight #1e1e2e; +@define-color battery #313244; +@define-color power #9399b2; + +/* Window Icon */ +#custom-ws { + background: @background; +} + +/* Workspaces */ +#custom-left1 { + color: @workspaces; + background: @background; + padding-left: 2px; +} + +#workspaces { + background: @workspaces; +} + +#custom-right1 { + color: @workspaces; + background: @background; +} + +/* Temperature */ +#custom-paddc { + padding-right: 22px; +} + +#custom-left2 { + color: @cpuinfo; + background: @background; + border-radius: 10px; + padding-left: 3px; +} + +#custom-cpuinfo { + background: @cpuinfo; + padding-left: 1px; + padding-right: 0px; +} + +/* Memory */ +#custom-left3 { + color: @memory; + background: @cpuinfo; + padding-left: 3px; +} + +#memory { + background: @memory; + padding-left: 1px; + padding-right: 0px; +} + +/* CPU */ +#custom-left4 { + color: @cpu; + background: @memory; + padding-left: 3px; +} + +#custom-cpu { + background: @cpu; +} + +#custom-leftin1 { + color: @cpu; + font-size: 14.5pt; + margin-bottom: -2px; +} + +/* Arch Logo */ +#custom-left5 { + color: @arch; + background: @background; + text-shadow: -1px 0px 2px rgba(0, 0, 0, 0.6); + padding-left: 3px; +} + +#idle_inhibitor { + color: black; + background: @arch; + font-size: 11pt; + margin-right: -1px; + margin-bottom: -2px; + padding-right: 5px; + padding-left: 5px; + text-shadow: 0px 0px 1.5px rgba(0, 0, 0, 1); +} + +#custom-right2 { + color: @arch; + background: @background; +} + +/* Time */ +#custom-rightin1 { + color: @time; + font-size: 14.5pt; + margin-bottom: -2px; +} + +#clock.time { + background: @time; +} + +#custom-right3 { + color: @time; + background: @date; +} + +/* Date */ +#clock.date { + background: @date; +} + +#custom-right4 { + color: @date; + background: @wifi; +} + +#custom-wifi { + background: @wifi; + padding-right: 6px; + padding-left: 4px; +} + +#custom-right5 { + color: @wifi; + background: @background; +} + +/* Tray */ +#tray { + background: @background; + padding-right: 8px; + padding-left: 8px; +} + +#tray menu { + background: @background; + color: @foreground; + border-radius: 13px; +} + +#tray menu separator { + min-height: 5px; +} + +#tray menu menuitem { + border-radius: 8px; +} + +#tray menu menuitem:hover { + background-color: @hover; +} + +/* Language */ +#custom-left6 { + color: @language; + background: @background; + padding-left: 3px; +} + +#language { + background: @language; +} + +/* PulseAudio */ +#custom-left7 { + color: @pulseaudio; + background: @language; + padding-left: 3px; +} + +#pulseaudio { + background: @pulseaudio; +} + +/* Brightness */ +#custom-left8 { + color: @backlight; + background: @pulseaudio; + padding-left: 3px; +} + +#custom-backlight { + background: @backlight; +} + +/* Battery */ +#custom-left9 { + color: @battery; + background: @backlight; + padding-left: 3px; +} + +#battery { + background: @battery; +} + +#battery.warning { + color: #f9e2af; +} + +#battery.critical { + color: #f38ba8; +} + +/* Power Button */ +#custom-leftin2 { + color: @battery; + background: @background; + font-size: 14.5pt; + margin-bottom: -2px; +} + +#custom-power { + color: @background; + background: @power; + text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 1); + border-radius: 20px; + margin-top: 2px; + margin-right: 4px; + margin-bottom: 2px; + padding-right: 6px; + padding-left: 9px; +} + +#custom-power:hover { + color: @hover-fg; + background: @hover-bg; + box-shadow: none; + transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} \ No newline at end of file diff --git a/Configs/waybar/theme.css b/Configs/waybar/theme.css new file mode 100644 index 0000000..9f35ff9 --- /dev/null +++ b/Configs/waybar/theme.css @@ -0,0 +1,26 @@ +/* +bg - background +fg - foreground +act - active +hvr - hover +*/ + +/* Main Colors */ +@define-color background #11111b; +@define-color foreground #cdd6f4; +@define-color hover #2b2b45; + +/* Workspace Button Colors */ +@define-color active-bg #9399b2; +@define-color active-fg #11111b; +@define-color hover-bg #45475a; +@define-color hover-fg #cdd6f4; + +/* Wlogout Colors */ +@define-color bar-bg #11111b; +@define-color main-bg #11111b; +@define-color main-fg #cdd6f4; +@define-color wb-act-bg #9399b2; +@define-color wb-act-fg #11111b; +@define-color wb-hvr-bg #6c7086; +@define-color wb-hvr-fg #11111b; \ No newline at end of file diff --git a/README.md b/README.md index adf1911..3c8c379 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,76 @@ -# dotfiles -Arch Linux + Hyprland +# Dotfiles + +
Скриншот + +![ScreenShot](./Assets/general.png) + +
+ +## Навигация +- [Hyprland](#hyprland) + - [Hyprpaper](#hyprpaper) + - [Hyprlock](#hyprlock) +- [Waybar](#waybar) +- [Rofi](#rofi) + + +## Hyprland (Оконный менеджер) [[конфиги](./Configs/hypr/)] + +``` +sudo pacman -S hyprland hyprpaper hyprlock +``` + +- [[Основной конфиг](./Configs/hypr/hyprland.conf)] +- [[Бинды](./Configs/hypr/keybindings.conf)] + + +### Hyprpaper (Установка обоев) [[конфиг](./Configs/hypr/hyprpaper.conf)] + +### Hyprlock (Блокировка экрана) [[конфиг](./Configs/hypr/hyprlock.conf)] + +
Скриншот + +![ScreenShot](./Assets/hyprlock.png) + +
+ +## Waybar (Wayland бар) [[конфиг](./Configs/waybar/)] +``` +sudo pacman -S waybar +``` + +
Скриншот + +![ScreenShot](./Assets/waybar.png) + +
+ + +## Rofi (Запуск приложений, интерфейс для буфера и Wi-Fi) [[конфиги](./Configs/rofi/)] + +``` +sudo pacman -S rofi networkmanager xdg-utils wl-clipboard cliphist +``` + +
Скриншот (Лаунчер приложений) + +![ScreenShot](./Assets/rofi_app-launcher.png) + +
+ +
Скриншот (Буфер обмена) + +![ScreenShot](./Assets/rofi_clipboard.png) + +
+ +
Скриншот (Wi-Fi) + +![ScreenShot](./Assets/rofi_wifi.png) + +
+ +## ... + +

+*PS: это мои первые конфиги для оконных менеджеров в общем.* \ No newline at end of file