From 58170ca39bd62952dc2e31d62cb2b30bf0a7b522 Mon Sep 17 00:00:00 2001 From: key Date: Mon, 25 Sep 2023 11:20:39 +0200 Subject: [PATCH] updated i3 config --- dotfiles/i3/config | 67 ++++++++++++++----------- programs/qownnotes/qownnotes_install.sh | 12 +++++ programs/spotify/spotify_install.sh | 4 ++ setup.sh | 8 +-- 4 files changed, 58 insertions(+), 33 deletions(-) create mode 100755 programs/qownnotes/qownnotes_install.sh create mode 100755 programs/spotify/spotify_install.sh diff --git a/dotfiles/i3/config b/dotfiles/i3/config index 8879648..618a7ab 100644 --- a/dotfiles/i3/config +++ b/dotfiles/i3/config @@ -1,6 +1,5 @@ # KeY's I3 COnfig file - ######################################################################### # VARIABLES # ######################################################################### @@ -31,17 +30,22 @@ set $usrBorderGaps 5 # Default treminal to use set $defTerm "alacritty -e fish" +set $defTermClass "Alacritty" # Default web browser -set $defWebBrowser "firefox & wait $!" +set $defWebBrowser "firefox" +set $defWebBrowserClass "Firefox-esr" # Default Music player -set $defMusicPlayer "/snap/bin/spotify & wait $!" +set $defMusicPlayer "spotify" +set $defMusicPlayerClass "Spotify" #default Notes program. -set $defNotes "/home/$USER/obsidian/obsidian.AppImage" +set $defNotes "QOwnNotes" +set $defNotesClass "QOwnNotes" # Default mail program -set $defMail "evolution & wait $!" +set $defMail "evolution" +set $defMailClass "Evolution" # Default Menu Launcher set $defMenuLauncher "dmenu_run" -# Default Wallpaper Mananer : it will be automatically Launched At start +# Default Wallpaper MananSr : it will be automatically Launched At start set $defWallpaperManager "feh --bg-fill --randomize $HOME/wallpaper/*" # Default Window compositor (fomr, rounded corners, tasparency and so on) :it will be automatically Launched At start set $defWindowCompositor "picom --experimental-backends --config ~/.config/picom/picom.conf" @@ -61,14 +65,12 @@ set $ws8 "8" set $ws9 "9" set $ws10 "10" -#assign [class="Navigator"] $ws3 -for_window [class="Navigator"] move to workspace $ws3 ############ # COMMANDS # ############ #https://community.spotify.com/t5/Desktop-Linux/Basic-controls-via-command-line/td-p/4295625 #Sets media key for music player -set $playerPause "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause" +set $playerPause "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" set $playerPlayPause "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" set $playerPrevious "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" set $playerNext "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" @@ -95,13 +97,13 @@ bindsym $mod+c kill # Launch Menu Launcher bindsym $mod+p exec --no-startup-id $defMenuLauncher # Launch Note app -bindsym $mod+o exec $defNotes +bindsym $mod+n exec $defNotes # Launch web Browser bindsym $mod+i exec $defWebBrowser # Launch Music Player bindsym $mod+u exec $defMusicPLayer # Launch web Browser -bindsym $mod+z exec $defMail +bindsym $mod+m exec $defMail # IMplment music player media butttons bindsym XF86AudioPause exec $playerPause @@ -171,27 +173,34 @@ exec xrandr --output HDMI-0 --rotate right ######## # USER # ######## + +# Asing certain programms to certain workspaces. +assign [class=$defTermClass] $ws2 +assign [class=$defWebBrowserClass] $ws3 +assign [class=$defNotesClass] $ws4 +assign [class=$defMailClass] $ws5 +# This is special for spotify who has issue to to comply with the assign command +for_window [class=$defMusicPlayerClass] move to workspace $ws6 + +# Open web terminal +exec --no-startup-id i3-msg exec $defTerm +# Open web browser +exec --no-startup-id i3-msg exec $defWebBrowser +# Open note Taking app +exec --no-startup-id i3-msg exec $defNotes +# Open Mail Client +exec --no-startup-id i3-msg exec $defMail +# Open Music player +exec --no-startup-id i3-msg exec $defMusicPlayer + +#Switch to workspace 1 and ready for workflow +exec --no-startup-id i3-msg workspace $ws1 + +# Lauches Wallpaper engine exec --no-startup-id $defWallpaperManager +# Lauches Window Compositor (transparency and so on ...) exec --no-startup-id $defWindowCompositor -# Go to worksapce 5 and open mails -exec --no-startup-id i3-msg workspace $ws5 -exec --no-startup-id i3-msg exec $defMail - -# Go to Worksapce 4 and open Notes -exec --no-startup-id i3-msg exec $defNotes - -# Go to Worksapce 3 and open web browser -exec --no-startup-id i3-msg workspace $ws3 -exec --no-startup-id i3-msg exec $defWebBrowser - -# Go to workspace 2 and lunch terminal emulator -exec --no-startup-id i3-msg workspace $ws2 -exec --no-startup-id i3-msg exec $defTerm - -#exec --no-startup-id i3-msg workspace $ws1 - - ######################################################################### # WINDOW ACTION # ######################################################################### diff --git a/programs/qownnotes/qownnotes_install.sh b/programs/qownnotes/qownnotes_install.sh new file mode 100755 index 0000000..972c9c7 --- /dev/null +++ b/programs/qownnotes/qownnotes_install.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +SIGNED_BY='/etc/apt/keyrings/qownnotes.gpg' +sudo mkdir -p "$(dirname "${SIGNED_BY}")" +curl --silent --show-error --location http://download.opensuse.org/repositories/home:/pbek:/QOwnNotes/Debian_12/Release.key | gpg --dearmor | sudo tee "${SIGNED_BY}" > /dev/null +sudo chmod u=rw,go=r "${SIGNED_BY}" + +SIGNED_BY='/etc/apt/keyrings/qownnotes.gpg' +ARCHITECTURE="$(dpkg --print-architecture)" +echo "deb [arch=${ARCHITECTURE} signed-by=${SIGNED_BY}] http://download.opensuse.org/repositories/home:/pbek:/QOwnNotes/Debian_12/ /" | sudo tee /etc/apt/sources.list.d/qownnotes.list > /dev/null +sudo apt update +sudo apt install qownnotes diff --git a/programs/spotify/spotify_install.sh b/programs/spotify/spotify_install.sh new file mode 100755 index 0000000..8bc9967 --- /dev/null +++ b/programs/spotify/spotify_install.sh @@ -0,0 +1,4 @@ +#!/bin/bash +curl -sS https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg +echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list +sudo apt-get update && sudo apt-get install spotify-client diff --git a/setup.sh b/setup.sh index 04e6bc8..c8b2fd8 100755 --- a/setup.sh +++ b/setup.sh @@ -40,10 +40,9 @@ pckgmngr_list=('sudo apt -y install' 'sudo pacman -S' 'raspi install') common_programs_list=(htop curl tmux git mc wget sudo unzip cmake make gcc exa scrot acpi) # These pacakges must not be found in the standart repositories and can be gits or direct installs -#custom_installs_debian=(vim fish dmenu fonts wallpaper i3 picom alacritty obsidian sddm) -custom_installs_debian=(vim) -custom_installs_arch=(vim fish dmenu fonts wallpaper i3 picom alacritty obsidian sddm) -custom_installs_raspberry=(vim fish dmenu fonts wallpaper i3 picom alacritty sddm) +custom_installs_debian=(vim fish dmenu fonts wallpaper i3 picom alacritty qownotes sddm) +custom_installs_arch=(vim fish dmenu fonts wallpaper i3 picom alacritty qownotes sddm) +custom_installs_raspberry=(vim fish dmenu fonts wallpaper i3 picom qownotes alacritty sddm) os_count=${#os_list[@]} pckgmngr_count=${#pckgmngr_list[@]} @@ -126,3 +125,4 @@ else exit_abord fi fi +