Skip to content

Commit 5246651

Browse files
committed
Merge branch 'master' into stable
2 parents 4e52977 + 71e5de7 commit 5246651

File tree

204 files changed

+987
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+987
-412
lines changed

applications/About.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cat <<EOF >~/.local/share/applications/About.desktop
2+
[Desktop Entry]
3+
Version=1.0
4+
Name=About
5+
Comment=System information from Fastfetch
6+
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e bash -c 'fastfetch; read -n 1 -s'
7+
Terminal=false
8+
Type=Application
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/Ubuntu.png
10+
Categories=GTK;
11+
StartupNotify=false
12+
EOF

applications/Activity.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cat <<EOF >~/.local/share/applications/Activity.desktop
2+
[Desktop Entry]
3+
Version=1.0
4+
Name=Activity
5+
Comment=System activity from btop
6+
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/btop.toml -e btop
7+
Terminal=false
8+
Type=Application
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/Activity.png
10+
Categories=GTK;
11+
StartupNotify=false
12+
EOF

web-apps/Basecamp.sh applications/Basecamp.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
cat <<EOF > ~/.local/share/applications/Basecamp.desktop
1+
cat <<EOF >~/.local/share/applications/Basecamp.desktop
22
[Desktop Entry]
33
Version=1.0
44
Name=Basecamp
55
Comment=Basecamp Project Management
66
Exec=google-chrome --app="https://launchpad.37signals.com" --name=Basecamp
77
Terminal=false
88
Type=Application
9-
Icon=/home/$USER/.local/share/omakub/web-apps/icons/Basecamp.png
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/Basecamp.png
1010
Categories=GTK;
1111
MimeType=text/html;text/xml;application/xhtml_xml;
1212
StartupNotify=true

applications/Docker.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cat <<EOF >~/.local/share/applications/Docker.desktop
2+
[Desktop Entry]
3+
Version=1.0
4+
Name=Docker
5+
Comment=Manage Docker containers with LazyDocker
6+
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e lazydocker
7+
Terminal=false
8+
Type=Application
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/Docker.png
10+
Categories=GTK;
11+
StartupNotify=false
12+
EOF

web-apps/HEY.sh applications/HEY.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Comment=HEY Email + Calendar
66
Exec=google-chrome --app="https://app.hey.com/" --name=HEY
77
Terminal=false
88
Type=Application
9-
Icon=/home/$USER/.local/share/omakub/web-apps/icons/HEY.png
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/HEY.png
1010
Categories=GTK;
1111
MimeType=text/html;text/xml;application/xhtml_xml;
1212
StartupNotify=true

applications/Neovim.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cat <<EOF >~/.local/share/applications/Neovim.desktop
2+
[Desktop Entry]
3+
Version=1.0
4+
Name=Neovim
5+
Comment=Edit text files
6+
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e nvim %F
7+
Terminal=false
8+
Type=Application
9+
Icon=nvim
10+
Categories=Utilities;TextEditor;
11+
StartupNotify=false
12+
EOF

applications/Omakub.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cat <<EOF >~/.local/share/applications/Omakub.desktop
2+
[Desktop Entry]
3+
Version=1.0
4+
Name=Omakub
5+
Comment=Omakub Controls
6+
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e omakub
7+
Terminal=false
8+
Type=Application
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/Omakub.png
10+
Categories=GTK;
11+
StartupNotify=false
12+
EOF

web-apps/WhatsApp.sh applications/WhatsApp.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
cat <<EOF > ~/.local/share/applications/WhatsApp.desktop
1+
cat <<EOF >~/.local/share/applications/WhatsApp.desktop
22
[Desktop Entry]
33
Version=1.0
44
Name=WhatsApp
55
Comment=WhatsApp Messenger
66
Exec=google-chrome --app="https://web.whatsapp.com" --name=WhatsApp
77
Terminal=false
88
Type=Application
9-
Icon=/home/$USER/.local/share/omakub/web-apps/icons/WhatsApp.png
9+
Icon=/home/$USER/.local/share/omakub/applications/icons/WhatsApp.png
1010
Categories=GTK;
1111
MimeType=text/html;text/xml;application/xhtml_xml;
1212
StartupNotify=true

applications/icons/Activity.png

38.3 KB
Loading
File renamed without changes.

applications/icons/Docker.png

20.9 KB
Loading
File renamed without changes.

applications/icons/Omakub.png

183 KB
Loading

applications/icons/Ubuntu.png

21.4 KB
Loading
File renamed without changes.

bin/omakub

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/bash
22

33
source $OMAKUB_PATH/ascii.sh
4-
5-
if [ $# -eq 0 ]; then
6-
SUB=$(gum choose "Help" "Theme" "Font" "Install" "Uninstall" "Update" --height 9 --header "" | tr '[:upper:]' '[:lower:]')
7-
else
8-
SUB=$1
9-
fi
10-
11-
[ -n "$SUB" ] && source $OMAKUB_PATH/bin/omakub-$SUB
4+
echo "" # Add spacing
5+
echo " $(cat $OMAKUB_PATH/version)"
6+
echo "" # Add spacing
7+
source $OMAKUB_PATH/bin/omakub-sub/menu.sh

bin/omakub-font

-18
This file was deleted.

bin/omakub-help

-2
This file was deleted.

bin/omakub-install

-2
This file was deleted.

bin/omakub-sub/font-size.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
choice=$(gum choose {7..14} "<< Back" --height 11 --header "Choose your terminal font size")
2+
3+
if [[ $choice =~ ^[0-9]+$ ]]; then
4+
sed -i "s/^size = .*$/size = $choice/g" ~/.config/alacritty/font-size.toml
5+
source $OMAKUB_PATH/bin/omakub-sub/font-size.sh
6+
else
7+
source $OMAKUB_PATH/bin/omakub-sub/font.sh
8+
fi

bin/omakub-sub/font.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
set_font() {
2+
local font_name=$1
3+
local url=$2
4+
local file_type=$3
5+
local file_name="${font_name/ Nerd Font/}"
6+
7+
if ! $(fc-list | grep -i "$font_name" >/dev/null); then
8+
cd /tmp
9+
wget -O "$file_name.zip" "$url"
10+
unzip "$file_name.zip" -d "$file_name"
11+
cp "$file_name"/*."$file_type" ~/.local/share/fonts
12+
rm -rf "$file_name.zip" "$file_name"
13+
fc-cache
14+
cd -
15+
clear
16+
source $OMAKUB_PATH/ascii.sh
17+
fi
18+
19+
gsettings set org.gnome.desktop.interface monospace-font-name "$font_name 10"
20+
cp "$OMAKUB_PATH/configs/alacritty/fonts/$file_name.toml" ~/.config/alacritty/font.toml
21+
sed -i "s/\"editor.fontFamily\": \".*\"/\"editor.fontFamily\": \"$font_name\"/g" ~/.config/Code/User/settings.json
22+
}
23+
24+
if [ "$#" -gt 1 ]; then
25+
choice=${!#}
26+
else
27+
choice=$(gum choose "Cascadia Mono" "Fira Mono" "JetBrains Mono" "Meslo" "> Change size" "<< Back" --height 8 --header "Choose your programming font")
28+
fi
29+
30+
case $choice in
31+
"Cascadia Mono")
32+
set_font "CaskaydiaMono Nerd Font" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaMono.zip" "ttf"
33+
;;
34+
"Fira Mono")
35+
set_font "FiraMono Nerd Font" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraMono.zip" "otf"
36+
;;
37+
"JetBrains Mono")
38+
set_font "JetBrainsMono Nerd Font" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip" "ttf"
39+
;;
40+
"Meslo")
41+
set_font "MesloLGS Nerd Font" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip" "ttf"
42+
;;
43+
"> Change size")
44+
source $OMAKUB_PATH/bin/omakub-sub/font-size.sh
45+
exit
46+
;;
47+
esac
48+
49+
source $OMAKUB_PATH/bin/omakub-sub/menu.sh

bin/omakub-sub/install.sh

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
CHOICES=(
2+
"Dev Language Install programming language environment"
3+
"Dev Database Install development database in Docker"
4+
"1password Manage your passwords securely across devices"
5+
"Brave Chrome-based browser with built-in ad blocking"
6+
"Dropbox Sync files across computers with ease"
7+
"OBS Studio Record screencasts with inputs from both display + webcam"
8+
"Audacity Record and edit audio"
9+
"Ollama Run LLMs, like Meta's Llama3, locally"
10+
"RubyMine IntelliJ's commercial Ruby editor"
11+
"Spotify Stream music from the world's most popular service"
12+
"Steam Play games from Valve's store"
13+
"Zoom Attend and host video chat meetings"
14+
"VirtualBox Virtual machines to run Windows/Linux"
15+
"> All Re-run any of the default installers"
16+
"<< Back "
17+
)
18+
19+
CHOICE=$(gum choose "${CHOICES[@]}" --height 17 --header "Install application")
20+
21+
if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then
22+
# Don't install anything
23+
echo ""
24+
elif [[ "$CHOICE" == "> All"* ]]; then
25+
INSTALLER_FILE=$(gum file $OMAKUB_PATH/install)
26+
27+
[[ -n "$INSTALLER_FILE" ]] &&
28+
gum confirm "Run installer?" &&
29+
source $INSTALLER_FILE &&
30+
gum spin --spinner globe --title "Install completed!" -- sleep 3
31+
else
32+
INSTALLER=$(echo "$CHOICE" | awk -F ' {2,}' '{print $1}' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
33+
34+
case "$INSTALLER" in
35+
"dev-language") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-language.sh" ;;
36+
"dev-database") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-storage.sh" ;;
37+
"ollama") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-ollama.sh" ;;
38+
*) INSTALLER_FILE="$OMAKUB_PATH/install/desktop/optional/app-$INSTALLER.sh" ;;
39+
esac
40+
41+
source $INSTALLER_FILE && gum spin --spinner globe --title "Install completed!" -- sleep 3
42+
fi
43+
44+
clear
45+
source $OMAKUB_PATH/bin/omakub

bin/omakub-sub/manual.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
google-chrome "https://manual.omakub.org" >/dev/null
2+
source $OMAKUB_PATH/bin/omakub-sub/menu.sh

bin/omakub-sub/menu.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if [ $# -eq 0 ]; then
2+
SUB=$(gum choose "Theme" "Font" "Update" "Install" "Uninstall" "Manual" "Quit" --height 10 --header "" | tr '[:upper:]' '[:lower:]')
3+
else
4+
SUB=$1
5+
fi
6+
7+
[ -n "$SUB" ] && [ "$SUB" != "quit" ] && source $OMAKUB_PATH/bin/omakub-sub/$SUB.sh

bin/omakub-sub/migrate.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cd $OMAKUB_PATH
2+
last_updated_at=$(git log -1 --format=%cd --date=unix)
3+
git pull
4+
5+
for file in $OMAKUB_PATH/migrations/*.sh; do
6+
filename=$(basename "$file")
7+
migrate_at="${filename%.sh}"
8+
9+
if [ $migrate_at -gt $last_updated_at ]; then
10+
echo "Running migration for $migrate_at"
11+
source $file
12+
fi
13+
done
14+
15+
cd -

bin/omakub-sub/theme.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
THEME_NAMES=("Tokyo Night" "Catppuccin" "Nord" "Everforest" "Gruvbox" "Kanagawa" "Rose Pine")
2+
THEME=$(gum choose "${THEME_NAMES[@]}" "<< Back" --header "Choose your theme" --height 10 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
3+
4+
if [ -n "$THEME" ] && [ "$THEME" != "<<-back" ]; then
5+
cp $OMAKUB_PATH/themes/$THEME/alacritty.toml ~/.config/alacritty/theme.toml
6+
cp $OMAKUB_PATH/themes/$THEME/zellij.kdl ~/.config/zellij/themes/$THEME.kdl
7+
sed -i "s/theme \".*\"/theme \"$THEME\"/g" ~/.config/zellij/config.kdl
8+
cp $OMAKUB_PATH/themes/$THEME/neovim.lua ~/.config/nvim/lua/plugins/theme.lua
9+
10+
source $OMAKUB_PATH/themes/$THEME/gnome.sh
11+
source $OMAKUB_PATH/themes/$THEME/vscode.sh
12+
13+
# Forgo setting the Chrome theme until we might find a less disruptive way of doing it.
14+
# Having to quit Chrome, and all Chrome-based apps, is too much of an inposition.
15+
# source $OMAKUB_PATH/themes/$THEME/chrome.sh
16+
fi
17+
18+
source $OMAKUB_PATH/bin/omakub-sub/menu.sh

bin/omakub-sub/uninstall.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
UNINSTALLER=$(gum file $OMAKUB_PATH/uninstall)
2+
[ -n "$UNINSTALLER" ] && gum confirm "Run uninstaller?" && source $UNINSTALLER && gum spin --spinner globe --title "Uninstall completed!" -- sleep 3
3+
clear
4+
source $OMAKUB_PATH/bin/omakub

bin/omakub-sub/update.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
CHOICES=(
2+
"Omakub Update Omakub itself and run any migrations"
3+
"Ollama Run LLMs, like Meta's Llama3, locally"
4+
"LazyGit TUI for Git"
5+
"LazyDocker TUI for Docker"
6+
"Neovim Text editor that runs in the terminal"
7+
"Zellij Adds panes, tabs, and sessions to the terminal"
8+
"<< Back "
9+
)
10+
11+
CHOICE=$(gum choose "${CHOICES[@]}" --height 10 --header "Update manually-managed applications")
12+
13+
if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then
14+
# Don't update anything
15+
echo ""
16+
else
17+
INSTALLER=$(echo "$CHOICE" | awk -F ' {2,}' '{print $1}' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
18+
19+
case "$INSTALLER" in
20+
"omakub") INSTALLER_FILE="$OMAKUB_PATH/bin/omakub-sub/migrate.sh" ;;
21+
"localsend") INSTALLER_FILE="$OMAKUB_PATH/install/desktop/app-localsend.sh" ;;
22+
"ollama") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-ollama.sh" ;;
23+
*) INSTALLER_FILE="$OMAKUB_PATH/install/terminal/app-$INSTALLER.sh" ;;
24+
esac
25+
26+
source $INSTALLER_FILE && gum spin --spinner globe --title "Update completed!" -- sleep 3
27+
fi
28+
29+
clear
30+
source $OMAKUB_PATH/bin/omakub

bin/omakub-theme

-45
This file was deleted.

bin/omakub-uninstall

-2
This file was deleted.

bin/omakub-update

-3
This file was deleted.

0 commit comments

Comments
 (0)