diff --git a/.config/ansible/roles/arch/packages/tasks/modules/gaming.yml b/.config/ansible/roles/arch/packages/tasks/modules/gaming.yml index c46f6c13..1f3928ca 100644 --- a/.config/ansible/roles/arch/packages/tasks/modules/gaming.yml +++ b/.config/ansible/roles/arch/packages/tasks/modules/gaming.yml @@ -39,3 +39,4 @@ # Others - adwsteamgtk + - rofi-games diff --git a/.config/hypr/scripts/rofi/game_launcher b/.config/hypr/scripts/rofi/game_launcher deleted file mode 100755 index 45bf04b1..00000000 --- a/.config/hypr/scripts/rofi/game_launcher +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/bash -# Script taken out from here: https://github.com/prasanthrangan/hyprdots/blob/main/Configs/.config/hypr/scripts/gamelauncher.sh - -STEAM_LIB="$XDG_DATA_HOME/Steam/config/libraryfolders.vdf" -STEAM_THUMB="$XDG_DATA_HOME/Steam/appcache/librarycache" - -if [ ! -f $STEAM_LIB ] || [ ! -d $STEAM_THUMB ]; then - notify-send "Steam Library Not Found!" -fi - -# Check steam mount paths -STEAM_PATHS=$(grep '"path"' "$STEAM_LIB" | awk -F '"' '{print $4}') -MANIFEST_LIST=$(fd -t f -e acf appmanifest_ $STEAM_PATHS/steamapps/ 2>/dev/null) - -# Read intalled games -GAME_LIST=$(echo "$MANIFEST_LIST" | while read acf; do - appid=$(grep '"appid"' $acf | cut -d '"' -f 4) - if [ -f ${STEAM_THUMB}/${appid}_library_600x900.jpg ]; then - game=$(grep '"name"' $acf | cut -d '"' -f 4) - echo "$game|$appid" - else - continue - fi -done | sort) - -echo "$GAME_LIST" - -# Launch rofi menu -ROFI_SEL=$(echo "$GAME_LIST" | while read acf; do - appid=$(echo $acf | cut -d '|' -f 2) - game=$(echo $acf | cut -d '|' -f 1) - echo -en "$game\x00icon\x1f${STEAM_THUMB}/${appid}_library_600x900.jpg\n" -done | rofi -dmenu) - -# Launch game -if [ ! -z "$ROFI_SEL" ]; then - LAUNCHID=$(echo "$GAME_LIST" | grep "$ROFI_SEL" | cut -d '|' -f 2) - steam -applaunch "${LAUNCHID}" & - notify-send "Launching ${ROFI_SEL}..." -i ${STEAM_THUMB}/${LAUNCHID}_library_600x900.jpg -fi diff --git a/.config/hypr/scripts/rofi/screenshots_selection b/.config/hypr/scripts/rofi/screenshots_selection deleted file mode 100755 index d7285844..00000000 --- a/.config/hypr/scripts/rofi/screenshots_selection +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/bash - -IMAGE_DIR="$HOME/Imagenes/Capturas/PC" - -SELECTION=$(find "$IMAGE_DIR" -type f -exec ls -t {} + | awk -F/ '{print $NF}' | rofi -dmenu) - -if command -v satty &>/dev/null; then - satty -f "$IMAGE_DIR/$SELECTION" -else - xdg-open "$IMAGE_DIR/$SELECTION" -fi diff --git a/.config/hypr/scripts/wallpaper b/.config/hypr/scripts/wallpaper deleted file mode 100755 index ffc740d9..00000000 --- a/.config/hypr/scripts/wallpaper +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/bash - -mode=$1 - -if [ "$mode" = "" ]; then - echo "Usage: $0 [select|random]" - exit 1 -fi - -if [ "$mode" == "select" ]; then - IMAGE=$(fd --base-directory "$HOME/.config/hypr/themes/luna/walls/" --type f . | rofi -dmenu) - - if [ "$IMAGE" = "" ]; then - exit 1 - fi -elif [ "$mode" == "random" ]; then - IMAGE=$(fd --base-directory "$HOME/.config/hypr/themes/luna/walls/" --type f . | shuf -n 1) -else - exit 1 -fi - -swww img "$HOME/.config/hypr/themes/luna/walls/$IMAGE" \ - --transition-bezier 0.5,1.19,.8,.4 \ - --transition-type wipe \ - --transition-duration 2 \ - --transition-fps 75 - -notify-send "Wallpaper Changed" -i "$HOME/.config/hypr/themes/luna/walls/$IMAGE" diff --git a/.config/pacman/aur-packages.txt b/.config/pacman/aur-packages.txt index 92cca09f..76532415 100644 --- a/.config/pacman/aur-packages.txt +++ b/.config/pacman/aur-packages.txt @@ -37,6 +37,7 @@ pyprland 2.3.2-2 qt5-styleplugins 5.0.0.20170311-35 rar 7.01-1 reflector-pacman-hook-git r87.eec94bd-1 +rofi-games v1.9.1.r0.g95654f7-1 rpcs3-bin 0.0.32-1 ryujinx-bin 1.1.1315-1 satty 0.12.0-1 diff --git a/.config/rofi/.github/README.md b/.config/rofi/.github/README.md index affa9d51..539cce9f 100644 --- a/.config/rofi/.github/README.md +++ b/.config/rofi/.github/README.md @@ -1,3 +1,40 @@
+ +
+ +
+ +
+ +
+ + + + + + +
+ +# :camera: ‎ Gallery + +| **Applications** | +| ------------------------------------------ | +| ![applications](./assets/applications.png) | + +| **Game Launcher** | +| -------------------------------------------- | +| ![game-launcher](./assets/game-launcher.png) | + +| **Powermenu** | +| ------------------------------------ | +| ![powermenu](./assets/powermenu.png) | + +| **Screenshots** | +| ---------------------------------------- | +| ![screenshots](./assets/screenshots.png) | + +| **Wallpapers** | +| -------------------------------------- | +| ![wallpapers](./assets/wallpapers.png) | diff --git a/.config/rofi/.github/assets/applications.png b/.config/rofi/.github/assets/applications.png new file mode 100644 index 00000000..8da19d1f Binary files /dev/null and b/.config/rofi/.github/assets/applications.png differ diff --git a/.config/rofi/.github/assets/game-launcher.png b/.config/rofi/.github/assets/game-launcher.png new file mode 100644 index 00000000..de4ce808 Binary files /dev/null and b/.config/rofi/.github/assets/game-launcher.png differ diff --git a/.config/rofi/.github/assets/powermenu.png b/.config/rofi/.github/assets/powermenu.png new file mode 100644 index 00000000..3b492a23 Binary files /dev/null and b/.config/rofi/.github/assets/powermenu.png differ diff --git a/.config/rofi/.github/assets/screenshots.png b/.config/rofi/.github/assets/screenshots.png new file mode 100644 index 00000000..5069e9cf Binary files /dev/null and b/.config/rofi/.github/assets/screenshots.png differ diff --git a/.config/rofi/.github/assets/wallpapers.png b/.config/rofi/.github/assets/wallpapers.png new file mode 100644 index 00000000..3fb9b8ed Binary files /dev/null and b/.config/rofi/.github/assets/wallpapers.png differ diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index 23fb23c2..4b87a2c6 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -1,87 +1,89 @@ configuration { - /*---------- General setting ----------*/ - modi: "drun,run,filebrowser"; - case-sensitive: false; - cycle: false; - filter: ""; - scroll-method: 1; - normalize-match: true; - show-icons: true; - icon-theme: "Catppuccin-SE"; - steal-focus: false; + // General Settings + modi: "drun,run,filebrowser"; + case-sensitive: false; + cycle: false; + filter: ""; + scroll-method: 0; + normalize-match: true; + show-icons: true; + icon-theme: "Catppuccin-SE"; + font: "JetBrainsMono Nerd Font 10"; + steal-focus: false; + hover-select: true; - /*---------- Matching setting ----------*/ - matching: "normal"; - tokenize: true; + // Matching setting + matching: "normal"; + tokenize: true; - /*---------- SSH settings ----------*/ - ssh-client: "ssh"; - ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]"; - parse-hosts: true; - parse-known-hosts: true; + // SSH settings + ssh-client: "ssh"; + ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]"; + parse-hosts: true; + parse-known-hosts: true; - /*---------- Drun settings ----------*/ - drun-categories: ""; - drun-match-fields: "name,generic,exec,categories,keywords"; - drun-display-format: "{name} [({generic})]"; - drun-show-actions: false; - drun-url-launcher: "xdg-open"; - drun-use-desktop-cache: false; - drun-reload-desktop-cache: false; - drun { - /** Parse user desktop files. */ - parse-user: true; - /** Parse system desktop files. */ - parse-system: true; - } + // Drun settings + drun-categories: ""; + drun-match-fields: "name,generic,exec,categories,keywords"; + drun-display-format: "{name} [({generic})]"; + drun-show-actions: false; + drun-url-launcher: "xdg-open"; + drun-use-desktop-cache: false; + drun-reload-desktop-cache: false; + drun { + // Parse user desktop files. + parse-user: true; + // Parse system desktop files. + parse-system: true; + } - /*---------- Run settings ----------*/ - run-command: "{cmd}"; - run-list-command: ""; - run-shell-command: "{terminal} -e {cmd}"; + // Run settings + run-command: "{cmd}"; + run-list-command: ""; + run-shell-command: "{terminal} -e {cmd}"; - /*---------- Fallback Icon ----------*/ - run,drun { - fallback-icon: "application-x-addon"; - } + // Fallback Icon + run,drun { + fallback-icon: "application-x-addon"; + } - /*---------- Window switcher settings ----------*/ - window-match-fields: "title,class,role,name,desktop"; - window-command: "wmctrl -i -R {window}"; - window-format: "{w} - {c} - {t:0}"; - window-thumbnail: false; + // Window switcher settings + window-match-fields: "title,class,role,name,desktop"; + window-command: "wmctrl -i -R {window}"; + window-format: "{w} - {c} - {t:0}"; + window-thumbnail: false; - /*---------- History and Sorting ----------*/ - disable-history: false; - sorting-method: "fzf"; - max-history-size: 25; + // History and Sorting + disable-history: false; + sorting-method: "fzf"; + max-history-size: 25; - /*---------- Display setting ----------*/ - display-window: "Windows"; - display-windowcd: "Window CD"; - display-run: "Run"; - display-ssh: "SSH"; - display-drun: "Apps"; - display-combi: "Combi"; - display-keys: "Keys"; - display-filebrowser: "Files"; + // Display setting + display-window: "Windows"; + display-windowcd: "Window CD"; + display-run: "Run"; + display-ssh: "SSH"; + display-drun: "Apps"; + display-combi: "Combi"; + display-keys: "Keys"; + display-filebrowser: "Files"; - /*---------- Misc setting ----------*/ - terminal: "rofi-sensible-terminal"; - sort: false; - threads: 0; - click-to-exit: true; + // Misc setting + terminal: "rofi-sensible-terminal"; + sort: false; + threads: 0; + click-to-exit: true; - /*---------- File browser settings ----------*/ - filebrowser { - directories-first: true; - sorting-method: "name"; - } + // File browser settings + filebrowser { + directories-first: true; + sorting-method: "name"; + } - /*---------- Other settings ----------*/ - timeout { - action: "kb-cancel"; - delay: 0; - } + // Other settings + timeout { + action: "kb-cancel"; + delay: 0; + } } @theme "style" diff --git a/.config/rofi/scripts/game-launcher/style.rasi b/.config/rofi/scripts/game-launcher/style.rasi new file mode 100644 index 00000000..48bb2fff --- /dev/null +++ b/.config/rofi/scripts/game-launcher/style.rasi @@ -0,0 +1,135 @@ +// Config +configuration { + modi: "games"; + show-icons: true; + drun-display-format: "{name}"; + font: "JetBrainsMono Nerd Font 9"; +} + +@theme "~/.config/rofi/theme/catppuccin-macchiato.rasi" + +// Main +window { + enabled: true; + fullscreen: false; + width: 90%; + transparency: "real"; + cursor: "default"; + spacing: 0px; + padding: 0px; + border: 2px; + border-radius: 10px; + border-color: @accent; + background-color: transparent; +} + +mainbox { + enabled: true; + children: [ "inputbar-box", "listview" ]; + background-color: @background; +} + +inputbar-box { + children: [ dummy, inputbar, dummy ]; + orientation: horizontal; + expand: false; + margin: 20px 0px 0px 0px; + background-color: transparent; +} + +dummy { + expand: true; + background-color: transparent; +} + +inputbar { + enabled: true; + spacing: 15px; + margin: 0px; + background-color: transparent; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + padding: 13px 12px 13px 16px; + border: 0px; + border-radius: 7px; + border-color: @border-tb; + background-color: @background-tb; + text-color: @foreground; + str: " "; +} + +entry { + enabled: true; + padding: 12px 16px; + border: 0px; + border-radius: 7px; + border-color: @border-tb; + background-color: @background-tb; + text-color: @foreground; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; + width: 10%; +} + +// Lists +listview { + enabled: true; + columns: 10; + lines: 1; + spacing: 30px; + padding: 20px 40px 40px 40px; + cycle: true; + dynamic: false; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + cursor: "default"; + background-color: transparent; + text-color: @foreground; +} + +// Elements +element { + enabled: true; + orientation: vertical; + spacing: 0px; + padding: 5px; + border-radius: 15px; + cursor: pointer; + background-color: transparent; + text-color: @foreground; +} + +element selected.normal { + background-color: @accent; + text-color: @foreground; +} + +element-icon { + size: 25%; + spacing: 0px; + padding: 10px; + cursor: inherit; + border-radius: 20px; + background-color: transparent; + text-color: inherit; +} + +element-text { + vertical-align: 0.5; + horizontal-align: 0.5; + spacing: 0px; + padding: 10px; + cursor: inherit; + background-color: transparent; + text-color: inherit; +} diff --git a/.config/hypr/scripts/rofi/keybindings b/.config/rofi/scripts/keybindings/keybindings similarity index 92% rename from .config/hypr/scripts/rofi/keybindings rename to .config/rofi/scripts/keybindings/keybindings index 156943e7..2e7a29a1 100755 --- a/.config/hypr/scripts/rofi/keybindings +++ b/.config/rofi/scripts/keybindings/keybindings @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/bin/bash CONFIG=$(fd --base-directory "$HOME/.config/keyb/bindings" --type f . | rofi -dmenu) diff --git a/.config/rofi/scripts/powermenu/powermenu b/.config/rofi/scripts/powermenu/powermenu new file mode 100755 index 00000000..e0e6dea8 --- /dev/null +++ b/.config/rofi/scripts/powermenu/powermenu @@ -0,0 +1,80 @@ +#!/bin/bash + +# variables +uptime="$(uptime -p | sed -e 's/up //g')" +shutdown='󰤁' +reboot='󰜉' +lock='' +suspend='󰤄' +logout='󰍃' +yes='󰸞' +no='󱎘' + +rofi_cmd() { + rofi -dmenu \ + -p "Uptime: $uptime" \ + -mesg "Uptime: $uptime" \ + -theme ~/.config/rofi/scripts/powermenu/style.rasi +} + +confirm_cmd() { + rofi -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 350px;}' \ + -theme-str 'mainbox {children: [ "message", "listview" ];}' \ + -theme-str 'listview {columns: 2; lines: 1;}' \ + -theme-str 'element-text {horizontal-align: 0.5;}' \ + -theme-str 'textbox {horizontal-align: 0.5;}' \ + -dmenu \ + -p 'Confirmation' \ + -mesg 'Are you sure?' \ + -theme ~/.config/rofi/scripts/powermenu/style.rasi +} + +confirm_exit() { + echo -e "$yes\n$no" | confirm_cmd +} + +run_rofi() { + echo -e "$lock\n$suspend\n$logout\n$reboot\n$shutdown" | rofi_cmd +} + +# Execute Command +run_cmd() { + selected="$(confirm_exit)" + if [[ "$selected" == "$yes" ]]; then + if [[ $1 == '--shutdown' ]]; then + systemctl poweroff + elif [[ $1 == '--reboot' ]]; then + systemctl reboot + elif [[ $1 == '--suspend' ]]; then + mpc -q pause + hyprlock + systemctl suspend + elif [[ $1 == '--logout' ]]; then + hyprctl dispatch exit + elif [[ $1 == '--lock' ]]; then + hyprlock + fi + else + exit 0 + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in +$shutdown) + run_cmd --shutdown + ;; +$reboot) + run_cmd --reboot + ;; +$lock) + run_cmd --lock + ;; +$suspend) + run_cmd --suspend + ;; +$logout) + run_cmd --logout + ;; +esac diff --git a/.config/rofi/scripts/powermenu/style.rasi b/.config/rofi/scripts/powermenu/style.rasi new file mode 100644 index 00000000..268a5837 --- /dev/null +++ b/.config/rofi/scripts/powermenu/style.rasi @@ -0,0 +1,168 @@ +// Config +configuration { + show-icons: false; + me-select-entry: ""; + me-accept-entry: [ MousePrimary, MouseSecondary, MouseDPrimary ]; +} + +@theme "~/.config/rofi/theme/catppuccin-macchiato.rasi" + +// Main Window +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 450px; + x-offset: 0px; + y-offset: 0px; + + enabled: true; + margin: 0px; + padding: 0px; + border: 2px solid; + border-radius: 10px; + border-color: @accent; + cursor: "default"; + background-color: @background; +} + +// Main Box +mainbox { + enabled: true; + spacing: 15px; + margin: 0px; + padding: 30px; + border: 0px solid; + border-radius: 5px; + border-color: @selected; + background-color: transparent; + children: [ "message", "listview" ]; +} + +// Inputbar +inputbar { + enabled: false; + spacing: 15px; + margin: 0px; + padding: 0px; + border: 0px; + border-radius: 5px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt" ]; +} + +dummy { + background-color: transparent; +} + +textbox-prompt-colon { + font: "Symbols Nerd Font 12"; + enabled: false; + expand: false; + str: ""; + padding: 0 14px; + border-radius: 10px; + border-color: @urgent; + border: 2px solid; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +prompt { + enabled: false; + padding: 12px; + border-radius: 10px; + border-color: @active; + border: 2px solid; + background-color: @background; + text-color: @foreground; +} + +// Message +message { + enabled: false; + margin: 0px; + padding: 12px; + border: 0px solid; + border-radius: 10px; + border-color: @selected; + background-color: @background-tb; + text-color: @foreground; +} + +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; + placeholder-color: @foreground; + blink: true; + markup: true; +} + +error-message { + padding: 12px; + border: 0px solid; + border-radius: 10px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} + +// Listview +listview { + enabled: true; + columns: 5; + lines: 1; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 15px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} + +// Elements +element { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 10px; + border-color: @accent; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} + +element-text { + font: "Symbols Nerd Font 24"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element selected.normal { + background-color: var(foreground); + border-color: var(selected); + border: 0px solid; + text-color: var(background); +} diff --git a/.config/rofi/scripts/screenshot/screenshot b/.config/rofi/scripts/screenshot/screenshot new file mode 100755 index 00000000..3767254f --- /dev/null +++ b/.config/rofi/scripts/screenshot/screenshot @@ -0,0 +1,34 @@ +#!/bin/bash + +if [ "$1" = "--freeze" ]; then + extra_args="--freeze" +fi + +# variables +theme="$HOME/.config/rofi/scripts/screenshot/style.rasi" +hyprshot="$HOME/.config/hypr/scripts/hyprshot" +save_dir="$HOME/Imagenes/Capturas/PC" +filename="captura-$(date +%Y-%m-%d-%s).png" +command="$hyprshot -o $save_dir -f $filename $extra_args" + +# options to be displayed +region="󰆞" +output="" +window="" +folder="" + +selected="$(echo -e "$region\n$output\n$window\n$folder" | rofi -dmenu -theme "${theme}")" +case $selected in +$region) + $command -m region + ;; +$output) + $command -m output + ;; +$window) + $command -m window + ;; +$folder) + ~/.config/rofi/scripts/screenshot/screenshot_selection + ;; +esac diff --git a/.config/rofi/scripts/screenshot/screenshot_selection b/.config/rofi/scripts/screenshot/screenshot_selection new file mode 100755 index 00000000..8cc9f722 --- /dev/null +++ b/.config/rofi/scripts/screenshot/screenshot_selection @@ -0,0 +1,28 @@ +#!/bin/bash + +screenshots_dir="$HOME/Imagenes/Capturas/PC" +theme="$HOME/.config/rofi/scripts/wallpaper/style.rasi" + +build_theme() { + rows=$1 + cols=$2 + icon_size=$3 + + echo "element{orientation:vertical;}element-text{horizontal-align:0.5;}element-icon{size:$icon_size.0000em;}listview{lines:$rows;columns:$cols;}" +} + +rofi_cmd="rofi -dmenu -i -show-icons -theme-str $(build_theme 5 4 10) -theme ${theme}" + +choice=$( + ls -t --escape "$screenshots_dir" -p | grep -v / | + while read A; do echo -en "$A\x00icon\x1f$screenshots_dir/$A\n"; done | + $rofi_cmd +) + +screenshot="$screenshots_dir/$choice" + +if command -v satty &>/dev/null; then + satty -f "$screenshot" +else + xdg-open "$screenshot" +fi diff --git a/.config/rofi/scripts/screenshot/style.rasi b/.config/rofi/scripts/screenshot/style.rasi new file mode 100644 index 00000000..e8ea7611 --- /dev/null +++ b/.config/rofi/scripts/screenshot/style.rasi @@ -0,0 +1,168 @@ +// Config +configuration { + show-icons: false; + me-select-entry: ""; + me-accept-entry: [ MousePrimary, MouseSecondary, MouseDPrimary ]; +} + +@theme "~/.config/rofi/theme/catppuccin-macchiato.rasi" + +// Main Window +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 450px; + x-offset: 0px; + y-offset: 0px; + + enabled: true; + margin: 0px; + padding: 0px; + border: 2px solid; + border-radius: 10px; + border-color: @accent; + cursor: "default"; + background-color: @background; +} + +// Main Box +mainbox { + enabled: true; + spacing: 15px; + margin: 0px; + padding: 30px; + border: 0px solid; + border-radius: 5px; + border-color: @selected; + background-color: transparent; + children: [ "message", "listview" ]; +} + +// Inputbar +inputbar { + enabled: false; + spacing: 15px; + margin: 0px; + padding: 0px; + border: 0px; + border-radius: 5px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt" ]; +} + +dummy { + background-color: transparent; +} + +textbox-prompt-colon { + font: "Symbols Nerd Font 12"; + enabled: false; + expand: false; + str: ""; + padding: 0 14px; + border-radius: 10px; + border-color: @urgent; + border: 2px solid; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +prompt { + enabled: false; + padding: 12px; + border-radius: 10px; + border-color: @active; + border: 2px solid; + background-color: @background; + text-color: @foreground; +} + +// Message +message { + enabled: false; + margin: 0px; + padding: 12px; + border: 0px solid; + border-radius: 10px; + border-color: @selected; + background-color: @background-tb; + text-color: @foreground; +} + +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; + placeholder-color: @foreground; + blink: true; + markup: true; +} + +error-message { + padding: 12px; + border: 0px solid; + border-radius: 10px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} + +// Listview +listview { + enabled: true; + columns: 4; + lines: 1; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 15px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} + +// Elements +element { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 10px; + border-color: @accent; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} + +element-text { + font: "Symbols Nerd Font 24"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element selected.normal { + background-color: var(foreground); + border-color: var(selected); + border: 0px solid; + text-color: var(background); +} diff --git a/.config/rofi/scripts/wallpaper/style.rasi b/.config/rofi/scripts/wallpaper/style.rasi new file mode 100644 index 00000000..65b30c9c --- /dev/null +++ b/.config/rofi/scripts/wallpaper/style.rasi @@ -0,0 +1,7 @@ +@theme "~/.config/rofi/style.rasi" + +// Window +window { + width: 900px; + height: 700px; +} diff --git a/.config/rofi/scripts/wallpaper/wallpaper b/.config/rofi/scripts/wallpaper/wallpaper new file mode 100755 index 00000000..46ffa203 --- /dev/null +++ b/.config/rofi/scripts/wallpaper/wallpaper @@ -0,0 +1,31 @@ +#!/bin/bash + +wallpapers_dir="$HOME/.config/hypr/theme/walls/" + +build_theme() { + rows=$1 + cols=$2 + icon_size=$3 + + echo "element{orientation:vertical;}element-text{horizontal-align:0.5;}element-icon{size:$icon_size.0000em;}listview{lines:$rows;columns:$cols;}" +} + +theme="$HOME/.config/rofi/scripts/wallpaper/style.rasi" + +rofi_cmd="rofi -dmenu -i -show-icons -theme-str $(build_theme 4 3 12) -theme ${theme}" + +choice=$( + ls --escape "$wallpapers_dir" | + while read A; do echo -en "$A\x00icon\x1f$wallpapers_dir/$A\n"; done | + $rofi_cmd +) + +wallpaper="$wallpapers_dir/$choice" + +swww img "$wallpaper" \ + --transition-bezier 0.5,1.19,.8,.4 \ + --transition-type wipe \ + --transition-duration 2 \ + --transition-fps 75 && notify-send "Wallpaper Changed" -i "$wallpaper" --app-name=Wallpaper + +exit 1 diff --git a/.config/rofi/style.rasi b/.config/rofi/style.rasi index 4910b8f2..57d5c80f 100644 --- a/.config/rofi/style.rasi +++ b/.config/rofi/style.rasi @@ -1,176 +1,175 @@ -/*****----- Configuration -----*****/ configuration { - modi: "drun,filebrowser"; - show-icons: true; - display-drun: "Apps"; - display-run: "Run"; - display-filebrowser: "Files"; - display-file-browser-extended: "Files"; - display-window: "Windows"; - drun-display-format: "{name}\n[({generic})]"; - window-format: "Class : {c}\nWorkspace : {w}"; + modi: "drun,filebrowser"; + show-icons: true; + display-drun: "Apps"; + display-run: "Run"; + display-filebrowser: "Files"; + display-window: "Windows"; + drun-display-format: "{name}\n[({generic})]"; + window-format: "Class : {c}\nWorkspace : {w}"; + me-select-entry: ""; + me-accept-entry: [ MousePrimary, MouseSecondary, MouseDPrimary ]; } -/*****----- Global Properties -----*****/ -* { - font: "JetBrainsMono NF 10"; -} +@theme "~/.config/rofi/theme/catppuccin-macchiato.rasi" -/*****----- Main Window -----*****/ +// Main Window window { - /* properties for window widget */ - location: center; - anchor: center; - fullscreen: false; - border: 2px; - border-radius: 10px; - border-color: #B7BDF869; - width: 500px; - x-offset: 0px; - y-offset: 0px; - - /* properties for all widgets */ - enabled: true; - margin: 0px; - padding: 0px; - border-radius: 10px; - cursor: "default"; - transparency: "real"; - background-color: #24273ACC; + location: center; + anchor: center; + fullscreen: false; + border: 2px; + border-radius: 10px; + border-color: @accent; + width: 500px; + x-offset: 0px; + y-offset: 0px; + enabled: true; + margin: 0px; + padding: 0px; + border-radius: 10px; + cursor: "default"; + transparency: "real"; + background-color: @background; } -/*****----- Main Box -----*****/ +// Main Box mainbox { - enabled: true; - spacing: 15px; - padding: 30px; - background-color: transparent; - children: [ "inputbar", "mode-switcher", "listview" ]; + enabled: true; + spacing: 15px; + padding: 30px; + background-color: transparent; + children: [ "inputbar", "mode-switcher", "listview" ]; } -/*****----- Inputbar -----*****/ +// Inputbar inputbar { - enabled: true; - spacing: 15px; - margin: 0px; - background-color: transparent; - children: [ "textbox-prompt-colon", "entry" ]; - + enabled: true; + spacing: 15px; + margin: 0px; + background-color: transparent; + children: [ "textbox-prompt-colon", "entry" ]; } textbox-prompt-colon { - enabled: true; - expand: false; - padding: 13px 12px 13px 16px; - border: 0px; - border-radius: 7px; - border-color: #363A4F; - background-color: #494d64; - text-color: #CAD3F5; - str: " "; + enabled: true; + expand: false; + padding: 13px 12px 13px 16px; + border: 0px; + border-radius: 7px; + border-color: @border-tb; + background-color: @background-tb; + text-color: @foreground; + str: " "; } + entry { - enabled: true; - padding: 12px 16px; - border: 0px; - border-radius: 7px; - border-color: #363A4F; - background-color: #494d64; - text-color: #CAD3F5; - cursor: text; - placeholder: "Search..."; - placeholder-color: inherit; - vertical-align: 0.5; - horizontal-align: 0.0; - + enabled: true; + padding: 12px 16px; + border: 0px; + border-radius: 7px; + border-color: @border-tb; + background-color: @background-tb; + text-color: @foreground; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; } -/*****----- Listview -----*****/ +// Listview listview { - enabled: true; - columns: 1; - lines: 5; - cycle: true; - dynamic: true; - scrollbar: false; - layout: vertical; - reverse: false; - fixed-height: true; - fixed-columns: true; - - spacing: 10px; - background-color: transparent; - cursor: "default"; + enabled: true; + columns: 1; + lines: 5; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 10px; + background-color: transparent; + cursor: "default"; } -/*****----- Elements -----*****/ +// Elements element { - enabled: true; - spacing: 10px; - margin: 0px; - padding: 10px; - border: 0px solid; - border-radius: 7px; - background-color: transparent; - text-color: #CAD3F5; - cursor: pointer; + enabled: true; + spacing: 10px; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 7px; + background-color: transparent; + text-color: @foreground; + cursor: pointer; } + element normal.active { - background-image: linear-gradient(to right, #19B466, #7BF4B7); - text-color: #CAD3F5; + background-image: @active; + text-color: @foreground; } + element selected.normal { - border-radius: 7px; - background-image: linear-gradient(to right, #363A4F, #B7BDF89F); - text-color: #CAD3F5; + border-radius: 7px; + background-image: @selected; + text-color: @foreground; } + element selected.active { - background-image: linear-gradient(to right, #EA5553, #EAACAB); - text-color: #CAD3F5; + background-image: @urgent; + text-color: @foreground; } + element-icon { - background-color: transparent; - size: 48px; - cursor: inherit; + background-color: transparent; + size: 48px; + cursor: inherit; } + element-text { - background-color: inherit; - text-color: inherit; - cursor: inherit; - vertical-align: 0.5; - horizontal-align: 0.0; + background-color: inherit; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; } -/*****----- Mode Switcher -----*****/ -mode-switcher{ - enabled: true; - expand: false; - spacing: 15px; - background-color: transparent; +// Mode Switcher +mode-switcher { + enabled: true; + expand: false; + spacing: 15px; + background-color: transparent; } + button { - font: "JetBrainsMono NF 10"; - padding: 10px; - border-radius: 7px; - background-image: linear-gradient(#939ab7); - text-color: #24273A; - cursor: pointer; -} -button selected { - background-image: linear-gradient(#B7BDF89F); - text-color: #24273A; + padding: 10px; + border-radius: 7px; + background-image: @button; + text-color: @background; + cursor: pointer; } -/*****----- Message -----*****/ +button selected { + background-image: @button-selected; + text-color: @background; +} + +// Message error-message { - padding: 20px; - background-color: #24273A; - text-color: #CAD3F5; + padding: 20px; + background-color: @background; + text-color: @foreground; } + textbox { - padding: 0px; - border-radius: 7px; - text-color: #CAD3F5; - vertical-align: 0.5; - horizontal-align: 0.0; + padding: 0px; + border-radius: 7px; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; } diff --git a/.config/rofi/theme/catppuccin-macchiato.rasi b/.config/rofi/theme/catppuccin-macchiato.rasi new file mode 100644 index 00000000..ba81e7c8 --- /dev/null +++ b/.config/rofi/theme/catppuccin-macchiato.rasi @@ -0,0 +1,12 @@ +* { + background: #24273ACC; + foreground: #CAD3F5FF; + accent: #B7BDF869; + background-tb: #494D64FF; + border-tb: #363A4FFF; + selected: linear-gradient(to right, #363A4FFF, #B7BDF869); + button: linear-gradient(#939AB7FF); + button-selected: linear-gradient(#B7BDF869); + active: linear-gradient(to right, #8BD5CAFF, #A6DA95FF); + urgent: #ED8796FF; +}