hyprdots

my dotfiles
git clone https://git.awy.one/hyprdots.git
Log | Files | Refs | README | LICENSE

commit f49347e39cdd7e3c65fa5b35944543a27396c247
parent 935c5f2f436a555c77433d20729fdd26a2a789b8
Author: awy <awy@awy.one>
Date:   Sat, 24 May 2025 00:27:00 +0300

update

Diffstat:
D.config/btop/btop.conf | 5-----
M.config/fontconfig/fonts.conf | 4++++
M.config/hypr/hyprland.conf | 120++++++++++++++++++++++++++++++++++++++++----------------------------------------
D.config/kitty/catppuccin.conf | 80-------------------------------------------------------------------------------
M.config/kitty/kitty.conf | 16++--------------
A.config/kitty/theme.conf | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.config/mpv/mpv.conf | 6+-----
D.config/pipewire/pipewire.conf.d/pipewire.conf | 14--------------
M.config/shell/profile | 14++++++++------
M.config/waybar/config | 5++++-
M.config/waybar/style.css | 311++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
M.config/zsh/.zshrc | 2+-
M.local/bin/bookmarks | 2+-
M.local/bin/cron/checkup | 8++------
M.local/bin/cron/newsup | 7++-----
A.local/bin/doas_askpass | 47+++++++++++++++++++++++++++++++++++++++++++++++
M.local/bin/mounter | 28++++++++++++++--------------
D.local/bin/portal | 7-------
M.local/bin/sysact | 32++++++++++++++++----------------
M.local/bin/unmounter | 8++++----
M.local/share/applications/file.desktop | 2+-
M.local/share/applications/mail.desktop | 2+-
M.local/share/applications/text.desktop | 2+-
Maurdeps.txt | 2+-
Mdependencies.txt | 8+++++++-
Mrice.sh | 72+++++++++++++++++++++++++-----------------------------------------------
26 files changed, 562 insertions(+), 323 deletions(-)

diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf @@ -1,5 +0,0 @@ -color_theme = "/usr/share/btop/themes/gruvbox_dark_v2.theme" -theme_background = False -vim_keys = True -rounded_corners = False -proc_sorting = "memory" diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf @@ -7,6 +7,7 @@ <family>LiterationSerif Nerd Font Propo</family> <family>Noto Color Emoji</family> <family>FontAwesome</family> + <family>SymbolsNerdFont</family> </prefer> </alias> <alias> @@ -15,6 +16,7 @@ <family>LiterationSans Nerd Font Propo</family> <family>Noto Color Emoji</family> <family>FontAwesome</family> + <family>SymbolsNerdFont</family> </prefer> </alias> <alias> @@ -23,6 +25,7 @@ <family>LiterationSans Nerd Font Propo</family> <family>Noto Color Emoji</family> <family>FontAwesome</family> + <family>SymbolsNerdFont</family> </prefer> </alias> <alias> @@ -31,6 +34,7 @@ <family>LiterationMono Nerd Font Propo</family> <family>Noto Color Emoji</family> <family>FontAwesome</family> + <family>SymbolsNerdFont</family> </prefer> </alias> </fontconfig> diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf @@ -1,14 +1,16 @@ monitor=,preferred,auto,auto monitor = DP-3, 3840x2160@165, 0x0, 1, bitdepth, 10 - monitor = DP-2, 2560x1440@165, -2560x720, 1 $terminal = kitty -$menu = rofi --show drun +$menu = fuzzel + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 +env = ENABLE_HDR_WSI,1 exec-once = dbus-update-activation-environment --all exec-once = start-pipewire -exec-once = portal exec-once = singboxwrap exec-once = dunst exec-once = gpg-agent --daemon @@ -17,100 +19,77 @@ exec-once = randombg exec-once = waybar exec-once = mpd -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 -env = ENABLE_HDR_WSI,1 - general { gaps_in = 5 gaps_out = 10 - border_size = 1 - col.active_border = rgb(cba6f7) + border_size = 2 + col.active_border = rgb(BF9BDE) col.inactive_border = rgba(595959aa) - - layout = dwindle - + resize_on_border = false allow_tearing = false + layout = dwindle } - decoration { - rounding = 5 + rounding = 10 rounding_power = 2 active_opacity = 1.0 inactive_opacity = 1.0 - shadow { enabled = true range = 4 render_power = 3 color = rgba(1a1a1aee) } - blur { enabled = true size = 3 - passes = 2 - vibrancy = 0.0 + passes = 1 + vibrancy = 0.1696 } } - animations { enabled = true - - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 5, myBezier - animation = windowsOut, 1, 5, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default, slidevert + 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, slide + animation = layersOut, 1, 1.5, easeOutQuint, slide + 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 { - pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # You probably want this + pseudotile = true + preserve_split = true } - master { new_status = master } - misc { - force_default_wallpaper = 0 # 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. :( + force_default_wallpaper = 0 + disable_hyprland_logo = true enable_swallow = 1 swallow_regex = ^(kitty)$ } -input { - kb_layout = us, ru - kb_variant = - kb_model = - # kb_options = grp:alt_shift_toggle - kb_rules = - - follow_mouse = 1 - force_no_accel = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - repeat_rate=50 - repeat_delay=300 - - touchpad { - natural_scroll = false - } -} - -gestures { - workspace_swipe = false -} - experimental { xx_color_management_v4 = true } @@ -127,15 +106,36 @@ cursor { default_monitor = DP-3 } -$mainMod = SUPER # Sets "Windows" key as main modifier +input { + kb_layout = us,ru + kb_variant = + kb_model = + kb_options = grp:alt_shift_toggle + kb_rules = + follow_mouse = 1 + sensitivity = 0 + + touchpad { + natural_scroll = false + } + + repeat_rate = 45 + repeat_delay = 300 + force_no_accel = 1 +} +gestures { + workspace_swipe = false +} + +$mainMod = SUPER # Sets "Windows" key as main modifier bind = $mainMod, Return, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod, W, exec, firefox bind = $mainMod, R, exec, $terminal -e yazi bind = $mainMod SHIFT, D, exec, tessen bind = $mainMod, V, togglefloating, -bind = $mainMod, D, exec, rofi -show drun +bind = $mainMod, D, exec, fuzzel bind = $mainMod, P, exec, mpc toggle bind = $mainMod, Grave, exec, bookmarks bind = $mainMod SHIFT, J, togglesplit, # dwindle diff --git a/.config/kitty/catppuccin.conf b/.config/kitty/catppuccin.conf @@ -1,80 +0,0 @@ -# vim:ft=kitty - -## name: Catppuccin Kitty Mocha -## author: Catppuccin Org -## license: MIT -## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf -## blurb: Soothing pastel theme for the high-spirited! - - - -# The basic colors -foreground #cdd6f4 -background #1e1e2e -selection_foreground #1e1e2e -selection_background #f5e0dc - -# Cursor colors -cursor #f5e0dc -cursor_text_color #1e1e2e - -# URL underline color when hovering with mouse -url_color #f5e0dc - -# Kitty window border colors -active_border_color #b4befe -inactive_border_color #6c7086 -bell_border_color #f9e2af - -# OS Window titlebar colors -wayland_titlebar_color system -macos_titlebar_color system - -# Tab bar colors -active_tab_foreground #11111b -active_tab_background #cba6f7 -inactive_tab_foreground #cdd6f4 -inactive_tab_background #181825 -tab_bar_background #11111b - -# Colors for marks (marked text in the terminal) -mark1_foreground #1e1e2e -mark1_background #b4befe -mark2_foreground #1e1e2e -mark2_background #cba6f7 -mark3_foreground #1e1e2e -mark3_background #74c7ec - -# The 16 terminal colors - -# black -color0 #45475a -color8 #585b70 - -# red -color1 #f38ba8 -color9 #f38ba8 - -# green -color2 #a6e3a1 -color10 #a6e3a1 - -# yellow -color3 #f9e2af -color11 #f9e2af - -# blue -color4 #89b4fa -color12 #89b4fa - -# magenta -color5 #f5c2e7 -color13 #f5c2e7 - -# cyan -color6 #94e2d5 -color14 #94e2d5 - -# white -color7 #bac2de -color15 #a6adc8 diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf @@ -1,17 +1,5 @@ -include ~/.config/kitty/catppuccin.conf - +include ~/.config/kitty/theme.conf +window_padding_width 10 font_size 14 background_opacity 0.8 confirm_os_window_close 0 -cursor_blink_interval 0 - -# binds -map alt+c copy_to_clipboard -map alt+v paste_from_clipboard - -map alt+k scroll_line_up -map alt+j scroll_line_down - -map alt+shift+k change_font_size all +2.0 -map alt+shift+j change_font_size all -2.0 -map alt+0 change_font_size all 0 diff --git a/.config/kitty/theme.conf b/.config/kitty/theme.conf @@ -0,0 +1,81 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Mocha +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #cdd6f4 +background #1e1e2e +selection_foreground #1e1e2e +selection_background #f5e0dc + +# Cursor colors +cursor #f5e0dc +cursor_text_color #1e1e2e + +# URL underline color when hovering with mouse +url_color #f5e0dc + +# Kitty window border colors +active_border_color #b4befe +inactive_border_color #6c7086 +bell_border_color #f9e2af + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111b +active_tab_background #cba6f7 +inactive_tab_foreground #cdd6f4 +inactive_tab_background #181825 +tab_bar_background #11111b + +# Colors for marks (marked text in the terminal) +mark1_foreground #1e1e2e +mark1_background #b4befe +mark2_foreground #1e1e2e +mark2_background #cba6f7 +mark3_foreground #1e1e2e +mark3_background #74c7ec + +# The 16 terminal colors + +# black +color0 #45475a +color8 #585b70 + +# red +color1 #f38ba8 +color9 #f38ba8 + +# green +color2 #a6e3a1 +color10 #a6e3a1 + +# yellow +color3 #f9e2af +color11 #f9e2af + +# blue +color4 #89b4fa +color12 #89b4fa + +# magenta +color5 #f5c2e7 +color13 #f5c2e7 + +# cyan +color6 #94e2d5 +color14 #94e2d5 + +# white +color7 #bac2de +color15 #a6adc8 + diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf @@ -1,10 +1,6 @@ -# optimizations +profile=high-quality vo=gpu-next gpu-api=vulkan gpu-context=waylandvk hwdec=auto target-colorspace-hint=yes - -# uosc -osd-bar=no -border=no diff --git a/.config/pipewire/pipewire.conf.d/pipewire.conf b/.config/pipewire/pipewire.conf.d/pipewire.conf @@ -1,14 +0,0 @@ -context.properties = { - link.max-buffers = 16 # version < 3 clients can't handle more - - - core.daemon = true # listening for socket connections - core.name = pipewire-0 # core name and socket name - - default.clock.rate = 192000 - default.clock.allowed-rates = [ 48000 192000 ] - - module.x11.bell = true - module.access = true - module.jackdbus-detect = true -} diff --git a/.config/shell/profile b/.config/shell/profile @@ -14,6 +14,8 @@ export MANPAGER='nvim +Man!' export TERMINAL="kitty" export TERMINAL_PROG="kitty" export BROWSER="firefox" +export MENU="fuzzel --dmenu" +export STATUSBAR="waybar" unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then @@ -58,7 +60,7 @@ export PASSWORD_STORE_CLIP_TIME=5 # Other program settings: export DICS="/usr/share/stardict/dic/" -export SUDO_ASKPASS="$HOME/.local/bin/dmenupass" +export DOAS_ASKPASS="$HOME/.local/bin/dmenupass" export LESS="R" export LESS_TERMCAP_mb="$(printf '%b' '')" export LESS_TERMCAP_md="$(printf '%b' '')" @@ -79,11 +81,11 @@ export __GL_THREADED_OPTIMIZATIONS=0 # Minecraft GLFW fix on nvidia gpu export ELECTRON_OZONE_PLATFORM_HINT=auto # Electron fix export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 # Disables decorations for QT applications export FZF_DEFAULT_OPTS=" \ ---color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ ---color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \ ---color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \ ---color=selected-bg:#45475a \ ---color=border:#313244,label:#cdd6f4" +--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \ +--color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \ +--color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \ +--color=selected-bg:#45475A \ +--color=border:#313244,label:#CDD6F4" export YT_X_FZF_OPTS="$FZF_DEFAULT_OPTS" export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#767676" diff --git a/.config/waybar/config b/.config/waybar/config @@ -2,7 +2,10 @@ "layer": "top", "position": "top", "output": "DP-2", - "spacing": 0, + "spacing": 20, + "margin-right": 6, + "margin-left": 6, + "margin-top": 6, "reload_style_on_change": true, "modules-left": ["hyprland/workspaces"], "modules-right": [ diff --git a/.config/waybar/style.css b/.config/waybar/style.css @@ -1,49 +1,296 @@ @import "catppuccin.css"; * { - border: none; - border-radius: 0; - font-family: monospace; - font-size: 14px; + font-family: "Sans"; + font-weight: bold; + min-height: 0; + /* set font-size to 100% if font scaling is set to 1.00 using nwg-look */ + font-size: 100%; + font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"'; } -#waybar { - color: @text; - background: @base; +window#waybar { + transition-property: background-color; + transition-duration: 0.5s; + background: transparent; + border-radius: 10px; } -tooltip { - background: @base; - border: @mauve 1px solid; - border-radius: 5px; +window#waybar.hidden { + opacity: 0.2; } -#workspaces { margin-left: 1px; } +window#waybar.empty, +window#waybar.empty #window { + background-color: transparent; + padding: 0px; + border: 0px; +} +#taskbar button, #workspaces button { - color: @surface2 ; - padding-right: 0px; + color: @overlay1; + box-shadow: none; + text-shadow: none; + padding: 0px; + border-radius: 9px; + padding-left: 4px; + padding-right: 4px; + animation: gradient_f 20s ease-in infinite; + transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.682); +} + +#taskbar button:hover, +#workspaces button:hover { + border-radius: 10px; + color: @peach; + background-color: @surface0; + padding-left: 2px; + padding-right: 2px; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682); +} + +#workspaces button.persistent { + color: @surface1; + border-radius: 10px; +} + +#taskbar button.active, +#workspaces button.active { + color: @mauve; + border-radius: 10px; + padding-left: 8px; + padding-right: 8px; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682); +} + +#workspaces button.urgent { + color: @red; + border-radius: 0px; +} + +/* This section can be use if you want to separate waybar modules */ +.modules-left, .modules-center, .modules-right { + background: @theme_base_color; + border: 0.5px solid @overlay0; + padding-top: 2px; + padding-bottom: 2px; + padding-right: 4px; + padding-left: 4px; + border-radius: 10px; +} + +.modules-left, .modules-right { + border: 1px solid @blue; +} + +#backlight, +#backlight-slider, +#battery, +#bluetooth, +#clock, +#cpu, +#disk, +#idle_inhibitor, +#keyboard-state, +#memory, +#mode, +#mpris, +#network, +#power-profiles-daemon, +#pulseaudio, +#pulseaudio-slider, +#taskbar button, +#taskbar, +#temperature, +#tray, +#window, +#wireplumber, +#workspaces, +#custom-backlight, +#custom-browser, +#custom-cava_mviz, +#custom-cycle_wall, +#custom-dot_update, +#custom-file_manager, +#custom-keybinds, +#custom-keyboard, +#custom-light_dark, +#custom-lock, +#custom-hint, +#custom-hypridle, +#custom-menu, +#custom-playerctl, +#custom-power_vertical, +#custom-power, +#custom-quit, +#custom-reboot, +#custom-settings, +#custom-spotify, +#custom-swaync, +#custom-tty, +#custom-updater, +#custom-weather, +#custom-weather.clearNight, +#custom-weather.cloudyFoggyDay, +#custom-weather.cloudyFoggyNight, +#custom-weather.default, +#custom-weather.rainyDay, +#custom-weather.rainyNight, +#custom-weather.severe, +#custom-weather.showyIcyDay, +#custom-weather.snowyIcyNight, +#custom-weather.sunnyDay { + padding-top: 4px; + padding-bottom: 4px; + padding-right: 6px; + padding-left: 6px; +} +/*-----Indicators----*/ +#custom-hypridle.notactive, +#idle_inhibitor.activated { + color: #39FF14; +} + +#bluetooth, +#backlight { + color: @blue; +} + +#battery { + color: @green; +} + +@keyframes blink { + to { + color: @surface0; + } +} + +#battery.critical:not(.charging) { + background-color: @red; + color: @theme_text_color; + animation-name: blink; + animation-duration: 3.0s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + box-shadow: inset 0 -3px transparent; +} + +#clock { + color: @yellow; +} + +#cpu { + color: @green; +} + +#custom-keyboard, +#memory { + color: @sky; +} + +#disk { + color: @sapphire; +} + +#temperature { + color: @teal; +} + +#temperature.critical { + background-color: @red; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} +#tray > .needs-attention { + -gtk-icon-effect: highlight; +} + +#keyboard-state { + color: @flamingo; +} + +#custom-cava_mviz { + color: @pink; +} + +#custom-menu { + color: @rosewater; +} + +#custom-power { + color: @red; +} + +#custom-updater { + color: @red; +} + +#custom-light_dark { + color: @blue; +} + +#custom-weather { + color: @lavender; } -#workspaces button.active { color: @text ; } +#custom-lock { + color: @maroon; +} -#custom-recording { margin-right: 15px; } -#custom-tasks { margin-right: 15px; } -#custom-music { margin-right: 15px; } -#custom-packages { margin-right: 15px; } -#custom-news { margin-right: 15px; } -#custom-torrent { margin-right: 15px; } -#custom-memory { margin-right: 15px; } -#custom-forecast { margin-right: 15px; } -#custom-mailbox { margin-right: 15px; } +#pulseaudio { + color: @sapphire; +} -#custom-nettraf { - min-width: 120px; - margin-right: 15px; +#pulseaudio.bluetooth { + color: @pink; +} +#pulseaudio.muted { + color: @red; } -#custom-microphone { margin-right: 15px; } -#custom-volume { margin-right: 15px; } -#custom-clock { margin-right: 15px; } -#custom-internet { margin-right: 15px; } -#tray { margin-right: 15px; } +#window { + color: @mauve; +} + +#mpris { + color:@lavender; +} + +#network { + color: @teal; +} +#network.disconnected, +#network.disabled { + background-color: @surface0; + color: @text; +} + +#backlight-slider slider, +#pulseaudio-slider slider { + min-width: 0px; + min-height: 0px; + opacity: 0; + background-image: none; + border: none; + box-shadow: none; +} + +#backlight-slider trough, +#pulseaudio-slider trough { + min-width: 80px; + min-height: 5px; + border-radius: 5px; +} + +#backlight-slider highlight, +#pulseaudio-slider highlight { + min-height: 10px; + border-radius: 5px; +} diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -2,7 +2,7 @@ # Enable colors and change prompt: autoload -U colors && colors # Load colors -PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " +PS1="%{$fg[yellow]%}%~ %{$reset_color%}#%b " setopt autocd # Automatically cd into typed directory. stty stop undef # Disable ctrl-s to freeze terminal. setopt interactive_comments diff --git a/.local/bin/bookmarks b/.local/bin/bookmarks @@ -8,7 +8,7 @@ CLIPBOARD() { } DMENU() { - wmenu -i -l "${1}" -p "${2}" + $MENU -i -l "${1}" -p "${2}" } error_notify() { diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup @@ -2,16 +2,12 @@ # Syncs repositories and downloads updates, meant to be run as a cronjob. -pid=$(pgrep -x Hyprland) -var="DBUS_SESSION_BUS_ADDRESS" -export DBUS_SESSION_BUS_ADDRESS=$(grep -E -z "$var" "/proc/$pid/environ" | sed 's/DBUS_SESSION_BUS_ADDRESS=//') - notify-send "📦 Repository Sync" "Checking for package updates..." -sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates. +doas pacman -Syyuw --noconfirm || notify-send "Error downloading updates. Check your internet connection, if pacman is already running, or run update manually to see errors." -pkill -RTMIN+8 "${STATUSBAR:-waybar}" +pkill -RTMIN+8 "${STATUSBAR:-i3blocks}" if pacman -Qu | grep -v "\[ignored\]" then diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup @@ -2,17 +2,14 @@ # Set as a cron job to check for new RSS entries for newsboat. # If newsboat is open, sends it an "R" key to refresh. -pid=$(pgrep -x Hyprland) -var="DBUS_SESSION_BUS_ADDRESS" -export DBUS_SESSION_BUS_ADDRESS=$(grep -E -z "$var" "/proc/$pid/environ" | sed 's/DBUS_SESSION_BUS_ADDRESS=//') /usr/bin/notify-send "📰 Updating RSS feeds..." pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit echo 🔃 > /tmp/newsupdate -pkill -RTMIN+6 "${STATUSBAR:-waybar}" +pkill -RTMIN+6 "${STATUSBAR:-i3blocks}" /usr/bin/newsboat -x reload rm -f /tmp/newsupdate -pkill -RTMIN+6 "${STATUSBAR:-waybar}" +pkill -RTMIN+6 "${STATUSBAR:-i3blocks}" /usr/bin/notify-send "📰 RSS feed update complete." diff --git a/.local/bin/doas_askpass b/.local/bin/doas_askpass @@ -0,0 +1,47 @@ +#!/usr/bin/expect -- + +# askpass implementation for doas +# example usage: DOAS_ASKPASS="dmenu -P -p password:" doas_askpass echo working + +# don't mind the man behind the curtain +log_user 0 + +# no command, then nothing to do +if { $argc == 0 } { exit 0 } + +# treat all arguments as command input +set cmd [lrange $argv 0 end]; + +# read askpass from env or fallback to dmenu_pass () +if {[info exists ::env(DOAS_ASKPASS)]} { + set askpass "$::env(DOAS_ASKPASS)" +} else { + set askpass "dmenu_pass password:" +} + +# read password from user +set pwd [exec {*}$askpass] + +# spawn doas operation +spawn doas {*}$cmd + +# send password and execute command +expect "doas*password:" { + send -- "$pwd\r" + expect \r + log_user 1 + expect eof +} + +# get the exit status of the spawned doas command +set status [wait] + +# check exit code (4th element of wait result) +set exit_code [lindex $status 3] + +# exit with 1 if doas failed, else 0 +if { $exit_code != 0 } { + exit 1 +} else { + exit 0 +} diff --git a/.local/bin/mounter b/.local/bin/mounter @@ -1,7 +1,7 @@ #!/bin/bash # Mounts Android Phones and USB drives (encrypted or not). This script will -# replace the older `wmenumount` which had extra steps and couldn't handle +# replace the older `fuzzel --dmenumount` which had extra steps and couldn't handle # encrypted drives. # TODO: Try decrypt for drives in crtypttab # TODO: Add some support for connecting iPhones (although they are annoying). @@ -29,7 +29,7 @@ lsblkoutput="$(lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")" allluks="$(echo "$lsblkoutput" | grep crypto_LUKS)" # Get a list of the LUKS drive UUIDs already decrypted. decrypted="$(find /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-* | sed "s|.*LUKS2-||;s|-.*||")" -# Functioning for formatting drives correctly for wmenu: +# Functioning for formatting drives correctly for fuzzel --dmenu: filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6}' ; } # Get only LUKS drives that are not decrypted. @@ -55,22 +55,22 @@ set -e test -n "$alldrives" -# Feed all found drives to wmenu and get user choice. -chosen="$(echo "$alldrives" | wmenu -p "Mount which drive?" -i)" +# Feed all found drives to fuzzel --dmenu and get user choice. +chosen="$(echo "$alldrives" | fuzzel --dmenu -p "Mount which drive?" -i)" # Function for prompting user for a mountpoint. getmount(){ - mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | wmenu -i -p "Mount this drive where?")" + mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | fuzzel --dmenu -i -p "Mount this drive where?")" test -n "$mp" if [ ! -d "$mp" ]; then - mkdiryn=$(printf "No\\nYes" | wmenu -i -p "$mp does not exist. Create it?") - [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp") + mkdiryn=$(printf "No\\nYes" | fuzzel --dmenu -i -p "$mp does not exist. Create it?") + [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas_askpass mkdir -p "$mp") fi } attemptmount(){ # Attempt to mount without a mountpoint, to see if drive is in fstab. - sudo -A mount "$chosen" || return 1 + doas_askpass mount "$chosen" || return 1 notify-send "💾Drive Mounted." "$chosen mounted." exit } @@ -82,9 +82,9 @@ case "$chosen" in parttype="$(echo "$lsblkoutput" | grep "$chosen")" attemptmount || getmount case "${parttype##* }" in - vfat) sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000 ;; - btrfs) sudo -A mount "$chosen" "$mp" ;; - *) sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)" ;; + vfat) doas_askpass mount -t vfat "$chosen" "$mp" -o rw,umask=0000 ;; + btrfs) doas_askpass mount "$chosen" "$mp" ;; + *) doas_askpass mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)" ;; esac notify-send "💾Drive Mounted." "$chosen mounted to $mp." ;; @@ -99,12 +99,12 @@ case "$chosen" in done # Decrypt in a terminal window - ${TERMINAL:-st} -n floatterm -g 60x1 -e sudo cryptsetup open "$chosen" "usb$num" + ${TERMINAL:-st} -n floatterm -g 60x1 -e doas cryptsetup open "$chosen" "usb$num" # Check if now decrypted. test -b "/dev/mapper/usb$num" attemptmount || getmount - sudo -A mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)" + doas_askpass mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)" notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp." ;; @@ -113,7 +113,7 @@ case "$chosen" in getmount number="${chosen%%:*}" number="${chosen:1}" # This is a bashism. - sudo -A simple-mtpfs -o allow_other -o fsname="simple-mtpfs-$(escape "$chosen")" --device "$number" "$mp" + doas_askpass simple-mtpfs -o allow_other -o fsname="simple-mtpfs-$(escape "$chosen")" --device "$number" "$mp" notify-send "🤖 Android Mounted." "Android device mounted to $mp." ;; esac diff --git a/.local/bin/portal b/.local/bin/portal @@ -1,7 +0,0 @@ -#!/bin/sh -sleep 1 -killall xdg-desktop-portal-hyprland -killall xdg-desktop-portal-wlr -killall xdg-desktop-portal -/lib/xdg-desktop-portal-hyprland & - diff --git a/.local/bin/sysact b/.local/bin/sysact @@ -1,26 +1,26 @@ #!/bin/sh -# A wmenu wrapper script for system functions. +# A *menu wrapper script for system functions. export WM="Hyprland" case "$(readlink -f /sbin/init)" in - *systemd*) ctl='systemctl' ;; - *) ctl='loginctl' ;; + *systemd*) ctl='systemctl' ;; + *) ctl='loginctl' ;; esac wmpid(){ # This function is needed if there are multiple instances of the window manager. - tree="$(pstree -ps $$)" - tree="${tree#*$WM(}" - echo "${tree%%)*}" + tree="$(pstree -ps $$)" + tree="${tree#*$WM(}" + echo "${tree%%)*}" } -case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | wmenu -i -p 'Action: ')" in - '🔒 lock') slock ;; - "🚪 leave $WM") hyprctl dispatch exit ;; - "♻️ renew $WM") hyprctl reload ;; - '🐻 hibernate') slock $ctl hibernate -i ;; - '💤 sleep') slock $ctl suspend -i ;; - '🔃 reboot') $ctl reboot -i ;; - '🖥️shutdown') $ctl poweroff -i ;; - '📺 display off') xset dpms force off ;; - *) exit 1 ;; +case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | $MENU -i -p 'Action: ')" in + '🔒 lock') slock ;; + "🚪 leave $WM") hyprctl dispatch exit ;; + "♻️ renew $WM") hyprctl reload ;; + '🐻 hibernate') slock $ctl hibernate -i ;; + '💤 sleep') slock $ctl suspend -i ;; + '🔃 reboot') $ctl reboot -i ;; + '🖥️shutdown') $ctl poweroff -i ;; + '📺 display off') xset dpms force off ;; + *) exit 1 ;; esac diff --git a/.local/bin/unmounter b/.local/bin/unmounter @@ -1,6 +1,6 @@ #!/bin/sh -# Unmount USB drives or Android phones. Replaces the older `wmenuumount`. Fewer +# Unmount USB drives or Android phones. Replaces the older `fuzzel --dmenuumount`. Fewer # prompt and also de-decrypts LUKS drives that are unmounted. set -e @@ -13,16 +13,16 @@ allunmountable="$(echo "$mounteddroids $mounteddrives" | sed "/^$/d;s/ *$//")" test -n "$allunmountable" -chosen="$(echo "$allunmountable" | wmenu -i -p "Unmount which drive?")" +chosen="$(echo "$allunmountable" | fuzzel --dmenu -i -p "Unmount which drive?")" chosen="${chosen%% *}" test -n "$chosen" -sudo -A umount -l "/${chosen#*/}" +doas_askpass umount -l "/${chosen#*/}" notify-send "Device unmounted." "$chosen has been unmounted." # Close the chosen drive if decrypted. cryptid="$(echo "$lsblkoutput" | grep "/${chosen#*/}$")" cryptid="${cryptid%% *}" test -b /dev/mapper/"${cryptid##*/}" -sudo -A cryptsetup close "$cryptid" +doas_askpass cryptsetup close "$cryptid" notify-send "🔒Device dencryption closed." "Drive is now securely locked again." diff --git a/.local/share/applications/file.desktop b/.local/share/applications/file.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=File Manager -Exec=/usr/bin/foot -e yazi %u +Exec=/usr/bin/kitty -e yazi %u diff --git a/.local/share/applications/mail.desktop b/.local/share/applications/mail.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Mail -Exec=/usr/bin/foot -e neomutt %u +Exec=/usr/bin/kitty -e neomutt %u diff --git a/.local/share/applications/text.desktop b/.local/share/applications/text.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Text editor -Exec=/usr/bin/foot -e nvim %u +Exec=/usr/bin/kitty -e nvim %u diff --git a/aurdeps.txt b/aurdeps.txt @@ -3,4 +3,4 @@ sing-box sing-geoip-rule-set sing-geosite-rule-set gpu-screen-recorder -task-spooler +catppuccin-gtk-theme-mocha diff --git a/dependencies.txt b/dependencies.txt @@ -26,7 +26,7 @@ chafa # apps kitty -rofi-wayland +fuzzel firefox wl-clipboard neovim @@ -85,3 +85,9 @@ qt6-wayland # minecraft beta xorg-xrandr + +# dark style for qt5 apps +python-qdarkstyle + +# doas askpass +expect diff --git a/rice.sh b/rice.sh @@ -7,13 +7,14 @@ if [ "$(id -u)" -ne 0 ] exit fi -PERMUSER="$(id -nu "1000")" - -id "$PERMUSER" > /dev/null 2>&1 || { echo "User $PERMUSER does not exist. Exiting."; exit 1; } - if [ -x "$(command -v doas)" ]; then + PERMUSER=$DOAS_USER evalcommand="doas -u $PERMUSER" + cp /etc/doas.conf /etc/doas.bak + echo "permit nopass :wheel" > /etc/doas.conf + echo "permit nopass root" >> /etc/doas.conf else + PERMUSER=$SUDO_USER evalcommand="sudo -u $PERMUSER" echo "%wheel ALL=(ALL) NOPASSWD: ALL Defaults:%wheel,root runcwd=*" >/etc/sudoers.d/temp @@ -23,6 +24,8 @@ run_as_user() { $evalcommand "$@" } +usermod -aG seat $PERMUSER + DEPLIST="`sed -e 's/#.*$//' -e '/^$/d' dependencies.txt | tr '\n' ' '`" pacman -Sy --noconfirm pacman -S $DEPLIST --noconfirm --needed @@ -103,7 +106,7 @@ Target = * [Action] Description = Updating statusbar... When = PostTransaction -Exec = /usr/bin/pkill -RTMIN+8 waybar +Exec = /usr/bin/pkill -RTMIN+8 i3blocks EOL @@ -120,31 +123,27 @@ When = PostTransaction Exec = /usr/bin/setcap cap_net_admin=ep /usr/sbin/sing-box EOL -run_as_user git clone https://aur.archlinux.org/yay.git -cd yay +run_as_user git clone https://aur.archlinux.org/paru.git +cd paru run_as_user makepkg -csi --noconfirm cd "$WORKDIRECTORY" DEPLIST="`sed -e 's/#.*$//' -e '/^$/d' aurdeps.txt | tr '\n' ' '`" -run_as_user yay -S $DEPLIST --noconfirm - -run_as_user curl -LO "https://github.com/catppuccin/gtk/releases/download/v1.0.3/catppuccin-mocha-mauve-standard+default.zip" -run_as_user unzip "catppuccin-mocha-mauve-standard+default.zip" -run_as_user mv catppuccin-mocha-mauve-standard+default /home/$PERMUSER/.local/share/themes/catppuccin - -run_as_user dbus-launch gsettings set org.gnome.desktop.interface gtk-theme "catppuccin" -run_as_user dbus-launch gsettings set org.gnome.desktop.wm.preferences theme "catppuccin" +run_as_user paru --sudo doas -S $DEPLIST --noconfirm +run_as_user dbus-launch gsettings set org.gnome.desktop.interface gtk-theme "catppuccin-mocha-pink-standard+default" +run_as_user dbus-launch gsettings set org.gnome.desktop.wm.preferences theme "catppuccin-mocha-pink-standard+default" run_as_user dbus-launch gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu' run_as_user dbus-launch gsettings set org.gnome.desktop.interface font-name "Sans 11" - cd .. rm -rf hyprdots -rm -rf yay +rm -rf paru rm -rf go dinitctl enable cronie -echo "*/30 * * * * /home/$PERMUSER/.local/bin/cron/newsup\n*/30 * * * * /home/$PERMUSER/.local/bin/cron/checkup\n*/10 * * * * /usr/local/bin/mailsync" | run_as_user crontab - +echo "*/30 * * * * export DBUS_SESSION_BUS_ADDRESS=\$(grep -E -z \"DBUS_SESSION_BUS_ADDRESS\" \"/proc/\$(pgrep -x Hyprland)/environ\" | sed 's/DBUS_SESSION_BUS_ADDRESS=//'); /home/$PERMUSER/.local/bin/cron/newsup +*/30 * * * * export DBUS_SESSION_BUS_ADDRESS=\$(grep -E -z \"DBUS_SESSION_BUS_ADDRESS\" \"/proc/\$(pgrep -x Hyprland)/environ\" | sed 's/DBUS_SESSION_BUS_ADDRESS=//'); /home/$PERMUSER/.local/bin/cron/checkup +*/10 * * * * export DBUS_SESSION_BUS_ADDRESS=\$(grep -E -z \"DBUS_SESSION_BUS_ADDRESS\" \"/proc/\$(pgrep -x Hyprland)/environ\" | sed 's/DBUS_SESSION_BUS_ADDRESS=//'); /usr/local/bin/mailsync" | run_as_user crontab - -run_as_user git clone https://github.com/lukesmithxyz/mutt-wizard /home/"$PERMUSER"/mutt-wizard +run_as_user git clone https://git.awy.one/mutt-wizard /home/"$PERMUSER"/mutt-wizard cd /home/"$PERMUSER"/mutt-wizard make install @@ -154,37 +153,17 @@ cd autofox run_as_user ./configure_firefox.sh cd /home/"$PERMUSER" -run_as_user git clone https://git.awy.one/wmenu -cd /home/"$PERMUSER"/wmenu -run_as_user git checkout gruvbox -run_as_user meson build -ninja -C build install -cd /home/"$PERMUSER" - rm -rf autofox rm -rf mutt-wizard -rm -rf wmenu # MPV -zip_url=https://github.com/tomasklaen/uosc/releases/latest/download/uosc.zip -conf_url=https://github.com/tomasklaen/uosc/releases/latest/download/uosc.conf thumbfastlua_url=https://raw.githubusercontent.com/po5/thumbfast/refs/heads/master/thumbfast.lua thumbfastconf_url=https://raw.githubusercontent.com/po5/thumbfast/refs/heads/master/thumbfast.conf sponsorblock_url=https://codeberg.org/jouni/mpv_sponsorblock_minimal/raw/branch/master/sponsorblock_minimal.lua -zip_file=/tmp/uosc.zip config_dir="/home/$PERMUSER/.config/mpv" scriptopts_dir="$config_dir/script-opts" -conf_file="$scriptopts_dir/uosc.conf" - -echo "Downloading archive..." -run_as_user curl -Ls -o $zip_file $zip_url || abort "Couldn't download: $zip_url" -echo "Extracting archive..." -run_as_user unzip -qod $config_dir $zip_file || abort "Couldn't extract: $zip_file" -echo "Deleting archive..." -rm -f $zip_file || echo "Couldn't delete: $zip_file" run_as_user mkdir -p $scriptopts_dir || echo "Couldn't create: $scriptopts_dir" -run_as_user curl -Ls -o $conf_file $conf_url || echo "Couldn't download: $conf_url" # thumbfast run_as_user curl -Ls -o "$config_dir/scripts/thumbfast.lua" $thumbfastlua_url || echo "Couldn't download: $thumbfastlua_url" @@ -200,24 +179,23 @@ ln -s /usr/local/bin/wmenu /bin/bemenu # nvchad run_as_user git clone https://git.awy.one/nvchad /home/"$PERMUSER"/.config/nvim -cd /home/"$PERMUSER"/.config/nvim -run_as_user git checkout gruvbox rm -rf /home/"$PERMUSER"/.config/nvim/.git -cd "/home/$PERMUSER" # pam sed -i '/auth[[:space:]]*include[[:space:]]*system-local-login/a auth optional pam_gnome_keyring.so' /etc/pam.d/login sed -i '/session[[:space:]]*include[[:space:]]*system-local-login/a session optional pam_gnome_keyring.so auto_start' /etc/pam.d/login echo "password optional pam_gnome_keyring.so" >> /etc/pam.d/passwd -if [ -x "$(command -v sudo)" ]; then +yes | run_as_user paru --sudo doas -Scc +rm -rf /home/"$PERMUSER"/.cargo + +if [ -x "$(command -v doas)" ]; then + rm /etc/doas.conf + mv /etc/doas.bak /etc/doas.conf +else rm /etc/sudoers.d/temp fi -yes | yay -Scc -rm -rf /home/"$PERMUSER"/.cargo - chown -R $PERMUSER:wheel /home/$PERMUSER -echo echo "Your linux is riced!"