Configuration of X11 i3wm tty
This commit is contained in:
168
i3wm/config
Normal file
168
i3wm/config
Normal file
@@ -0,0 +1,168 @@
|
||||
set $mod Mod4
|
||||
|
||||
# Reload Restart config
|
||||
bindsym $mod+c reload
|
||||
bindsym $mod+r restart
|
||||
bindsym $mod+e exit
|
||||
|
||||
# Floating Modifier
|
||||
floating_modifier $mod
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# change focus
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move Focused
|
||||
bindsym $mod+Control+Up move up
|
||||
bindsym $mod+Control+Down move down
|
||||
bindsym $mod+Control+Left move left
|
||||
bindsym $mod+Control+Right move right
|
||||
|
||||
bindsym $mod+o move container to output next
|
||||
|
||||
# Resizing window
|
||||
bindsym $mod+Shift+Up resize grow height 10 px or 10 ppt
|
||||
bindsym $mod+Shift+Down resize shrink height 10 px or 10 ppt
|
||||
bindsym $mod+Shift+Left resize shrink width 10 px or 10 ppt
|
||||
bindsym $mod+Shift+Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# Workspace layout
|
||||
bindsym $mod+space layout toggle splitv splith tabbed
|
||||
|
||||
# Fullscreen
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# Splitting
|
||||
bindsym $mod+v split vertical
|
||||
bindsym $mod+h split horizontal
|
||||
bindsym $mod+Control+space split toggle
|
||||
|
||||
# Volume control
|
||||
bindsym F5 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym F6 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
|
||||
##############
|
||||
# Workspaces #
|
||||
##############
|
||||
|
||||
set $monitor0 HDMI-0
|
||||
set $monitor1 HDMI-1
|
||||
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
|
||||
workspace $ws1 output $monitor0
|
||||
workspace $ws2 output $monitor0
|
||||
workspace $ws3 output $monitor0
|
||||
workspace $ws4 output $monitor0
|
||||
workspace $ws5 output $monitor1
|
||||
workspace $ws6 output $monitor1
|
||||
workspace $ws7 output $monitor1
|
||||
workspace $ws8 output $monitor1
|
||||
|
||||
bindsym $mod+mod2+KP_1 workspace $ws1
|
||||
bindsym $mod+mod2+KP_2 workspace $ws2
|
||||
bindsym $mod+mod2+KP_3 workspace $ws3
|
||||
bindsym $mod+mod2+KP_4 workspace $ws4
|
||||
bindsym $mod+mod2+KP_5 workspace $ws5
|
||||
bindsym $mod+mod2+KP_6 workspace $ws6
|
||||
bindsym $mod+mod2+KP_7 workspace $ws7
|
||||
bindsym $mod+mod2+KP_8 workspace $ws8
|
||||
|
||||
bindsym $mod+Control+mod2+KP_1 move container to workspace $ws1
|
||||
bindsym $mod+Control+mod2+KP_2 move container to workspace $ws2
|
||||
bindsym $mod+Control+mod2+KP_3 move container to workspace $ws3
|
||||
bindsym $mod+Control+mod2+KP_4 move container to workspace $ws4
|
||||
bindsym $mod+Control+mod2+KP_5 move container to workspace $ws5
|
||||
bindsym $mod+Control+mod2+KP_6 move container to workspace $ws6
|
||||
bindsym $mod+Control+mod2+KP_7 move container to workspace $ws7
|
||||
bindsym $mod+Control+mod2+KP_8 move container to workspace $ws8
|
||||
|
||||
###########################
|
||||
#Design
|
||||
###########################
|
||||
|
||||
title_align center
|
||||
default_border pixel 1
|
||||
|
||||
# Gaps
|
||||
gaps inner 10px
|
||||
hide_edge_borders smart_no_gaps
|
||||
smart_gaps on
|
||||
gaps inner 5
|
||||
|
||||
#smart|ignore|leave_fullscreen
|
||||
popup_during_fullscreen ignore
|
||||
|
||||
# Font
|
||||
set $font ComicShannsMono Nerd Font Bold
|
||||
font pango:$font 11
|
||||
|
||||
#colors
|
||||
set_from_resource $fg i3wm.foreground #abb2bf
|
||||
set_from_resource $fgli i3wm.foreground-light #d4d8df
|
||||
set_from_resource $fglier i3wm.foreground-lighter #f6f7f9
|
||||
set_from_resource $bg i3wm.background #282c34
|
||||
set_from_resource $bgli i3wm.background-light #323842
|
||||
set_from_resource $bgda i3wm.background-dark #21252b
|
||||
set_from_resource $bgdaer i3wm.background-darker #1e2227
|
||||
set_from_resource $black i3wm.color0 #1e2227
|
||||
set_from_resource $red i3wm.color1 #e06c75
|
||||
set_from_resource $green i3wm.color2 #98c379
|
||||
set_from_resource $yellow i3wm.color3 #e5c07b
|
||||
set_from_resource $blue i3wm.color4 #000000
|
||||
set_from_resource $purple i3wm.color5 #c678dd
|
||||
set_from_resource $cyan i3wm.color6 #56b6c2
|
||||
set_from_resource $white i3wm.color7 #f6f7f9
|
||||
|
||||
# class border backgr. text indicator child_border
|
||||
|
||||
client.focused $blue $bg $blue $purple $blue
|
||||
client.focused_inactive $bgdaer $bgli $fglier $purple $bgdaer
|
||||
client.unfocused $bgdaer $bg $fg $purple $bgdaer
|
||||
client.urgent $red $bg $fg $purple $bgli
|
||||
client.placeholder $bgli $bg $fg $purple $bgli
|
||||
|
||||
client.background $bg
|
||||
|
||||
###########
|
||||
# Startup #
|
||||
###########
|
||||
|
||||
exec --no-startup-id xrandr --output HDMI-1 --primary --right-of HDMI-0
|
||||
exec_always --no-startup-id /etc/i3/wallpapers.sh
|
||||
exec_always --no-startup-id "killall picom ; picom"
|
||||
exec_always --no-startup-id "killall dunst ; dunst"
|
||||
exec_always --no-startup-id "killall polybar ; polybar HDMI-0 ; polybar HDMI-1"
|
||||
exec_always --no-startup-id "killall nextcloud ; nextcloud"
|
||||
|
||||
#################
|
||||
# Apps shortcut #
|
||||
#################
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id dmenu_run_history -l 10 -fn "ComicShannsMono Nerd Font" -nb "#282c34" -nf "#61AFEF" -sb "#61AFEF" -sf "#282C34"
|
||||
|
||||
bindsym Print exec flameshot gui
|
||||
bindsym $mod+Shift+p exec --no-startup-id pavucontrol
|
||||
bindsym $mod+Shift+d exec --no-startup-id discord
|
||||
bindsym $mod+Shift+f exec --no-startup-id firefox
|
||||
bindsym $mod+Shift+s exec --no-startup-id steam
|
||||
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec --no-startup-id urxvt
|
||||
|
||||
# Display help
|
||||
for_window [instance="cheatsheet"] floating enable
|
||||
bindsym $mod+s exec --no-startup-id urxvt -geometry 160x40 -name cheatsheet -e /etc/i3/i3wm_key_help.sh
|
||||
9
i3wm/deploy.sh
Executable file
9
i3wm/deploy.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Switch to the script directory
|
||||
_BASENAME=$(basename "$0")
|
||||
cd "$(dirname "$0")" || _exit 1
|
||||
|
||||
cp config /etc/i3/config
|
||||
cp i3wm_key_help.sh /etc/i3/i3wm_key_help.sh
|
||||
cp wallpapers.sh /etc/i3/wallpapers.sh
|
||||
101
i3wm/i3wm_key_help.sh
Executable file
101
i3wm/i3wm_key_help.sh
Executable file
@@ -0,0 +1,101 @@
|
||||
#!/bin/bash
|
||||
|
||||
_CR="\e[170D\e[1B"
|
||||
_E1="\e[1C"
|
||||
_E2="\e[2C"
|
||||
_E_RIGHT="\e[70C"
|
||||
_BOLD="\e[1m"
|
||||
_BLACK="\e[38;5;0m"
|
||||
_RED="\e[38;5;1m"
|
||||
_BLUE="\e[38;5;4m"
|
||||
_PURPLE="\e[38;5;5m"
|
||||
_CYAN="\e[38;5;6m"
|
||||
_BG_RED="\e[48;5;1m"
|
||||
_RESET="\e[0m"
|
||||
|
||||
# _title [string:bg_color] [string:message] [bool:right]
|
||||
_title() {
|
||||
printf "$_CR$_E1$_BOLD$_BLACK$1"
|
||||
[[ ! -z $3 ]] && printf "$_E_RIGHT"
|
||||
for (( i=0; i<(( 10 - ${#2} / 2 )); i++ ))
|
||||
do
|
||||
printf " "
|
||||
done
|
||||
printf "$2"
|
||||
for (( i=0; i<(( 10 - ${#2} / 2 )); i++ ))
|
||||
do
|
||||
printf " "
|
||||
done
|
||||
(( ${#2} % 2 == 0 )) && printf " "
|
||||
printf "$_RESET$_CR"
|
||||
}
|
||||
|
||||
# _shortcut [string:modifier] [string:key] [string:message] [bool:right]
|
||||
_shortcut() {
|
||||
_MODIFIER=$(sed "s|+|\\\e[38;5;1m+\\\e[38;5;5m|g" <<< $1)
|
||||
[[ ! -z $4 ]] && printf "$_E_RIGHT"
|
||||
printf "$_E2"
|
||||
printf "$_PURPLE$_MODIFIER$_RESET"
|
||||
[[ ! -z $1 ]] && printf "$_RED+$_RESET"
|
||||
printf "$_CYAN$2$_RESET"
|
||||
printf " $3"
|
||||
printf "$_CR"
|
||||
}
|
||||
|
||||
_move() {
|
||||
printf "\e[$1;$2H"
|
||||
}
|
||||
|
||||
tput civis
|
||||
clear
|
||||
|
||||
_title "\e[48;5;063m" "i3"
|
||||
_shortcut "Super" "c" "Reload i3"
|
||||
_shortcut "Super" "r" "Restart i3"
|
||||
_shortcut "Super" "e" "Exit i3"
|
||||
|
||||
_title "\e[48;5;035m" "Applications"
|
||||
_shortcut "Super" "d" "Dmenu"
|
||||
_shortcut "Super+Shift" "f" "Firefox"
|
||||
_shortcut "Super+Shift" "s" "Steam"
|
||||
_shortcut "Super+Shift" "d" "Discord"
|
||||
_shortcut "Super+Shift" "p" "Pavucontrol"
|
||||
|
||||
_title "\e[48;5;191m" "Window"
|
||||
_shortcut "Super" "q" "Kill window"
|
||||
_shortcut "Super" "o" "Move window to next screen"
|
||||
_shortcut "Super" "h" "Split horizontally"
|
||||
_shortcut "Super" "v" "Split vertically"
|
||||
_shortcut "Super" "f" "Toggle fullscreen"
|
||||
_shortcut "Super" "Space" "Toggle layout"
|
||||
_shortcut "Super" "arrows" "Change window focus"
|
||||
_shortcut "Super+Shift" "arrows" "Resize window"
|
||||
_shortcut "Super+ctrl" "arrows" "Move focused window"
|
||||
_shortcut "Super+Ctrl" "Space" "Toggle window split"
|
||||
|
||||
_title "\e[48;5;170m" "Workspace"
|
||||
_shortcut "Super" "Numpad" "Move to workspace n"
|
||||
_shortcut "Super+Ctrl" "Numpad" "Move focused window to workspace n"
|
||||
|
||||
_title "\e[48;5;092m" "Sound"
|
||||
_shortcut "" "F4" "Decrease volume"
|
||||
_shortcut "" "F5" "Increase volume"
|
||||
|
||||
_move 1 1
|
||||
|
||||
_title "\e[48;5;204m" "Urxvt" true
|
||||
_shortcut "Alt" "Up" "Increase font size" true
|
||||
_shortcut "Alt" "Down" "Decrease font size" true
|
||||
_shortcut "Alt" "=" "Reset font size" true
|
||||
_shortcut "Alt" "/" "Show font" true
|
||||
_shortcut "Alt" "u" "Url matcher" true
|
||||
_shortcut "Shift" "Up" "Scroll up one line" true
|
||||
_shortcut "Shift" "PageUp" "Scroll one page" true
|
||||
_shortcut "Shift" "Down" "Scroll down one line" true
|
||||
_shortcut "Shift" "PageDown" "Scroll down one page" true
|
||||
|
||||
_title "\e[48;5;214m" "Tmux" true
|
||||
|
||||
_move 1 1
|
||||
|
||||
read -n 1 -s
|
||||
15
i3wm/wallpapers.sh
Executable file
15
i3wm/wallpapers.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
_LINES=$(ps -eo pid,cmd | grep wallpaper | \
|
||||
grep -v grep | grep -v $$ | awk '{print $1}' | tr '\n' ' ')
|
||||
|
||||
for i in $_LINES
|
||||
do
|
||||
kill $i
|
||||
done
|
||||
|
||||
while (( $(pgrep i3) ))
|
||||
do
|
||||
feh --randomize --bg-max /usr/local/share/wallpapers
|
||||
sleep 10
|
||||
done
|
||||
Reference in New Issue
Block a user