diff --git a/setup/config.sh b/setup/config.sh index 90cddca..21382e5 100755 --- a/setup/config.sh +++ b/setup/config.sh @@ -31,7 +31,6 @@ pckgmngr_list=('sudo apt -y install' 'sudo pacman -S' 'raspi install') # Declaration of common packages and their config files forr al linux distros # These pacakges must be found in the standart repositories common_programs_list=(htop tmux git fish mc wget sudo unzip cmake make gcc exa scrot acpi) - common_dotfile_list=(fish) # Declaration of common default installations but for different OS @@ -44,6 +43,7 @@ default_installs_raspberry=(chromium) # Their instalation methodes can differ depending of the distribution # These pacakges must not be found in the standart repositories and can be gits or direct installs custom_installs_debian=(fish dmenu fonts alacritty wallpaper picom obsidian xmonad sddm) + #custom_installs_arch=(fish dmenu fonts wallpaper picom obsidian xmonad sddm) custom_installs_arch=(fonts) custom_installs_raspberry=(fish dmenu fonts alacritty wallpaper picom xmonad sddm) diff --git a/setup/dotfiles/i3/config b/setup/dotfiles/i3/config new file mode 100644 index 0000000..24fc486 --- /dev/null +++ b/setup/dotfiles/i3/config @@ -0,0 +1,287 @@ +# KeY's I3 COnfig file + + +######################################################################### +# VARIABLES # +######################################################################### +# SYSTEM # +########## +# Refreshes the I3 interface +set $refresh_i3status killall -SIGUSR1 i3status # Set MOD key do the windows Key : Mod4 +# Sets mode key to windows key +set $mod Mod4 + +######## +# USER # +######## + +set $usrBorderFocusColor #282a36 +set $usrBorderFocusLineColor #ff79c6 +set $usrBorderFocusTextColor #50fa7b +set $usrBorderFocusedIndicatorColor #ff79c6 +set $usrBorderFocusChildLineColor #ff79c6 + +set $usrBorderUnFocusColor #282a36C0 +set $usrBorderUnFocusLineColor #ff79c6C0 +set $usrBorderUnFocusTextColor #6272a4 +set $usrBorderUnFocusedIndicatorColor #ff79c6 +set $usrBorderUnFocusChildLineColor #ff79c6 + +# Default treminal to use +set $defTerm "alacritty -e fish" +# Default web browser +set $defWebBrowser "firefox & wait $!" +# Default Music player +set $defMusicPlayer "/snap/bin/spotify & wait $!" +#default Notes program. +set $defNotes "/home/$USER/obsidian/obsidian.AppImage" +# Default mail program +set $defMail "evolution & wait $!" +# Default Menu Launcher +set $defMenuLauncher "dmenu_run" +# Default Wallpaper Mananer : 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 --config ~/.config/picom/picom.conf" +# Default sleep time ! it is needed during to startup auto launches to wait for programs to launch on the given workspace +# before switching to the other workspace +set $defSleep "sleep 5" + +# Define names for default workspaces for which we configure key bindings later on. +set $ws1 "1:DEV" +set $ws2 "2:TERM" +set $ws3 "3:WEB" +set $ws4 "4:NOTES" +set $ws5 "5:MAIL" +set $ws6 "6:PLAY" +set $ws7 "7" +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 $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" + +#set's media key for sound controls +set $audioVolumeUp --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +set $audioVolumeDown --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +set $audioMute --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +set $audioMuteMic --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Sreen brightness controls +set $brightnessIncrease "xbacklight -inc 20" +set $brightnessDecrease "xbacklight -dec 20" + +######################################################################### +# LAUNCHERS USER DEFINED SHORCUTS TO LAUNCH PROGRAMMS OR ACTIONS # +######################################################################### +# USER # +######## +#Launch Terminal +bindsym $mod+Return exec $defTerm +#Kill current window +bindsym $mod+c kill +# Launch Menu Launcher +bindsym $mod+p exec --no-startup-id $defMenuLauncher +# Launch Note app +bindsym $mod+o 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 + +# IMplment music player media butttons +bindsym XF86AudioPause exec $playerPause +bindsym XF86AudioPlay exec $playerPlayPause +bindsym XF86AudioPrev exec $playerPrevious +bindsym XF86AudioNext exec $playerNext + +# Implment volume control buttons to work as intended +bindsym XF86AudioRaiseVolume exec $audioVolumeUp +bindsym XF86AudioLowerVolume exec $audioVolumeDown +bindsym XF86AudioMute exec $audioMute +bindsym XF86AudioMicMute exec $audioMuteMic + +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec $brightnessIncrease +bindsym XF86MonBrightnessDown exec $brightnessDecrease + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+q exec i3-msg exit +#bindsym $mod+Shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +######################################################################### +# CUSTOMISATION # +######################################################################### +# USER # +######## +# Font for window titles. Will also be used by the bar unless a different font +font pango:monospace 14 +# class border backgr. text indicator child_border +client.focused $usrBorderFocusLineColor $usrBorderFocusColor $usrBorderFocusTextColor $usrBorderFocusedIndicatorColor $usrBorderFocusChildLineColor +client.focused_inactive $usrBorderUnFocusLineColor $usrBorderUnFocusColor $usrBorderUnFocusedTextColor $usrBorderUnFocusedIndicatorColor $usrBorderUnFocusChildLineColor +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #2f343a #900000 #ffffff #900000 #900000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +client.background #F8F8F2 + +#gaps inner all set 20 + +######################################################################### +# STARTUP # +######################################################################### +# SYSTEM # +########## +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet +#Display +exec xrandr --output HDMI-0 --rotate right + +######## +# USER # +######## +exec --no-startup-id $defWallpaperManager +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 # +######################################################################### +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# split in horizontal orientation +bindsym $mod+x split h + +# split in vertical orientation +bindsym $mod+y split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent +#bindsym $mod+s focus child + + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + position top + status_command i3status + colors { + background #282A36 + statusline #F8F8F2 + separator #44475A + + focused_workspace #44475A #44475A #F8F8F2 + active_workspace #282A36 #44475A #F8F8F2 + inactive_workspace #282A36 #282A36 #BFBFBF + urgent_workspace #FF5555 #FF5555 #F8F8F2 + binding_mode #FF5555 #FF5555 #F8F8F2 + } +} +