Initial commit with fish, i3, nvim and polybar configuration
This commit is contained in:
260
.config/i3/config
Normal file
260
.config/i3/config
Normal file
@@ -0,0 +1,260 @@
|
||||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
# font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||
new_window pixel 1
|
||||
new_float normal
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
set $terminal termite
|
||||
bindsym $mod+Return exec $terminal
|
||||
bindsym $mod+Shift+Return split v;exec $terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# start rofi (a program launcher)
|
||||
bindsym $mod+space exec --no-startup-id rofi -show run
|
||||
|
||||
focus_follows_mouse no
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# change focus (i3-vim compatibility)
|
||||
# bindsym --release $mod+h exec --no-startup-id "i3-vim-nav h"
|
||||
# bindsym --release $mod+j exec --no-startup-id "i3-vim-nav j"
|
||||
# bindsym --release $mod+k exec --no-startup-id "i3-vim-nav k"
|
||||
# bindsym --release $mod+l exec --no-startup-id "i3-vim-nav l"
|
||||
|
||||
# bindsym --release $mod+Left exec --no-startup-id "i3-vim-nav h"
|
||||
# bindsym --release $mod+Down exec --no-startup-id "i3-vim-nav j"
|
||||
# bindsym --release $mod+Up exec --no-startup-id "i3-vim-nav k"
|
||||
# bindsym --release $mod+Right exec --no-startup-id "i3-vim-nav l"
|
||||
|
||||
# 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
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split orientation
|
||||
bindsym $mod+z split h;exec notify-send 'tile horizontally'
|
||||
bindsym $mod+v split v;exec notify-send 'tile vertically'
|
||||
# bindsym $mod+q split toggle
|
||||
|
||||
# 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
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
###################################################################################################
|
||||
#################### WORKSPACES ########################
|
||||
###################################################################################################
|
||||
|
||||
# set workspace variables
|
||||
set $ws1 1
|
||||
set $ws2 2
|
||||
set $ws3 3
|
||||
set $ws4 4
|
||||
set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
set $ws9 9
|
||||
set $ws10 10
|
||||
|
||||
# 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; workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
|
||||
|
||||
# move workspaces
|
||||
bindsym $mod+Control+h move workspace to output left
|
||||
bindsym $mod+Control+Left move workspace to output left
|
||||
bindsym $mod+Control+l move workspace to output right
|
||||
bindsym $mod+Control+Right move workspace to output right
|
||||
|
||||
###################################################################################################
|
||||
#################### WALLPAPER ########################
|
||||
###################################################################################################
|
||||
|
||||
exec_always --no-startup-id ~/.config/i3/scripts/wallpapers.sh
|
||||
exec_always --no-startup-id compton
|
||||
|
||||
###################################################################################################
|
||||
#################### PROGRAMS ########################
|
||||
###################################################################################################
|
||||
|
||||
# Launch programs
|
||||
|
||||
bindsym $mod+Control+1 exec slack
|
||||
bindsym $mod+Control+3 exec firefox
|
||||
bindsym $mod+Control+0 exec spotify
|
||||
|
||||
# Assign workspaces
|
||||
assign [class="Slack"] $ws1
|
||||
assign [class="Firefox"] $ws3
|
||||
for_window [class="Spotify"] move to workspace $ws10
|
||||
|
||||
# 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
|
||||
|
||||
set $Locker i3lock -c 112233 && sleep 1
|
||||
|
||||
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
|
||||
mode "$mode_system" {
|
||||
bindsym l exec --no-startup-id $Locker, mode "default"
|
||||
bindsym e exec --no-startup-id i3-msg exit, mode "default"
|
||||
bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default"
|
||||
bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default"
|
||||
bindsym r exec --no-startup-id systemctl reboot, mode "default"
|
||||
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+End mode "$mode_system"
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# 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
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Autostart applications
|
||||
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
|
||||
exec --no-startup-id ibus-daemon -d -r
|
||||
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound
|
||||
|
||||
# Sreen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec "$HOME/.config/i3/scripts/brightness.sh + eDP-1"
|
||||
bindsym XF86MonBrightnessDown exec "$HOME/.config/i3/scripts/brightness.sh - eDP-1"
|
||||
|
||||
# Touchpad controls
|
||||
# bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
|
||||
# Tap touchpad to click
|
||||
# exec xinput set-prop 12 276 1
|
||||
|
||||
# Toggle displays
|
||||
bindsym $mod+p exec --no-startup-id ~/.config/i3/scripts/swap_monitors.sh
|
||||
|
||||
# Media player controls
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioPause exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# Keyboard layout
|
||||
bindsym $mod+Shift+i exec ~/.config/polybar/scripts/ibus_select.py
|
||||
bindsym $mod+Shift+Home exec setxkbmap -layout es -variant cat & ibus engine xkb:es:cat:cat
|
||||
|
||||
# Wifi
|
||||
bindsym $mod+Shift+w exec ~/.config/polybar/scripts/wifi_connect.py
|
||||
|
||||
# Order of screens
|
||||
exec --no-startup-id xrandr --output DP-2 --right-of eDP-1
|
||||
exec --no-startup-id xrandr --output DP-1 --right-of DP-2
|
||||
9
.config/i3/scripts/brightness.sh
Executable file
9
.config/i3/scripts/brightness.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
CURRBRIGHT=$(xrandr --current --verbose | grep -m 1 'Brightness:' | cut -f2- -d:)
|
||||
if [ "$1" = "+" ] && [ $(echo "$CURRBRIGHT < 1" | bc) -eq 1 ]
|
||||
then
|
||||
xrandr --output $2 --brightness $(echo "$CURRBRIGHT + 0.1" | bc)
|
||||
elif [ "$1" = "-" ] && [ $(echo "$CURRBRIGHT > 0" | bc) -eq 1 ]
|
||||
then
|
||||
xrandr --output $2 --brightness $(echo "$CURRBRIGHT - 0.1" | bc)
|
||||
fi
|
||||
49
.config/i3/scripts/swap_monitors.sh
Executable file
49
.config/i3/scripts/swap_monitors.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
INTERNAL_OUTPUT="eDP-1"
|
||||
|
||||
EXTERNAL_OUTPUT_1="DP-1"
|
||||
EXTERNAL_OUTPUT_2="DP-2"
|
||||
|
||||
## MONITOR CONFIGURATION
|
||||
|
||||
# .----------. .------------. .------------.
|
||||
# | | | | | |
|
||||
# | eDP-1 | | DP-2 | | DP-1 |
|
||||
# | | | | | |
|
||||
# '----------' '------------' '------------'
|
||||
# /_/_/__\_\_\ I I
|
||||
# /_/_/____\_\_\ _I_ _I_
|
||||
|
||||
|
||||
# if we don't have a file, start at zero
|
||||
if [ ! -f "/tmp/monitor_mode.dat" ] ; then
|
||||
monitor_mode="all"
|
||||
# otherwise read the value from the file
|
||||
else
|
||||
monitor_mode=`cat /tmp/monitor_mode.dat`
|
||||
fi
|
||||
|
||||
if [ $monitor_mode = "all" ]; then
|
||||
monitor_mode="INTERNAL"
|
||||
xrandr --output $INTERNAL_OUTPUT --auto
|
||||
xrandr --output $EXTERNAL_OUTPUT_1 --off
|
||||
xrandr --output $EXTERNAL_OUTPUT_2 --off
|
||||
notify-send 'External display OFF'
|
||||
# elif [ $monitor_mode = "EXTERNAL" ]; then
|
||||
# monitor_mode="INTERNAL"
|
||||
# xrandr --output $INTERNAL_OUTPUT --auto
|
||||
# xrandr --output $EXTERNAL_OUTPUT_1 --off
|
||||
# xrandr --output $EXTERNAL_OUTPUT_2 --off
|
||||
# elif [ $monitor_mode = "INTERNAL" ]; then
|
||||
# monitor_mode="CLONES"
|
||||
# xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto --same-as $INTERNAL_OUTPUT
|
||||
else
|
||||
monitor_mode="all"
|
||||
xrandr --output $INTERNAL_OUTPUT --auto
|
||||
xrandr --output $EXTERNAL_OUTPUT_1 --auto --right-of $INTERNAL_OUTPUT
|
||||
xrandr --output $EXTERNAL_OUTPUT_2 --auto --right-of $EXTERNAL_OUTPUT_1
|
||||
~/.config/polybar/launch.sh
|
||||
notify-send 'External display ON'
|
||||
fi
|
||||
|
||||
echo "${monitor_mode}" > /tmp/monitor_mode.dat
|
||||
18
.config/i3/scripts/wallpapers.sh
Executable file
18
.config/i3/scripts/wallpapers.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
script_name=${BASH_SOURCE[0]}
|
||||
for pid in $(pidof -x $script_name); do
|
||||
if [ $pid != $$ ]; then
|
||||
kill -9 $pid
|
||||
fi
|
||||
done
|
||||
|
||||
# source /home/marc/venv/marc/bin/activate
|
||||
|
||||
while true
|
||||
do
|
||||
# python /home/marc/Pictures/Pixel/render.py
|
||||
# feh --bg-center /home/marc/Pictures/Pixel/rendered.bmp
|
||||
feh --randomize --bg-fill ~/Pictures/Island/extra/*.jpg
|
||||
sleep 5m
|
||||
done
|
||||
Reference in New Issue
Block a user