From 8f863b282ea6d57152835ce5ec6438ffd3d16f9e Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Mon, 22 Jan 2024 12:32:44 +0545 Subject: [PATCH] update --- config/hypr/UserConfigs/UserKeybinds.conf | 2 +- config/hypr/scripts/{emoji.txt => Emoji.sh} | 8 ++++++++ config/hypr/scripts/Rofi_cmd.sh | 16 ---------------- config/hypr/scripts/Xmenu.sh | 2 +- 4 files changed, 10 insertions(+), 18 deletions(-) rename config/hypr/scripts/{emoji.txt => Emoji.sh} (99%) mode change 100644 => 100755 diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 948a76a8..c55eb125 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -33,7 +33,7 @@ bind = $mainMod_SHIFT, Slash, exec, codium --disable-gpu bind = SHIFT_ALT, R, exec, $RunCMD reload bind = $mainMod, X, exec, $RunCMD powermenu bind = $mainMod_SHIFT, A, exec, $RunCMD gamemode -bind = ALT, slash, exec, $RunCMD emoji +bind = ALT, slash, exec, $scriptsDir/Emoji.sh bind = ALT, F1, exec, $RunCMD kb bind = $mainMod_SHIFT, Q, exec, $RunCMD blur bind = $mainMod, space, exec, $RunCMD layout diff --git a/config/hypr/scripts/emoji.txt b/config/hypr/scripts/Emoji.sh old mode 100644 new mode 100755 similarity index 99% rename from config/hypr/scripts/emoji.txt rename to config/hypr/scripts/Emoji.sh index 30cca5a8..b0238257 --- a/config/hypr/scripts/emoji.txt +++ b/config/hypr/scripts/Emoji.sh @@ -1,3 +1,11 @@ +#!/bin/bash + +sed '1,/^### DATA ###$/d' $0 | +rofi -dmenu -config ~/.config/rofi/config-long.rasi| +cut -d ' ' -f 1 | tr -d '\n' | wl-copy + +exit +### DATA ### 😀 grinning face, grin 😃 grinning face with big eyes, mouth open smile 😄 grinning face with smiling eyes eye, mouth open smile diff --git a/config/hypr/scripts/Rofi_cmd.sh b/config/hypr/scripts/Rofi_cmd.sh index bc995aaa..a2829257 100755 --- a/config/hypr/scripts/Rofi_cmd.sh +++ b/config/hypr/scripts/Rofi_cmd.sh @@ -209,20 +209,4 @@ CONFIG=$(rofi -show file-browser-extended -file-browser-stdout -file-browser-dir hyprctl dispatch exec "[float;size 45% 80%;center 1] kitty keyb -k '$CONFIG'" } -# Emoji (ALT SLASH) -emoji() { - emojis_file="$HOME/.config/hypr/scripts/emoji.txt" - - show_emoji_menu() { - awk '{print $1, substr($0, index($0,$2))}' "$emojis_file" | rofi -dmenu -p "🔎 Search" -config ~/.config/rofi/config-long.rasi - } - - emojis=$(awk '{print $1}' "$emojis_file" | tr '\n' ' ') - selected_emoji=$(show_emoji_menu) - - if [ -n "$selected_emoji" ]; then - emoji=$(grep "$selected_emoji" "$emojis_file" | awk '{print $1}') - echo -n "$emoji" | wl-copy - fi -} diff --git a/config/hypr/scripts/Xmenu.sh b/config/hypr/scripts/Xmenu.sh index 7ecad720..81c31f1b 100755 --- a/config/hypr/scripts/Xmenu.sh +++ b/config/hypr/scripts/Xmenu.sh @@ -30,7 +30,7 @@ declare -A menu_options=( ["; Launcher"]="rofi -show drun -modi drun,filebrowser,run,window -theme $HOME/.config/rofi/launcher.rasi" ["cb Clipboard"]="$RunCMD clip" ["rm RunCMDMusic"]="$scriptsDir/Music_cmd.sh -m" - ["emj RunCMDEmoji"]="$RunCMD emoji" + ["emj RunCMDEmoji"]="$scriptsDir/Emoji.sh" ["cc Calculator"]="$RunCMD calc" ["td Todo"]="$RunCMD todo" ["tx Tmux"]="$RunCMD tmux"