From 680750ca0ef93b860947f1f88edbf0dbc4a0ca25 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 25 Jan 2024 00:16:06 +0545 Subject: [PATCH] fixex variable --- config/hypr/UserConfigs/UserKeybinds.conf | 10 +- config/hypr/scripts/Ui_cmd.sh | 18 ++++ config/rofi/WallSelect.rasi | 106 ++++++++++++++++++++++ 3 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 config/rofi/WallSelect.rasi diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index d9b4a2e8..b3658090 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -50,11 +50,11 @@ bind = $mainMod, R, exec, $RunCMD sr bind = $mainMod_SHIFT, N, exec, swaync-client -C # Online Music related keybinds -bind = ALT, M, exec, $scriptsDir/RunCMD music -m # open rofi music -bind = ALT, S, exec, $scriptsDir/RunCMD music -s # Stop -bind = ALT, N, exec, $scriptsDir/RunCMD music -n # Next -bind = ALT, P, exec, $scriptsDir/RunCMD music -p # Previous -bind = ALT, R, exec, $scriptsDir/RunCMD music -k # Resume +bind = ALT, M, exec, $RunCMD music -m # open rofi music +bind = ALT, S, exec, $RunCMD music -s # Stop +bind = ALT, N, exec, $RunCMD music -n # Next +bind = ALT, P, exec, $RunCMD music -p # Previous +bind = ALT, R, exec, $RunCMD music -k # Resume # Waybar / Bar related diff --git a/config/hypr/scripts/Ui_cmd.sh b/config/hypr/scripts/Ui_cmd.sh index 9884fc19..1c5b3fb9 100755 --- a/config/hypr/scripts/Ui_cmd.sh +++ b/config/hypr/scripts/Ui_cmd.sh @@ -120,6 +120,24 @@ selectwall() { fi } + +select_wall(){ + # Set some variables +rofi_command="rofi -dmenu -theme ${HOME}/.config/rofi/WallSelect.rasi -theme-str ${rofi_override}" + +rofi_override="element-icon{size:${monitor_res}px;border-radius:0px;}" + + +# Launch rofi +wall_selection=$(find "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) -exec basename {} \; | sort | while read -r A ; do echo -en "$A\x00icon\x1f""${wallDIR}"/"$A\n" ; done | $rofi_command) + +# Set wallpaper +[[ -n "$wall_selection" ]] || exit 1 +swww img $SWWW_PARAMS1 "${wallDIR}"/"${wall_selection}" && linker + +exit 0 +} + sr() { if pgrep -x "wf-recorder" > /dev/null; then pkill -SIGTERM wf-recorder diff --git a/config/rofi/WallSelect.rasi b/config/rofi/WallSelect.rasi new file mode 100644 index 00000000..4abe31cd --- /dev/null +++ b/config/rofi/WallSelect.rasi @@ -0,0 +1,106 @@ +// # z0mbi3 - https://github.com/gh0stzk/dotfiles + +configuration { + modi: "drun"; + show-icons: true; + drun-display-format: "{name}"; + font: "JetBrainsMono NF Bold 11"; + + //hover-select: true; + //me-select-entry: ""; + //me-accept-entry: "MousePrimary"; +} + +//----- Global Properties -----// + +* { +main-bg: #282828E6; +main-fg: #fbf1c7; +select-bg: #d79921; +select-fg: #282828; +} + +//----- Main Window -----// + +window { + enabled: true; + fullscreen: false; + width: 100%; + transparency: "real"; + cursor: "default"; + spacing: 0px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: transparent; + background-color: transparent; +} + +//----- Main Box -----// + +mainbox { + enabled: true; + children: [ "listview" ]; + background-color: @main-bg; +} + +//----- Listview -----// + +listview { + enabled: true; + columns: 6; + lines: 1; + spacing: 50px; + padding: 20px 30px; + cycle: true; + dynamic: false; + scrollbar: false; + layout: vertical; + reverse: true; + fixed-height: true; + fixed-columns: true; + cursor: "default"; + background-color: transparent; + text-color: @main-fg; +} + +//----- Elements -----// + +element { + enabled: true; + orientation: horizontal; + spacing: 0px; + padding: 0px; + border-radius: 20px; + cursor: pointer; + background-color: transparent; + text-color: @main-fg; +} + +@media(max-aspect-ratio: 1.8) { + element { + orientation: vertical; + } +} + +element selected.normal { + background-color: #7AA2F7FF; + text-color: @select-fg; +} + +element-icon { + size: 33%; + cursor: inherit; + border-radius: 0px; + background-color: transparent; + text-color: inherit; +} + +element-text { + vertical-align: 0.5; + horizontal-align: 0.5; + padding: 20px; + cursor: inherit; + background-color: transparent; + text-color: inherit; +}