From 23a564ebc3e129ab60f37cbb10ded58727f2c7ab Mon Sep 17 00:00:00 2001 From: fatmeat Date: Sun, 11 May 2025 17:05:34 +0200 Subject: [PATCH] updated i3 and rofi --- i3/config | 4 +-- rofi/ayu-retro.rasi | 63 ++++++++++++++++++++++++++++++++++++++++ rofi/ayu.rasi | 65 ------------------------------------------ rofi/config.rasi | 17 +++++++++-- rofi/powermenu.sh | 9 ++++++ rofi/retro_launcher.sh | 16 +++++++++++ 6 files changed, 105 insertions(+), 69 deletions(-) create mode 100644 rofi/ayu-retro.rasi delete mode 100644 rofi/ayu.rasi create mode 100644 rofi/powermenu.sh create mode 100644 rofi/retro_launcher.sh diff --git a/i3/config b/i3/config index e5c62c6..54f9cf1 100644 --- a/i3/config +++ b/i3/config @@ -55,7 +55,7 @@ bindsym $mod+Return exec kitty bindsym $mod+Shift+q kill # start dmenu (a program launcher) -bindsym $mod+d exec "rofi -modi drun, run -show drun" +bindsym $mod+d exec --no-startup-id ~/.config/rofi/retro-launcher.sh # A more modern dmenu replacement is rofi: # bindcode $mod+40 exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -139,7 +139,7 @@ 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 'End x Session ?' -B 'Yes' 'No'" +bindsym $mod+Shift+e exec --no-startup-id ~/.config/rofi/powermenu.sh # resize window (you can also use the mouse for that) mode "resize" { diff --git a/rofi/ayu-retro.rasi b/rofi/ayu-retro.rasi new file mode 100644 index 0000000..ed3ee91 --- /dev/null +++ b/rofi/ayu-retro.rasi @@ -0,0 +1,63 @@ +* { + font: "Iosevka SS14 12"; + background: #0f111a; + background-alt: #1a1c25; + foreground: #cbccc6; + selected-background: #ffcc66; + selected-foreground: #0f111a; + border: 2; + border-color: #5ccfe6; + padding: 15; + spacing: 5; + text-color: #cbccc6; +} + +window { + location: north; + width: 40%; + border: 2px; + padding: 10; +} + +mainbox { + background-color: inherit; + border: 0; + padding: 0; +} + +listview { + columns: 1; + lines: 8; + border: 0; + padding: 0; + spacing: 4; +} + +element { + padding: 2 4; + border: 0; +} + +element-text { + text-color: inherit; +} + +element selected { + background: #ffcc66; + text-color: #0f111a; +} + +inputbar { + children: [ prompt, entry ]; + padding: 4; + background-color: #1f2430; +} + +prompt { + padding: 0 6 0 0; + text-color: #5ccfe6; +} + +entry { + text-color: #cbccc6; +} diff --git a/rofi/ayu.rasi b/rofi/ayu.rasi deleted file mode 100644 index 681044f..0000000 --- a/rofi/ayu.rasi +++ /dev/null @@ -1,65 +0,0 @@ -* { - font: "Monocraft 10"; - border: 0; - padding: 6px 10px; - spacing: 4px; - width: 40%; - background: #0a0a0a; - foreground: #c0c0c0; -} - -window { - location: center; - anchor: north; - fullscreen: false; - y-offset: 40px; -} - -mainbox { - background-color: inherit; - children: [ inputbar, listview ]; -} - -inputbar { - children: [ prompt, entry ]; - background-color: inherit; - padding: 6px; -} - -prompt { - text: "🔍"; - margin: 0px 6px; - foreground: #ffcc66; -} - -entry { - background-color: inherit; - expand: true; - placeholder: "Search..."; - text-color: #f07178; - cursor: text; -} - -listview { - lines: 10; - fixed-height: true; - background-color: #0f0f0f; - spacing: 4px; - dynamic: true; - scrollbar: false; -} - -element { - padding: 4px; - background-color: transparent; - text-color: #c0c0c0; -} - -element selected { - background-color: #ffcc66; - text-color: #0a0a0a; -} - -element alternate { - background-color: #111111; -} diff --git a/rofi/config.rasi b/rofi/config.rasi index c59f867..2374d55 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -1,2 +1,15 @@ - -@theme "~/.config/rofi/ayu.rasi" +configuration { + modi: "drun,run,window"; + font: "Iosevka SS14 12"; + show-icons: false; + location: 0; + yoffset: 20; + xoffset: 0; + lines: 8; + line-margin: 3; + line-padding: 3; + padding: 10; + width: 40; + hide-scrollbar: true; + theme: "ayu-retro"; +} diff --git a/rofi/powermenu.sh b/rofi/powermenu.sh new file mode 100644 index 0000000..c178c57 --- /dev/null +++ b/rofi/powermenu.sh @@ -0,0 +1,9 @@ + +choice=$(printf "Shutdown\nReboot\nSuspend\nLogout" | rofi -dmenu -theme ayu-retro -p "╔═[ SYSTEM MENU ]═╗") + +case "$choice" in + " Shutdown") systemctl poweroff ;; + " Reboot") systemctl reboot ;; + " Suspend") systemctl suspend ;; + " Logout") i3-msg exit ;; # adjust for your WM +esac diff --git a/rofi/retro_launcher.sh b/rofi/retro_launcher.sh new file mode 100644 index 0000000..4b70294 --- /dev/null +++ b/rofi/retro_launcher.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +clear +echo -e "\033[0;32m" +printf "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n" +printf "▒▒▒ LOADING SYSTEM INTERFACE █▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\n" +printf "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓\n" +sleep 0.6 +printf "▒ Establishing secure link...\n" +sleep 0.4 +printf "▒ Initializing graphical core...\n" +sleep 0.3 +printf "▒ Launching interface...\n" +sleep 0.2 +echo -e "\033[0m" +rofi -show drun -theme ayu-retro -p "╔═[ SELECT PROGRAM ]═╗"