From 78f7f84ef54fc4035b2eece7b0863a9bdedcfd26 Mon Sep 17 00:00:00 2001 From: clint Date: Tue, 22 Jul 2025 23:06:07 -0500 Subject: [PATCH] hyprland and waybar and stuff --- bashrc/.bashrc | 2 + hypr/.config/hypr/hyprland.conf | 17 ++- hypr/.config/hypr/hyprlock.conf | 2 +- hypr/.config/hypr/hyprpaper.conf | 4 +- nvim/.config/nvim/init.lua | 44 +++++++ ranger/.config/ranger/rc.conf | 2 +- waybar/.config/waybar/config.jsonc | 77 ++++++++---- waybar/.config/waybar/config.jsonc.bak | 129 ++++++++++++++++++++ waybar/.config/waybar/config.jsonc.bak.dark | 129 ++++++++++++++++++++ waybar/.config/waybar/style.css | 48 ++++++-- waybar/.config/waybar/style.css.bak | 68 +++++++++++ waybar/.config/waybar/style.css.bak.dark | 69 +++++++++++ 12 files changed, 548 insertions(+), 43 deletions(-) create mode 100644 waybar/.config/waybar/config.jsonc.bak create mode 100644 waybar/.config/waybar/config.jsonc.bak.dark create mode 100644 waybar/.config/waybar/style.css.bak create mode 100644 waybar/.config/waybar/style.css.bak.dark diff --git a/bashrc/.bashrc b/bashrc/.bashrc index 9f74034..e25ed3d 100644 --- a/bashrc/.bashrc +++ b/bashrc/.bashrc @@ -46,10 +46,12 @@ alias grep='grep --colour=auto' alias cdd='. ~/scripts/project_picker.sh' alias configedit='. ~/scripts/config_edit.sh' alias clip='cliphist list | fzf --no-sort | cliphist decode | wl-copy' +alias vp='source ~/scripts/venv_picker.sh' # expand path PATH=/usr/local/bin:/usr/bin/:/usr/sbin PATH=$PATH:~/.local/share +PATH=$PATH:/home/clint/flutter/bin # exports export EDITOR=/usr/bin/nvim diff --git a/hypr/.config/hypr/hyprland.conf b/hypr/.config/hypr/hyprland.conf index 8d7fde5..0b06643 100644 --- a/hypr/.config/hypr/hyprland.conf +++ b/hypr/.config/hypr/hyprland.conf @@ -67,10 +67,12 @@ decoration { active_opacity = 1.0 inactive_opacity = 1.0 - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } # https://wiki.hyprland.org/Configuring/Variables/#blur blur { @@ -154,10 +156,15 @@ device { # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier +# F-key shenanigans +bind = , code:68, exec, pactl set-sink-volume 0 -10% # F2 +bind = , code:69, exec, pactl set-sink-volume 0 +10% # F3 +bind = , code:70, exec, pactl set-sink-mute 0 toggle # F4 + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Return, exec, $terminal bind = $mainMod, Q, killactive, -bind = $mainMod, M, exit, +# bind = $mainMod, M, exit, bind = $mainMod SHIFT, Space, togglefloating, bind = $mainMod, D, exec, $menu bind = $mainMod SHIFT, P, pseudo, # dwindle diff --git a/hypr/.config/hypr/hyprlock.conf b/hypr/.config/hypr/hyprlock.conf index 3754cb8..7d3ebc5 100644 --- a/hypr/.config/hypr/hyprlock.conf +++ b/hypr/.config/hypr/hyprlock.conf @@ -1,7 +1,7 @@ # BACKGROUND background { monitor = - path = /home/clint/Pictures/wallpapers/redtrees.jpg + path = /home/clint/Pictures/wallpapers/mountains2.jpg } diff --git a/hypr/.config/hypr/hyprpaper.conf b/hypr/.config/hypr/hyprpaper.conf index 6503c2f..0467962 100644 --- a/hypr/.config/hypr/hyprpaper.conf +++ b/hypr/.config/hypr/hyprpaper.conf @@ -1,6 +1,6 @@ preload = -wallpaper = HDMI-A-1, /home/clint/Pictures/wallpapers/forest.jpg -wallpaper = DP-2, /home/clint/Pictures/wallpapers/forest.jpg +wallpaper = HDMI-A-1, /home/clint/Pictures/wallpapers/abstract_red_blue.png +wallpaper = DP-2, /home/clint/Pictures/wallpapers/abstract_red_blue.png #enable splash text rendering over the wallpaper splash = false diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 8ff311c..222e41e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -9,3 +9,47 @@ require("lazy").setup( ) -- loads each lua/plugin/* vim.cmd 'hi Normal guibg=NONE ctermbg=NONE' require("clint") -- loads lua/clint/init.lua + +-- Mason setup +require('mason').setup() +require('mason-lspconfig').setup { + ensure_installed = { 'basedpyright' }, -- Install Pyright automatically +} + + +-- LSP setup +local lspconfig = require('lspconfig') +lspconfig.basedpyright.setup { + on_attach = function(client, bufnr) + -- Optional: Add keymaps for LSP actions + local opts = { buffer = bufnr, noremap = true, silent = true } + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, opts) + end, + capabilities = require('cmp_nvim_lsp').default_capabilities(), +} + + +-- nvim-cmp config +local cmp = require('cmp') +cmp.setup { + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.complete(), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + { name = 'buffer' }, + { name = 'path' }, + }), +} diff --git a/ranger/.config/ranger/rc.conf b/ranger/.config/ranger/rc.conf index 7d6e25f..e943a6d 100644 --- a/ranger/.config/ranger/rc.conf +++ b/ranger/.config/ranger/rc.conf @@ -113,7 +113,7 @@ set preview_images true # Preview images in full color with the external command "ueberzug". # Images are shown by using a child window. # Only for users who run X11 in GNU/Linux. -set preview_images_method w3m +set preview_images_method kitty # Delay in seconds before displaying an image with the w3m method. # Increase it in case of experiencing display corruption. diff --git a/waybar/.config/waybar/config.jsonc b/waybar/.config/waybar/config.jsonc index 25bc450..0938a7e 100644 --- a/waybar/.config/waybar/config.jsonc +++ b/waybar/.config/waybar/config.jsonc @@ -3,22 +3,27 @@ "output": ["HDMI-A-1"], "layer": "top", // Waybar at top layer "position": "top", // Waybar position (top|bottom|left|right) - "height": 30, // Waybar height (to be removed for auto height) + "height": 20, // Waybar height (to be removed for auto height) // "width": 1280, // Waybar width "spacing": 10, // Gaps between modules (4px) // Choose the order of the modules "modules-left": [ "hyprland/workspaces", + "user", ], - "modules-center": [ - "hyprland/window", - ], + // "modules-center": [ + // "hyprland/window", + // ], "modules-right": [ + "custom/caspar", + "custom/cas01", + // "custom/cas02", "custom/packages", - "network", - "cpu", - "memory", - "temperature", + // "network", + // "cpu", + // "memory", + // "temperature", + "custom/weather", "clock" ], @@ -29,22 +34,21 @@ "all-outputs": true, "format": "{icon}", "format-icons": { - "1": "一", - "2": "二", - "3": "三", - "4": "四", - "5": "五", - "6": "六", - "7": "七", - "8": "八", - "9": "九", - "10": "十", + "1": "I", + "2": "II", + "3": "III", + "4": "IV", + "5": "V", + "6": "VI", + "7": "VII", + "8": "VIII", + "9": "IX", + "10": "X", }}, "hyprland/window": { "max-length": 20, "min-length": 10 - }, "tray": { @@ -55,7 +59,7 @@ "clock": { "interval": 60, "timezone": "America/Chicago", - "format": "{:%I:%M}", + "format": "{:%I:%M%p}", "tooltip-format": "{:%Y %B}\n{calendar}", "format-alt": "{:%Y-%m-%d}" }, @@ -101,8 +105,39 @@ "custom/packages": { - "format": "{} 🗁", + "format": "{} 📦", "interval": 30, "exec": "dnf check-update -q | grep updates | wc -l 2> /dev/null" }, + + "custom/weather": { + "format": "{}", + "interval": 30, + "exec": "~/scripts/hypr_weather.sh" + }, + "custom/caspar": { + "format": "{} 🖥", + "interval": 30, + "exec": "~/scripts/check_server_status.sh caspar", + "return-type": "json" + }, + "custom/cas01": { + "format": "{} 🖥", + "interval": 30, + "exec": "~/scripts/check_server_status.sh cas01", + "return-type": "json" + }, + "custom/cas02": { + "format": "{} 🖥", + "interval": 30, + "exec": "~/scripts/check_server_status.sh cas02", + "return-type": "json" + }, + "user": { + "format": "{user} (up {work_d} days ↑)", + "interval": 60, + "height": 30, + "width": 30, + "icon": true, +} } diff --git a/waybar/.config/waybar/config.jsonc.bak b/waybar/.config/waybar/config.jsonc.bak new file mode 100644 index 0000000..d71d437 --- /dev/null +++ b/waybar/.config/waybar/config.jsonc.bak @@ -0,0 +1,129 @@ +// -*- mode: jsonc -*- +{ + "output": ["HDMI-A-1"], + "layer": "top", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + "height": 30, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 10, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "hyprland/workspaces", + ], + "modules-center": [ + "hyprland/window", + ], + "modules-right": [ + "custom/caspar", + "custom/cas01", + "custom/cas02", + "custom/packages", + "network", + "cpu", + "memory", + "temperature", + "clock" + ], + + + // Modules configuration + "hyprland/workspaces": { + "active-only": false, + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "1": "一", + "2": "二", + "3": "三", + "4": "四", + "5": "五", + "6": "六", + "7": "七", + "8": "八", + "9": "九", + "10": "十", + }}, + + "hyprland/window": { + "max-length": 20, + "min-length": 10 + }, + + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + + "clock": { + "interval": 60, + "timezone": "America/Chicago", + "format": "{:%I:%M}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + + "memory": { + "format": "{}% " + }, + + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} 🖧", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + + + "custom/packages": { + "format": "{} 🗁", + "interval": 30, + "exec": "dnf check-update -q | grep updates | wc -l 2> /dev/null" + }, + + "custom/caspar": { + "format": "{} 🗁", + "interval": 30, + "exec": "~/scripts/check_server_status.sh caspar", + "return-type": "json" + }, + "custom/cas01": { + "format": "{} 🗁", + "interval": 30, + "exec": "~/scripts/check_server_status.sh cas01", + "return-type": "json" + }, + "custom/cas02": { + "format": "{} 🗁", + "interval": 30, + "exec": "~/scripts/check_server_status.sh cas02", + "return-type": "json" + }, +} diff --git a/waybar/.config/waybar/config.jsonc.bak.dark b/waybar/.config/waybar/config.jsonc.bak.dark new file mode 100644 index 0000000..f853190 --- /dev/null +++ b/waybar/.config/waybar/config.jsonc.bak.dark @@ -0,0 +1,129 @@ +// -*- mode: jsonc -*- +{ + "output": ["HDMI-A-1"], + "layer": "top", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + "height": 20, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 10, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "hyprland/workspaces", + ], + // "modules-center": [ + // "hyprland/window", + // ], + "modules-right": [ + "custom/caspar", + "custom/cas01", + // "custom/cas02", + "custom/packages", + "network", + "cpu", + "memory", + "temperature", + "clock" + ], + + + // Modules configuration + "hyprland/workspaces": { + "active-only": false, + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "1": "I", + "2": "II", + "3": "III", + "4": "IV", + "5": "V", + "6": "VI", + "7": "VII", + "8": "VIII", + "9": "IX", + "10": "X", + }}, + + "hyprland/window": { + "max-length": 20, + "min-length": 10 + }, + + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + + "clock": { + "interval": 60, + "timezone": "America/Chicago", + "format": "{:%I:%M}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + + "memory": { + "format": "{}% " + }, + + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} 🖧", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + + + "custom/packages": { + "format": "{} 📦", + "interval": 30, + "exec": "dnf check-update -q | grep updates | wc -l 2> /dev/null" + }, + + "custom/caspar": { + "format": "{} 🖥", + "interval": 30, + "exec": "~/scripts/check_server_status.sh caspar", + "return-type": "json" + }, + "custom/cas01": { + "format": "{} 🖥", + "interval": 30, + "exec": "~/scripts/check_server_status.sh cas01", + "return-type": "json" + }, + "custom/cas02": { + "format": "{} 🖥", + "interval": 30, + "exec": "~/scripts/check_server_status.sh cas02", + "return-type": "json" + }, +} diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index cf67346..5072e49 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -1,11 +1,13 @@ * { /* `otf-font-awesome` is required to be installed for icons */ - font-family: Courier, FontAwesome; + font-family: Courier; font-size: 17px; + font-weight: bold; } window#waybar { - background: transparent; + background: #ccc; + border: 1px solid #1d1e21; } window#waybar.hidden { @@ -13,6 +15,7 @@ window#waybar.hidden { } #workspaces, +#user, #window, #pulseaudio, #network, @@ -20,28 +23,40 @@ window#waybar.hidden { #memory, #temperature, #clock, -#custom-packages +#custom-caspar, +#custom-cas01, +#custom-cas02, +#custom-packages, +#custom-weather { - margin-top: 2px; + margin-top: 4px; + margin-bottom: 4px; margin-left: 0px; margin-right: 0px; - margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; - padding-left: 20px; - padding-right: 20px; + padding-left: 10px; + padding-right: 10px; - border-radius: 26px; + border-radius: 5px; transition: none; - color: #f8f8f2; + color: #1d1e21; background: rgba(255, 255, 255, 0.2); + border: 2px solid black; } +#clock{ + margin-right: 7px; +} + +#workspaces{ + margin-left: 7px; +} #workspaces button { transition: none; - color: #f8f8f2; + color: #1d1e21; background: transparent; font-size: 10px; } @@ -53,7 +68,14 @@ window#waybar.hidden { #workspaces button.active { transition: none; - color: #020202; - background: rgba(255, 255, 255, 0.6); - border-radius: 26px; + color: #ccc; + /* background: rgba(255, 255, 255, 0.6); */ + background: #1d1e21; + border-radius: 0px; +} + +#custom-caspar.offline, +#custom-cas01.offline, +#custom-cas02.offline { + background: red; } diff --git a/waybar/.config/waybar/style.css.bak b/waybar/.config/waybar/style.css.bak new file mode 100644 index 0000000..1470320 --- /dev/null +++ b/waybar/.config/waybar/style.css.bak @@ -0,0 +1,68 @@ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Courier, FontAwesome; + font-size: 17px; +} + +window#waybar { + background: transparent; +} + +window#waybar.hidden { + opacity: 0.2; +} + +#workspaces, +#window, +#pulseaudio, +#network, +#cpu, +#memory, +#temperature, +#clock, +#custom-caspar, +#custom-cas01, +#custom-cas02, +#custom-packages +{ + margin-top: 2px; + margin-left: 0px; + margin-right: 0px; + margin-bottom: 0px; + + padding-top: 0px; + padding-bottom: 0px; + padding-left: 20px; + padding-right: 20px; + + border-radius: 26px; + transition: none; + color: #f8f8f2; + background: rgba(255, 255, 255, 0.2); +} + + +#workspaces button { + transition: none; + color: #f8f8f2; + background: transparent; + font-size: 10px; +} + +#workspaces button.focused { + color: #9aedfe; + background: red; +} + +#workspaces button.active { + transition: none; + color: #020202; + background: rgba(255, 255, 255, 0.6); + border-radius: 26px; +} + +#custom-caspar.offline, +#custom-cas01.offline, +#custom-cas02.offline { + color: red; +} diff --git a/waybar/.config/waybar/style.css.bak.dark b/waybar/.config/waybar/style.css.bak.dark new file mode 100644 index 0000000..c7ef9cc --- /dev/null +++ b/waybar/.config/waybar/style.css.bak.dark @@ -0,0 +1,69 @@ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Courier, FontAwesome; + font-size: 17px; +} + +window#waybar { + background: #1d1e21; + /* border: 1px solid red; */ +} + +window#waybar.hidden { + opacity: 0.2; +} + +#workspaces, +#window, +#pulseaudio, +#network, +#cpu, +#memory, +#temperature, +#clock, +#custom-caspar, +#custom-cas01, +#custom-cas02, +#custom-packages +{ + margin-top: 2px; + margin-left: 0px; + margin-right: 0px; + margin-bottom: 4px; + + padding-top: 0px; + padding-bottom: 0px; + padding-left: 10px; + padding-right: 20px; + + /* border-radius: 26px; */ + transition: none; + color: #f8f8f2; + background: rgba(255, 255, 255, 0.2); +} + + +#workspaces button { + transition: none; + color: #f8f8f2; + background: transparent; + font-size: 10px; +} + +#workspaces button.focused { + color: #9aedfe; + background: red; +} + +#workspaces button.active { + transition: none; + color: #020202; + background: rgba(255, 255, 255, 0.6); + border-radius: 0px; +} + +#custom-caspar.offline, +#custom-cas01.offline, +#custom-cas02.offline { + color: red; +}