Skip to content

Instantly share code, notes, and snippets.

View naranyala's full-sized avatar
🎯
F11 - back to the context

FMH (@gema_naranyala) naranyala

🎯
F11 - back to the context
View GitHub Profile
@naranyala
naranyala / install-appimage-package.sh
Created November 14, 2023 10:05
create a shell alias like "alias install-appimage='$HOME/bin/the-script.sh'" to execute wherever the current directory path is
#!/bin/bash
# Check if the AppImage file path is provided
if [ -z "$1" ]; then
echo "Error: Please provide the path to the AppImage file as the first argument."
exit 1
fi
# Path to the AppImage file
appimage_path="$1"
#!/bin/bash
declare -A cloud
cloud["gdrive"]="https://drive.google.com/drive/home"
cloud["mega"]="https://mega.nz/fm/dwsUkKBA"
cloud["dropbox"]="https://www.dropbox.com/home"
cloud["onedrive"]="https://onedrive.live.com"
selected_cloud=$(
-- EXAMPEL KEYBIND
-- vim.api.nvim_exec([[silent! unmap <leader><leader>]], true)
-- vim.api.nvim_set_keymap("n", "<leader><leader>", "<cmd>lua require('naranyala.global-search').action_search()<CR>", {
-- desc = "NEOVIM GLOBAL MENU",
-- noremap = true,
-- silent = true,
-- })
local actions = require("telescope.actions")
local actions_state = require("telescope.actions.state")
@naranyala
naranyala / tmux-fzf-script-runner.sh
Last active November 11, 2023 09:29
tmux global searchbar, inspired by rofi/dmenu global searchbar
#!/bin/bash
# example keybind inside '.tmux.conf'
# bind-key " " display-popup -E "$HOME/bin/tmux-fzf-script-runner.sh"
declare -A list
list["001"]="say hello"
list["002"]="toggle zenmode"
list["003"]="show clock"
#!/bin/bash
DEFAULT_TERMINAL="kitty"
# Function to display error messages
display_error() {
notify-send "Error" "$1" --icon=dialog-error
}
search_query=$(rofi -dmenu -p "MAN Search: ")
#!/bin/bash
# redshift-selector.sh
# Generates a list of color temperature labels for selection
generate_menu() {
echo "Very High"
echo "High"
echo "Medium"
echo "Low"
#!/bin/bash
# Detect the laptop display (assuming it contains "eDP" in the name)
laptop_display=""
connected_displays=$(xrandr | grep " connected" | awk '{print $1}')
for display in $connected_displays; do
if [[ $display == *eDP* ]]; then
laptop_display="$display"
break
fi
#!/bin/bash
# Get a list of available resolutions using xrandr and sort them in reverse order
resolutions=$(xrandr | awk '/[0-9]x[0-9]/ {print $1}' | sort -n -r)
# Function to display resolution options using Rofi
select_resolution() {
selected_resolution=$(echo -e "$resolutions" | rofi -dmenu -p "Select a resolution:")
if [ -n "$selected_resolution" ]; then
#!/bin/bash
# Declare a custom array of dir_path
declare -A dir_path
dir_path["Downloads"]="$HOME/Downloads/"
dir_path["Pictures"]="$HOME/Pictures/"
dir_path["repos"]="$HOME/repos"
dir_path["dotfiles"]="$HOME/dotfiles"
# Use Rofi to select a custom website
#!/bin/bash
# Declare an associative array of dir_path
declare -A dir_path
dir_path["AUD-adrenaline"]="/media/naranyala/DiskD/Collections/AUD adrenaline/"
dir_path["AUD-modern-songs"]="/media/naranyala/DiskD/Collections/AUD modern-songs/"
dir_path["AUD-new-all"]="/media/naranyala/DiskD/Collections/AUD new-all/"
# Use Rofi to select a custom directory
selected_path=$(printf '%s\n' "${!dir_path[@]}" | rofi -dmenu -i -p "Goto DIR with VLC: ")