From 4be572b8a9a23cef1f5dc25f81554b1a8bce9419 Mon Sep 17 00:00:00 2001 From: awy Date: Wed, 30 Jul 2025 19:03:11 +0300 Subject: upd --- .config/hypr/hyprland.conf | 60 +++++++++++++++++++++++++++++----------- .config/nvim/lua/vim-options.lua | 1 + .config/waybar/config.json | 41 ++++++++++++++++++++++++--- .config/waybar/style.css | 45 +++++++++++++++++++++++------- .config/waybar/theme.css | 26 +++++++++++++++++ .local/bin/statusbar/sb-internet | 42 ++++++++++++++++------------ 6 files changed, 167 insertions(+), 48 deletions(-) create mode 100644 .config/waybar/theme.css diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index c381f97..c8d5f12 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,14 +1,16 @@ monitor = DP-3, 3840x2160@165, 0x0, 1.5, bitdepth, 10 monitor = DP-2, 2560x1440@165, -2560x0, 1 -$terminal = footclient -$menu = mew-run +$terminal = kitty +$menu = rofi -show drun exec-once = dbus-update-activation-environment --all exec-once = start-pipewire exec-once = mpd exec-once = waybar +exec-once = foot --server exec-once = mako +exec-once = swayidle exec-once = singboxwrap exec-once = sleep 0.1 && randombg exec-once = gpg-agent --daemon @@ -17,7 +19,7 @@ exec-once = gnome-keyring-daemon --start --components=secrets env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 env = GBM_BACKEND,nvidia-drm -env = GTK_THEME,Gruvbox-Material-Dark +env = GTK_THEME,catppuccin-mocha-rosewater-standard+default # ecosystem { # enforce_permissions = 1 @@ -28,18 +30,22 @@ env = GTK_THEME,Gruvbox-Material-Dark # permission = /usr/(bin|local/bin)/hyprpm, plugin, allow general { - gaps_in = 5, 10, 10, 5 - gaps_out = 20, 10, 10, 20 - border_size = 3 - col.active_border = rgb(005577) - col.inactive_border = rgba(595959aa) - resize_on_border = false - allow_tearing = false - layout = dwindle + gaps_in = 5 + gaps_out = 10 + + border_size = 2 + col.active_border = rgb(f5e0dc) + col.inactive_border = rgba(595959aa) + + resize_on_border = false + + allow_tearing = false + + layout = dwindle } decoration { - rounding = 0 + rounding = 10 rounding_power = 2 active_opacity = 1.0 inactive_opacity = 1.0 @@ -49,12 +55,34 @@ decoration { } blur { - enabled = false + enabled = true } } animations { - enabled = false + 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.0 + 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 } dwindle { @@ -70,7 +98,7 @@ misc { force_default_wallpaper = 0 disable_hyprland_logo = true enable_swallow = 1 - swallow_regex = ^(footclient)$ + swallow_regex = ^(kitty)$ } experimental { @@ -131,7 +159,7 @@ bind = SHIFT, Print, exec, maimpick bind = $mainMod, Print, exec, dmenurecord bind = $mainMod SHIFT, Print, exec, dmenurecord kill bind = $mainMod, E, exec, $terminal neomutt; pkill -RTMIN+12 waybar -bind = $mainMod SHIFT, N, exec, $terminal newsboat; pkill -RTMIN+6 waybar +bind = $mainMod SHIFT, N, exec, $terminal -T newsboat -e newsboat; pkill -RTMIN+6 waybar bind = $mainMod SHIFT, R, exec, $terminal -e btop bind = $mainMod, M, exec, $terminal -e rmpc bind =,XF86AudioPlay, exec, mpc toggle diff --git a/.config/nvim/lua/vim-options.lua b/.config/nvim/lua/vim-options.lua index 3a8b3e1..65fed52 100644 --- a/.config/nvim/lua/vim-options.lua +++ b/.config/nvim/lua/vim-options.lua @@ -8,3 +8,4 @@ vim.opt.swapfile = false vim.wo.number = true vim.wo.relativenumber = true vim.opt.clipboard = "unnamedplus" +vim.api.nvim_set_keymap('n', ',c', ':w! | !compiler "%:p"', { noremap = true, silent = true }) diff --git a/.config/waybar/config.json b/.config/waybar/config.json index 581d763..8d32834 100644 --- a/.config/waybar/config.json +++ b/.config/waybar/config.json @@ -5,20 +5,20 @@ "reload_style_on_change": true, "modules-left": [ "hyprland/workspaces", - "custom/vanity", "hyprland/window" ], "modules-right": [ + "custom/test", "custom/recording", "custom/tasks", "custom/music", "custom/packages", "custom/news", "custom/torrent", + "cpu", "custom/memory", "custom/forecast", "custom/mailbox", - "custom/nettraf", "custom/microphone", "custom/volume", "custom/clock", @@ -33,9 +33,12 @@ "format": "{icon}" }, - "custom/vanity" : { + "custom/test" : { "tooltip": false, - "format": "[]=" + "format": "{}", + "signal": 101, + "exec" : "/home/awy/test.sh", + "return-type": "json" }, "custom/recording" : { @@ -105,6 +108,18 @@ "on-click-backward": "BLOCK_BUTTON=8 sb-torrent" }, + "cpu" : { + "tooltip": false, + "format": "{icon} {usage}%", + "interval": 1, + "states": { + "high": 70, + "mid": 40, + "low": 0 + }, + "format-icons": ["󰾆", "󰾅", "󰓅"] + }, + "custom/memory" : { "tooltip": false, "format": "{}", @@ -153,6 +168,24 @@ "on-click-backward": "BLOCK_BUTTON=8 sb-mailbox" }, + "network#usage": { + "format": "{bandwidthDownBytes} {bandwidthUpBytes}", + "interval" : 1, + "tooltip-format": "{ifname}" + }, + + "network#interface": { + "format": "{ifname}", + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ifname} ", + "format-disconnected": "", + "tooltip-format": "{ifname}", + "tooltip-format-wifi": "{essid} ({signalStrength}%) ", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + //"max-length": 50 + }, + "custom/nettraf" : { "tooltip": false, "format": "{}", diff --git a/.config/waybar/style.css b/.config/waybar/style.css index ff119b0..80b90d5 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,15 +1,19 @@ +@import "theme.css"; + * { font-family: "monospace"; min-height: 0; + font-weight: bold; font-size: 100%; + color: #cdd6f4; } window#waybar { - background-color: #005577; + /* background-color: #005577; */ } #window { - background-color: #005577; + /* background-color: #005577; */ padding-left: 10px; } @@ -20,24 +24,24 @@ window#waybar { #taskbar button, #workspaces button { - color: #bbb; - background-color: #222; + /* color: #bbb; */ + /* background-color: #222; */ border-radius: 0px; } #taskbar button.active, #workspaces button.active { - color: #eee; - background-color: #005577; + /* color: #eee; */ + /* background-color: #005577; */ } #workspaces button.urgent { - color: #fb4934; + /* color: #fb4934; */ } .modules-left, .modules-right { - background: #222; - color: #bbb; + /* background: #222; */ + /* color: #bbb; */ } .modules-right { @@ -45,7 +49,12 @@ window#waybar { } #window { - color: #fff; + /* color: #fff; */ +} + +#custom-test { + color: green; + padding-right: 10px; } #custom-music { @@ -60,6 +69,22 @@ window#waybar { padding-right: 10px; } +#cpu { + padding-right: 10px; +} + +#cpu.high { + color: @red; +} + +#cpu.mid { + color: @yellow; +} + +#cpu.low { + color: @green; +} + #custom-memory { padding-right: 10px; } diff --git a/.config/waybar/theme.css b/.config/waybar/theme.css new file mode 100644 index 0000000..0eb6a82 --- /dev/null +++ b/.config/waybar/theme.css @@ -0,0 +1,26 @@ +@define-color rosewater #f5e0dc; +@define-color flamingo #f2cdcd; +@define-color pink #f5c2e7; +@define-color mauve #cba6f7; +@define-color red #f38ba8; +@define-color maroon #eba0ac; +@define-color peach #fab387; +@define-color yellow #f9e2af; +@define-color green #a6e3a1; +@define-color teal #94e2d5; +@define-color sky #89dceb; +@define-color sapphire #74c7ec; +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color text #cdd6f4; +@define-color subtext1 #bac2de; +@define-color subtext0 #a6adc8; +@define-color overlay2 #9399b2; +@define-color overlay1 #7f849c; +@define-color overlay0 #6c7086; +@define-color surface2 #585b70; +@define-color surface1 #45475a; +@define-color surface0 #313244; +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index 2c7fd96..4840a26 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -1,35 +1,41 @@ #!/bin/sh -# Show wifi 📶 and percent strength or 📡 if none. -# Show 🌎 if connected to ethernet or ❎ if none. -# Show 🔒 if a vpn connection is active - case $BLOCK_BUTTON in - 1) setsid -f "$TERMINAL" -e nmtui >/dev/null 2>&1 ; pkill -RTMIN+4 waybar ;; - 3) notify-send "🌎 Internet module" "\- Click to connect -❌: wifi disabled -📡: no wifi connection -📶: wifi connection with quality -❎: no ethernet -🌎: ethernet working -🧭: vpn is active (routing) -🔒: vpn is active + 1) setsid -f "$TERMINAL" -e nmtui >/dev/null 2>&1 ; pkill -RTMIN+4 i3blocks ;; + 3) notify-send " Internet module" "\- Click to connect +󰤮 : wifi disabled +󰤮 : no wifi connection +󰤨 : wifi connection with quality + : no ethernet + : ethernet working +󰑪 : vpn is active (routing) +󰖂 : vpn is active " ;; 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" >/dev/null 2>&1 ;; esac # Wifi if [ "$(bat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ] ; then - wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" + quality=$(awk '/^\s*w/ { print int($3 * 100 / 70) }' /proc/net/wireless) + + case 1 in + $((quality >= 76)) ) wifiicon="󰤨" ;; + $((quality >= 51)) ) wifiicon="󰤥" ;; + $((quality >= 26)) ) wifiicon="󰤢" ;; + $((quality >= 1)) ) wifiicon="󰤟" ;; + * ) wifiicon="󰤮" ;; + esac + wifiicon="$wifiicon$quality% " + elif [ "$(bat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then - [ "$(bat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="📡 " || wifiicon="❌ " + [ "$(bat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="󰤮 " || wifiicon="󰤮 " fi # Ethernet -[ "$(bat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌎" || ethericon="❎" +[ "$(bat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="" || ethericon="" # TUN -[ -n "$(bat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon=" 🔒" -[ -n "$(bat /sys/class/net/route*/operstate 2>/dev/null)" ] && tunicon=" 🧭" +[ -n "$(bat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon=" 󰖂" +[ -n "$(bat /sys/class/net/route*/operstate 2>/dev/null)" ] && tunicon=" 󰑪" printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon" -- cgit v1.2.3