Add support for picking between plasma + i3 or i3 alone
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# picom: https://wiki.archlinux.org/title/Picom
|
||||
# manpage: https://man.archlinux.org/man/picom.1.en
|
||||
# Enable if not using compositor included with plasma
|
||||
#exec_always --no-startup-id picom --experimental-backends -b --config ~/.config/picom.conf
|
||||
exec_always --no-startup-id picom --experimental-backends -b --config ~/.config/picom.conf
|
||||
|
||||
##################
|
||||
# window manager #
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
# Only enable when using i3 without a DE (eg plasma)
|
||||
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
||||
#exec --no-startup-id dex --autostart --environment i3
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
|
||||
################
|
||||
@@ -0,0 +1,57 @@
|
||||
############################################
|
||||
# bar settings (input comes from i3blocks) #
|
||||
############################################
|
||||
|
||||
# Start i3bar to display a workspace bar
|
||||
# (plus the system information i3status finds out, if available)
|
||||
bar {
|
||||
# TODO: Figure out how to add an applications menu button on the left of bar
|
||||
# font pango: Source Code Pro (monospace) 10 #Noto Sans Regular 10
|
||||
font pango: Source Code Pro for Powerline 10
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position bottom
|
||||
#tray_padding 0
|
||||
|
||||
# When strip_workspace_numbers is set to yes,
|
||||
# any workspace that has a name of the form
|
||||
# “[n][:][NAME]” will display only the name.
|
||||
strip_workspace_numbers yes
|
||||
##strip_workspace_name no
|
||||
|
||||
colors {
|
||||
# gruvbox colors
|
||||
background $bg
|
||||
statusline $yellow
|
||||
# workspaces section
|
||||
# border bg txt
|
||||
focused_workspace $aqua $aqua $darkgray
|
||||
inactive_workspace $darkgray $darkgray $yellow
|
||||
active_workspace $darkgray $darkgray $yellow
|
||||
urgent_workspace $red $red $bg
|
||||
}
|
||||
}
|
||||
|
||||
# you can add different bars for multidisplay setups on each display:
|
||||
# set output HDMI-0 to the display you want the bar, --transparency can be set.
|
||||
# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
|
||||
# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
|
||||
# #08052be6 --> e6=90%
|
||||
|
||||
# bar {
|
||||
# font pango: Noto Sans Regular 10
|
||||
# status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
|
||||
# i3bar_command i3bar --transparency
|
||||
# output HDMI-0
|
||||
# position bottom
|
||||
#
|
||||
# colors {
|
||||
# separator $purple
|
||||
# background $darkbluetrans
|
||||
# statusline $white
|
||||
# border bg txt indicator
|
||||
# focused_workspace $lighterblue $lighterblue $darkblue $purple
|
||||
# active_workspace $lightdblue $lightdblue $darkblue $purple
|
||||
# inactive_workspace $darkblue $darkblue $lightdblue $purple
|
||||
# urgent_workspace $urgentred $urgentred $white $purple
|
||||
# }
|
||||
#}
|
||||
@@ -0,0 +1,34 @@
|
||||
# Volume
|
||||
|
||||
# use meta keys without showing osc
|
||||
#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
|
||||
#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_up
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_down
|
||||
|
||||
# gradular volume control
|
||||
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
|
||||
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
|
||||
|
||||
#bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_mute
|
||||
|
||||
# Backlight control
|
||||
# Backlight setting using dunst osc
|
||||
#bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_up
|
||||
#bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_down
|
||||
|
||||
# mic mute toggle
|
||||
bindsym XF86AudioMicMute exec amixer sset Capture toggle
|
||||
|
||||
# exit-menu
|
||||
bindsym $mod+Shift+e exec --no-startup-id ~/.config/i3/scripts/powermenu
|
||||
|
||||
# Lock the system
|
||||
# lock by blurring the screen:
|
||||
bindsym $mod+Delete exec --no-startup-id ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# applications
|
||||
bindsym $mod+n exec /usr/bin/thunar
|
||||
@@ -23,5 +23,19 @@ set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# Define colors variables:
|
||||
# gruvbox colors
|
||||
set $bg #282828
|
||||
set $red #cc241d
|
||||
set $green #98971a
|
||||
set $yellow #d79921
|
||||
set $blue #458588
|
||||
set $purple #b16286
|
||||
set $aqua #689d6a
|
||||
set $gray #a89984
|
||||
set $darkgray #1d2021
|
||||
set $white #ebdbb2
|
||||
|
||||
|
||||
# Include configs
|
||||
include config.d/*.conf
|
||||
|
||||
@@ -168,20 +168,6 @@ bindsym $mod+q kill
|
||||
# middle click over titlebar kills window
|
||||
#bindsym --release button2 kill
|
||||
|
||||
# exit-menu
|
||||
#bindsym $mod+Shift+e exec --no-startup-id ~/.config/i3/scripts/powermenu
|
||||
# using plasma's logout screen instead of i3's
|
||||
bindsym $mod+Shift+t exec --no-startup-id qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout
|
||||
#bindsym $mod+Shift+t exec --no-startup-id loginctl kill-session "$USER"
|
||||
bindsym $mod+Shift+e exec --no-startup-id kill -9 -1
|
||||
|
||||
# Lock the system
|
||||
# lock with a picture:
|
||||
#bindsym $mod+l exec --no-startup-id i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
|
||||
# lock by blurring the screen:
|
||||
# TODO: Update to use plasma lock
|
||||
bindsym $mod+Delete exec --no-startup-id ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
@@ -194,13 +180,6 @@ bindsym F1 exec --no-startup-id ~/.config/i3/scripts/keyhint-2
|
||||
# keybinding list in editor:
|
||||
#bindsym $mod+F1 exec --no-startup-id xed ~/.config/i3/keybindings
|
||||
|
||||
# Backlight control
|
||||
#bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
#bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
# Backlight setting using dunst osc
|
||||
#bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_up
|
||||
#bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_down
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
@@ -254,31 +233,6 @@ bindsym $mod+a focus parent
|
||||
bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace
|
||||
|
||||
# Multimedia Keys
|
||||
# TODO: These will only work if plasma is installed, update to add compatibility with bare i3
|
||||
|
||||
# volume
|
||||
# use meta keys without showing osc
|
||||
#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
|
||||
#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
#bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_up
|
||||
#bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_down
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"
|
||||
|
||||
# gradular volume control
|
||||
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
|
||||
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
|
||||
|
||||
# mute
|
||||
#bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
#bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_mute
|
||||
bindsym XF86AudioMute exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "mute"
|
||||
|
||||
# mic mute toggle
|
||||
#bindsym XF86AudioMicMute exec amixer sset Capture toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"
|
||||
|
||||
# audio control
|
||||
# TODO: Play pause doesn't work on desktop
|
||||
@@ -296,11 +250,8 @@ bindsym --whole-window $mod+button2 kill
|
||||
bindsym $mod+p exec --no-startup-id /usr/local/bin/switch-audio-port
|
||||
|
||||
## App shortcuts
|
||||
# TODO: dolphin/thunar, Spectacle/scrot
|
||||
bindsym $mod+w exec /usr/bin/firefox
|
||||
bindsym $mod+n exec /usr/bin/dolphin
|
||||
bindsym Print exec scrot ~/Pictures/Screenshots/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved to ~/Pictures/Screenshots/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
||||
bindsym $mod+Print exec Spectacle
|
||||
|
||||
# Power Profiles menu switcher (rofi)
|
||||
bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles
|
||||
|
||||
@@ -73,86 +73,9 @@ for_window [title="Desktop @ QRect.*"] kill; floating enable; border none
|
||||
# color settings for bar and windows #
|
||||
######################################
|
||||
|
||||
# Define colors variables:
|
||||
# gruvbox colors
|
||||
set $bg #282828
|
||||
set $red #cc241d
|
||||
set $green #98971a
|
||||
set $yellow #d79921
|
||||
set $blue #458588
|
||||
set $purple #b16286
|
||||
set $aqua #689d6a
|
||||
set $gray #a89984
|
||||
set $darkgray #1d2021
|
||||
set $white #ebdbb2
|
||||
|
||||
# gruvbox
|
||||
# class border backgr text indicator child_border
|
||||
client.focused $blue $blue $darkgray $aqua $darkgray
|
||||
client.unfocused $darkgray $darkgray $yellow $aqua $darkgray
|
||||
client.focused_inactive $darkgray $darkgray $yellow $aqua $darkgray
|
||||
client.urgent $red $red $white $red $red
|
||||
|
||||
############################################
|
||||
# bar settings (input comes from i3blocks) #
|
||||
############################################
|
||||
|
||||
# Start i3bar to display a workspace bar
|
||||
# (plus the system information i3status finds out, if available)
|
||||
bar {
|
||||
# Don't show the bar since we're using plasma bar, comment if using i3 on its own
|
||||
mode invisible
|
||||
#mode hide
|
||||
hidden_state hide
|
||||
modifier Mod4
|
||||
|
||||
# TODO: Figure out how to add an applications menu button on the left of bar
|
||||
# font pango: Source Code Pro (monospace) 10 #Noto Sans Regular 10
|
||||
font pango: Source Code Pro for Powerline 10
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position bottom
|
||||
#tray_padding 0
|
||||
|
||||
# When strip_workspace_numbers is set to yes,
|
||||
# any workspace that has a name of the form
|
||||
# “[n][:][NAME]” will display only the name.
|
||||
strip_workspace_numbers yes
|
||||
##strip_workspace_name no
|
||||
|
||||
colors {
|
||||
# gruvbox colors
|
||||
background $bg
|
||||
statusline $yellow
|
||||
# workspaces section
|
||||
# border bg txt
|
||||
focused_workspace $aqua $aqua $darkgray
|
||||
inactive_workspace $darkgray $darkgray $yellow
|
||||
active_workspace $darkgray $darkgray $yellow
|
||||
urgent_workspace $red $red $bg
|
||||
}
|
||||
}
|
||||
|
||||
# you can add different bars for multidisplay setups on each display:
|
||||
# set output HDMI-0 to the display you want the bar, --transparency can be set.
|
||||
# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
|
||||
# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
|
||||
# #08052be6 --> e6=90%
|
||||
|
||||
# bar {
|
||||
# font pango: Noto Sans Regular 10
|
||||
# status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
|
||||
# i3bar_command i3bar --transparency
|
||||
# output HDMI-0
|
||||
# position bottom
|
||||
#
|
||||
# colors {
|
||||
# separator $purple
|
||||
# background $darkbluetrans
|
||||
# statusline $white
|
||||
# border bg txt indicator
|
||||
# focused_workspace $lighterblue $lighterblue $darkblue $purple
|
||||
# active_workspace $lightdblue $lightdblue $darkblue $purple
|
||||
# inactive_workspace $darkblue $darkblue $lightdblue $purple
|
||||
# urgent_workspace $urgentred $urgentred $white $purple
|
||||
# }
|
||||
#}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# TODO: Doesn't include keybindings in i3-keybindings.conf
|
||||
I3_CONFIG=$HOME/.config/i3/config.d/keybindings.conf
|
||||
mod_key=$(sed -nre 's/^set \$mod (.*)/\1/p' ${I3_CONFIG})
|
||||
grep "^bindsym" ${I3_CONFIG} \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
############################################
|
||||
# bar settings (input comes from i3blocks) #
|
||||
############################################
|
||||
|
||||
# Start i3bar to display a workspace bar
|
||||
# (plus the system information i3status finds out, if available)
|
||||
bar {
|
||||
# Don't show the bar since we're using plasma bar, comment if using i3 on its own
|
||||
mode invisible
|
||||
#mode hide
|
||||
hidden_state hide
|
||||
modifier Mod4
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# volume
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"
|
||||
bindsym XF86AudioMute exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "mute"
|
||||
|
||||
# mic mute toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"
|
||||
|
||||
# exit-menu
|
||||
# using plasma's logout screen instead of i3's
|
||||
#bindsym $mod+Shift+t exec --no-startup-id qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout
|
||||
#bindsym $mod+Shift+t exec --no-startup-id loginctl kill-session "$USER"
|
||||
bindsym $mod+Shift+e exec --no-startup-id kill -9 -1
|
||||
|
||||
# Lock the system
|
||||
# lock by blurring the screen:
|
||||
# TODO: Update to use plasma lock
|
||||
bindsym $mod+Delete exec --no-startup-id ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# applications
|
||||
bindsym $mod+n exec /usr/bin/dolphin
|
||||
bindsym $mod+Print exec Spectacle
|
||||
+42
-10
@@ -327,11 +327,11 @@ function setup_system_configs() {
|
||||
echo "Configure syncthing here:"
|
||||
echo "http://localhost:8384"
|
||||
fi
|
||||
setup_sessions
|
||||
setup_plasma_i3
|
||||
choose_desktop_environment
|
||||
}
|
||||
|
||||
function setup_sessions() {
|
||||
# Install plasma + i3 sessions
|
||||
echo
|
||||
echo -n "Would you like to install X11 / Wayland sessions? (y/n) "
|
||||
read response
|
||||
@@ -365,21 +365,53 @@ function setup_sessions() {
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_plasma_i3() {
|
||||
function choose_desktop_environment() {
|
||||
echo
|
||||
echo -n "Would you like to run plasma alongside i3? (y/n) "
|
||||
read response
|
||||
if [[ "$response" == 'y' ]] || [[ "$response" == 'Y' ]]; then
|
||||
echo "Disabling plasma systemd autostart"
|
||||
if [[ $(program_installed kwriteconfig5) == 1 ]]; then
|
||||
kwriteconfig5 --file startkderc --group General --key systemdBoot false
|
||||
fi
|
||||
if [[ $(program_installed kwriteconfig6) == 1 ]]; then
|
||||
kwriteconfig6 --file startkderc --group General --key systemdBoot false
|
||||
fi
|
||||
setup_plasma_i3
|
||||
else
|
||||
setup_bare_i3
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_bare_i3() {
|
||||
echo "Configuring i3"
|
||||
echo "Linking: i3-keybindings.conf ($config_dir/bare-i3/i3-keybindings.conf -> ~/.config/i3/config.d/i3-keybindings.conf)"
|
||||
ln -s $config_dir/bare-i3/i3-keybindings.conf ~/.config/i3/config.d/i3-keybindings.conf
|
||||
|
||||
echo "Linking: i3-bar.conf ($config_dir/bare-i3/i3-bar.conf -> ~/.config/i3/config.d/i3-bar.conf)"
|
||||
ln -s $config_dir/bare-i3/i3-bar.conf ~/.config/i3/config.d/i3-bar.conf
|
||||
|
||||
echo "Linking: i3-autostart.conf ($config_dir/bare-i3/i3-autostart.conf -> ~/.config/i3/config.d/i3-autostart.conf)"
|
||||
ln -s $config_dir/bare-i3/i3-autostart.conf ~/.config/i3/config.d/i3-autostart.conf
|
||||
}
|
||||
|
||||
function setup_plasma_i3() {
|
||||
if [[ ! $(program_installed plasmashell) == 1 ]]; then
|
||||
echo "Plasma not installed, please install and rerun"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Configuring i3"
|
||||
echo "Linking: i3-keybindings.conf ($config_dir/plasma-i3/i3-keybindings.conf -> ~/.config/i3/config.d/i3-keybindings.conf)"
|
||||
ln -s $config_dir/plasma-i3/i3-keybindings.conf ~/.config/i3/config.d/i3-keybindings.conf
|
||||
|
||||
echo "Linking: i3-bar.conf ($config_dir/plasma-i3/i3-bar.conf -> ~/.config/i3/config.d/i3-bar.conf)"
|
||||
ln -s $config_dir/plasma-i3/i3-bar.conf ~/.config/i3/config.d/i3-bar.conf
|
||||
|
||||
echo "Disabling plasma systemd autostart"
|
||||
if [[ $(program_installed kwriteconfig5) == 1 ]]; then
|
||||
kwriteconfig5 --file startkderc --group General --key systemdBoot false
|
||||
fi
|
||||
if [[ $(program_installed kwriteconfig6) == 1 ]]; then
|
||||
kwriteconfig6 --file startkderc --group General --key systemdBoot false
|
||||
fi
|
||||
|
||||
setup_sessions
|
||||
}
|
||||
|
||||
function setup_samba() {
|
||||
echo
|
||||
echo -n "Would you like to configure samba? (y/n) "
|
||||
|
||||
Reference in New Issue
Block a user