mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-04-25 14:06:54 +02:00
feat: stow and unstow applications shortcut function
This commit is contained in:
parent
5e73ab9988
commit
3604752ed7
4 changed files with 47 additions and 7 deletions
|
@ -1 +1,2 @@
|
|||
zsh
|
||||
zsh
|
||||
shortcuts
|
11
dots/shortcuts/nekoray.desktop
Normal file
11
dots/shortcuts/nekoray.desktop
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Name=Nekoray
|
||||
Comment=V2ray Client
|
||||
GenericName=VPN
|
||||
Exec=/opt/nekoray/nekoray
|
||||
Icon=/opt/nekoray/nekobox.png
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Network;Internet;
|
||||
MimeType=
|
||||
Keywords=nekoray;VPN;V2Ray;
|
13
dots/shortcuts/vscode.desktop
Normal file
13
dots/shortcuts/vscode.desktop
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Name=Visual Studio Code
|
||||
Comment=Code Editing. Refined.
|
||||
GenericName=Text Editor
|
||||
Exec=/opt/vscode/code --no-sandbox --unity-launch
|
||||
Icon=/opt/vscode/resources/app/resources/linux/code.png
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
StartupWMClass=Code
|
||||
Categories=Utility;TextEditor;Development;IDE;
|
||||
MimeType=text/plain;inode/directory;application/x-visual-studio-code-workspace;
|
||||
Actions=new-empty-window;
|
||||
Keywords=vscode;
|
27
stow.sh
27
stow.sh
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
dots_dir="dots"
|
||||
hyprland_dir="hyprland"
|
||||
shortcuts_target_dir="$HOME/.local/share/applications"
|
||||
|
||||
display_help() {
|
||||
echo "Usage: [-s | -u] [-h]"
|
||||
echo " -s Stow dotfiles"
|
||||
|
@ -7,17 +11,27 @@ display_help() {
|
|||
echo " -h Display this help message"
|
||||
}
|
||||
|
||||
stow_shortcuts() {
|
||||
mkdir -p $shortcuts_target_dir
|
||||
stow -d $dots_dir -S shortcuts -t $shortcuts_target_dir
|
||||
|
||||
echo "Shortcuts stowed successfully!"
|
||||
}
|
||||
|
||||
stow_dotfiles() {
|
||||
stow dots
|
||||
stow -d dots -S zsh -t ~/
|
||||
stow hyprland
|
||||
stow $dots_dir
|
||||
stow -d $dots_dir -S zsh -t ~/
|
||||
stow $hyprland_dir
|
||||
|
||||
echo "Dotfiles stowed successfully!"
|
||||
}
|
||||
|
||||
unstow_dotfiles() {
|
||||
stow -D dots
|
||||
stow -D -d dots -t ~/ zsh
|
||||
stow -D hyprland
|
||||
stow -D $dots_dir
|
||||
stow -D -d $dots_dir -t ~/ zsh
|
||||
stow -D -d $dots_dir -t $shortcuts_target_dir shortcuts
|
||||
# stow -D $hyprland_dir
|
||||
|
||||
echo "Dotfiles unstowed successfully!"
|
||||
}
|
||||
|
||||
|
@ -25,6 +39,7 @@ while getopts ":suh" opt; do
|
|||
case $opt in
|
||||
s)
|
||||
stow_dotfiles
|
||||
stow_shortcuts
|
||||
;;
|
||||
u)
|
||||
unstow_dotfiles
|
||||
|
|
Loading…
Add table
Reference in a new issue