update configs and setup

This commit is contained in:
2024-04-02 17:26:01 +02:00
parent 2939a2e2e0
commit ccd1408417
44 changed files with 1705 additions and 1342 deletions
+57
View File
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
function get_name {
local lang=$(locale | grep LANG | cut -d= -f2 | cut -d_ -f1)
local find="Name\[$lang\]="
local name=$(grep "^$find" $1 | tail -1 | sed "s/^$find//" | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
if [ "${name}" = "" ]
then
find="Name="
name=$(grep "^$find" $1 | tail -1 | sed "s/^$find//" | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
fi
echo "$name"
}
if [ "$ROFI_RETV" = "1" ]
then
for deskfile in /usr/share/settings-menu/*
do
match=$(grep "^Name" $deskfile | grep "$@" )
if [ -n "$match" ]
then
#$(gtk-launch "$deskfile")
app=$(grep '^Exec' $deskfile | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g')
coproc ( $app > /dev/null 2>&1 )
break
fi
done
exit 0
fi
function init {
for file in /usr/share/settings-menu/*
do
local name=$(get_name "$file")
local iconline=$(sed -n -e '/^Icon=/p' "$file")
local icon=${iconline/Icon=/""}
if [ -n "$name" ]
then
echo -en "$name\0icon\x1f$icon\n"
fi
done
}
init
@@ -0,0 +1,54 @@
configuration {
modi: "drun";
show-icons: false;
drun-display-format: "{name}";
}
@import "../config.rasi"
@import "../colors.rasi"
window {
enabled: true;
cursor: "default";
}
mainbox {
children: [ "message", "listview", "inputbar" ];
}
inputbar {
enabled: true;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
listview {
enabled: true;
columns: 2;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
orientation: horizontal;
horizontal-align: 0.0;
}
element {
children: [ "element-text" ];
}
element-text {
horizontal-align: 0.0;
}
span {
text-color:red;
}
@@ -1,49 +1,25 @@
configuration {
modi: "drun";
show-icons: false;
drun-display-format: "{name}";
}
@import "../config.rasi"
@import "../colors.rasi"
window {
enabled: true;
cursor: "default";
listview {
columns: 4;
lines: 4;
}
mainbox {
children: [ "message", "listview", "inputbar" ];
}
inputbar {
enabled: true;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
children: [ "textbox-prompt-colon", "entry"];
}
listview {
enabled: true;
columns: 2;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
element {
orientation:vertical;
children: ["element-icon", "element-text"];
}
element-icon {
size: 0px;
}
size: 32px;
}
element-text {
vertical-align: 0.5;
horizontal-align: 0.5;
}
+24 -31
View File
@@ -23,30 +23,11 @@ declare -A COMMANDS
# LABELS["bookmarks"]=""
# search local files
COMMANDS[""]="~/.config/rofi/locate/rofi-locate.sh"
LABELS[""]="Locate"
# COMMANDS[""]="~/.config/rofi/locate/rofi-locate.sh"
# LABELS[""]="Locate"
# open custom web searches
# COMMANDS["websearch"]="~/.scripts/rofi-scripts-collection/rofi-surfraw-websearch.sh"
# LABELS["websearch"]=""
# show clipboard history
# source: https://bitbucket.org/pandozer/rofi-clipboard-manager/overview
# COMMANDS["clipboard"]='rofi -modi "clipboard:~/.bin/rofi-clipboard-manager/mclip.py menu" -show clipboard && ~/.bin/rofi-clipboard-manager/mclip.py paste'
# LABELS["clipboard"]=""
# references --------------------------
# COMMANDS[";sr2"]="chromium 'wikipedia.org/search-redirect.php?search=\" \${input}\""
# LABELS[";sr2"]=""
# COMMANDS[";piratebay"]="chromium --disk-cache-dir=/tmp/cache http://thepiratebay.org/search/\" \${input}\""
# LABELS[";piratebay"]=""
# COMMANDS[".bin"]="spacefm -r '/home/dka/bin'"
# LABELS[".bin"]=".bin"
# COMMANDS["#screenshot"]='/home/dka/bin/screenshot-scripts/myscreenshot.sh'
# LABELS["#screenshot"]="screenshot"
COMMANDS[""]="wlogout -P 1 -s -r 10 -c 10"
LABELS[""]="Session Menu"
# greenclip clipboard history
# source: https://github.com/erebe/greenclip
@@ -56,14 +37,14 @@ LABELS[""]="Clipboard"
COMMANDS["󰖂"]='~/.config/rofi/nm-vpn/nm-vpn.sh'
LABELS["󰖂"]='VPN Connection Manager'
COMMANDS[""]='waypaper'
LABELS[""]='Wallpaper Settings'
COMMANDS["󰗅"]='~/.config/rofi/volume/volume.sh'
LABELS["󰗅"]='Sound Manager'
COMMANDS[""]='~/.config/rofi/shortcuts/shortcuts.sh'
LABELS[""]='Hotkey List'
COMMANDS[""]='wlogout'
LABELS[""]='Session Menu'
#COMMANDS[""]='~/.config/rofi/shortcuts/shortcuts.sh'
#LABELS[""]='Hotkey List'
COMMANDS["󰍹"]='wdisplays'
LABELS["󰍹"]='Display Setup'
@@ -92,9 +73,20 @@ LABELS["󰚞"]='Font Manager'
COMMANDS["󱨑"]='gufw'
LABELS["󱨑"]='Firewall Settings'
COMMANDS[""]='stacer'
LABELS[""]='System Maintenance'
COMMANDS[""]='env GTK_THEME=Adwaita:dark resources'
LABELS[""]='System Resources'
COMMANDS["󰓅"]='$HOME/.config/rofi/cpugov/rofi-cpugov.sh'
LABELS["󰓅"]='CPU Modes'
COMMANDS["󰓅"]='hardinfo'
LABELS["󰓅"]='System Profiler and Benchmark'
COMMANDS["󰀠"]='alarm-clock-applet'
LABELS["󰀠"]='Alarm & Timer'
COMMANDS["󱓞"]='~/.config/rofi/launcher/launcher.sh'
LABELS["󱓞"]='App Launcher'
################################################################################
# do not edit below
@@ -117,7 +109,8 @@ function print_menu()
function start()
{
# print_menu | rofi -dmenu -p "?=>"
print_menu | sort | rofi -theme $HOME/.config/rofi/settings-menu/settings-menu.rasi -show "Settings x Tools" -dmenu -mesg " Settings x Tools" -i -p "rofi-bangs: "
title="MoonArch \ $USER \ $(date +"%H:%M") \ $(uptime -p | sed 's/up //')"
print_menu | sort | rofi -theme $HOME/.config/rofi/settings-menu/settings-menu.rasi -show $title -dmenu -markup-rows -mesg "󰣇 $title" -i -p "rofi-bangs: "
}