From 087ebd3772bfe1f2c0b7a4e5acec3c7677da1b47 Mon Sep 17 00:00:00 2001 From: Spacedio Date: Wed, 8 Apr 2026 22:15:39 -0400 Subject: Commit of Blade Stealth specific config. --- alacritty/.config/alacritty/alacritty.toml | 2 +- bashrc/.bash_profile | 9 ++++ i3/.config/i3/config | 47 +++++++++++++++++--- i3/.config/i3/scripts/power_timer.sh | 19 ++++++++ nvim/.config/nvim/lazy-lock.json | 2 +- nvim/.config/nvim/lua/plugins/treesitter.lua | 62 +++++++++++++-------------- polybar/.config/polybar/config.ini | 18 +++++--- polybar/.config/polybar/scripts/mic-status.sh | 29 +++++++++++++ polybar/.config/polybar/scripts/mic.sh | 23 ---------- x11/.Xresources | 10 +++++ x11/.xinitrc | 2 + x11/.xprofile | 14 ++++++ 12 files changed, 166 insertions(+), 71 deletions(-) create mode 100644 bashrc/.bash_profile create mode 100755 i3/.config/i3/scripts/power_timer.sh create mode 100755 polybar/.config/polybar/scripts/mic-status.sh delete mode 100755 polybar/.config/polybar/scripts/mic.sh create mode 100644 x11/.Xresources create mode 100644 x11/.xinitrc create mode 100644 x11/.xprofile diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index b4a6a02..9e7f5ab 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -9,4 +9,4 @@ x = 6 [font] normal = { family = "Hasklug Nerd Font Propo", style = "Regular" } -size = 8 +size = 12 diff --git a/bashrc/.bash_profile b/bashrc/.bash_profile new file mode 100644 index 0000000..ac667e7 --- /dev/null +++ b/bashrc/.bash_profile @@ -0,0 +1,9 @@ +# .bash_profile + +# Get the aliases and functions +[ -f $HOME/.bashrc ] && . $HOME/.bashrc + +# Start X11 automatically on TTY1 login +if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then + exec startx +fi \ No newline at end of file diff --git a/i3/.config/i3/config b/i3/.config/i3/config index d19c3d3..6d1ded8 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -21,22 +21,25 @@ font pango:Hasklug Nerd Font Mono 12 # Start XDG autostart .desktop files using dex. See also # https://wiki.archlinux.org/index.php/XDG_Autostart -exec --no-startup-id dex --autostart --environment i3 +#exec --no-startup-id dex --autostart --environment i3 exec --no-startup-id pulseaudio --start & -exec_always --no-startup-id feh --bg-scale ~/.config/background/bg1.jpg +exec --no-startup-id /usr/bin/openrazer-daemon +exec --no-startup-id brightnessctl set 40% +exec_always --no-startup-id feh --bg-scale ~/.config/backgrounds/bg3.jpg exec_always --no-startup-id ~/.config/polybar/launch.sh -exec_always --no-startup-id "picom --config ~/.config/picom/picom.conf" +#exec_always --no-startup-id "picom --config ~/.config/picom/picom.conf" # The combination of xss-lock, nm-applet and pactl is a popular choice, so # they are included here as an example. Modify as you see fit. # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork +exec --no-startup-id xss-lock -- physlock -m -d +exec --no-startup-id ~/.config/i3/scripts/power_timer.sh # NetworkManager is the most popular way to manage wireless networks on Linux, # and nm-applet is a desktop environment-independent system tray GUI for it. -exec --no-startup-id nm-applet +#exec --no-startup-id nm-applet # Autofocus on hover, also when switching workspaces focus_follows_mouse yes @@ -102,6 +105,9 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl s +5% +bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl s 5%- + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -217,7 +223,36 @@ bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" +#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + + + + +# Define the menu labels +set $sysmenu System: (l)ock, (e)xit i3, (s)uspend, (r)eboot, (Shift+s)hutdown + +mode "$sysmenu" { + # Lock the screen + bindsym l exec --no-startup-id physlock -p "Authentication required" -m -d, mode "default" + + # THE CHOICE YOU WANTED: Just exit i3 (Logout) + bindsym e exec --no-startup-id i3-msg exit, mode "default" + + # Power states (using elogind) + bindsym s exec --no-startup-id loginctl suspend, mode "default" + bindsym r exec --no-startup-id loginctl reboot, mode "default" + bindsym Shift+s exec --no-startup-id loginctl poweroff, mode "default" + + # Return to default mode (Cancel) + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# Bind it to a key - replacing the default exit behavior +bindsym $mod+Shift+e mode "$sysmenu" + + + # resize window (you can also use the mouse for that) mode "resize" { diff --git a/i3/.config/i3/scripts/power_timer.sh b/i3/.config/i3/scripts/power_timer.sh new file mode 100755 index 0000000..bb1166a --- /dev/null +++ b/i3/.config/i3/scripts/power_timer.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Define your timeouts (in seconds) +AC_LOCK=600 # 10 minutes on AC +AC_DPMS=610 + +BATT_LOCK=120 # 2 minutes on Battery +BATT_DPMS=130 + +# Check if AC adapter is online +AC_ONLINE= $(cat /sys/class/power_supply/A*/online 2>/dev/null) + +if [ "$AC_ONLINE" = "1" ]; then + xset s $AC_LOCK + xset dpms $AC_DPMS $AC_DPMS $AC_DPMS +else + xset s $BATT_LOCK + xset dpms $BATT_DPMS $BATT_DPMS $BATT_DPMS +fi diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 48dfe4f..c64e4e9 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -6,7 +6,7 @@ "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "6c4830e37743b060d13c9269394176aea6a0fbc8" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index e430504..cc4d1fd 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -1,35 +1,31 @@ return { - 'nvim-treesitter/nvim-treesitter', - branch = 'master', -- Important: Use the 'main' branch - build = ':TSUpdate', - config = function() - - -- Configure nvim-treesitter with ensure_installed - require("nvim-treesitter.configs").setup({ - ensure_installed = { - 'lua', - 'vim', - 'python', - 'javascript', - 'typescript', - 'go', - 'yaml', - 'bash', - 'html', - 'css', - 'markdown', - 'markdown_inline', - 'sql', - }, - highlight = { - enable = true, - }, - indent = { - enable = true, - }, -}) - - - - end, + 'nvim-treesitter/nvim-treesitter', + branch = 'master', -- Important: Use the 'main' branch + build = ':TSUpdate', + config = function() + -- Configure nvim-treesitter with ensure_installed + require("nvim-treesitter.configs").setup({ + ensure_installed = { + 'lua', + 'vim', + 'python', + 'javascript', + 'typescript', + 'go', + 'yaml', + 'bash', + 'html', + 'css', + 'markdown', + 'markdown_inline', + 'sql', + }, + highlight = { + enable = true, + }, + indent = { + enable = true, + }, + }) + end, } diff --git a/polybar/.config/polybar/config.ini b/polybar/.config/polybar/config.ini index b6d3693..5c35631 100644 --- a/polybar/.config/polybar/config.ini +++ b/polybar/.config/polybar/config.ini @@ -34,6 +34,8 @@ screenchange-reload = true pseudo-transparency = true [bar/main] +#dpi = ${xrdb:Xft.dpi:96} +dpi = 144 width = 100% height = 30pt @@ -65,7 +67,7 @@ module-margin = 0 modules-left = void space space date space space xwindow modules-center = xworkspaces -modules-right = cpu space space memory space separator space mic space space pulseaudio space separator space wlan space separator space battery space +modules-right = cpu space space memory space separator space mic space pulseaudio space separator space wlan space separator space battery space ;modules-right = pulseaudio cpu memory wlan battery date @@ -137,12 +139,14 @@ label-foreground = ${colors.foreground} [module/mic] type = custom/script -exec = ~/.config/polybar/scripts/mic.sh -interval = 1 # Update interval in seconds -format-foreground = ${colors.foreground} -format =