Browse Source

small configs update

master
arnaucube 1 year ago
parent
commit
e351920abc
4 changed files with 51 additions and 41 deletions
  1. +4
    -0
      .sh_alias
  2. +7
    -0
      .vimrc
  3. +33
    -41
      i3/config
  4. +7
    -0
      init.vim

+ 4
- 0
.sh_alias

@ -22,3 +22,7 @@ alias gdf='git difftool --tool=vimdiff'
alias gs='git status'
# gitg branch views, line from https://gitlab.com/dhole/dot_files/blob/master/.bash_aliases#L39
alias gitg="git log --color --graph --abbrev-commit --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%ar)%C(cyan) %an<%ae>%Creset'"
alias python=python3
alias cat='bat --theme="Monokai Extended" --style=plain'

+ 7
- 0
.vimrc

@ -1,5 +1,12 @@
source ~/vimconfigbase.vim
" Automate plug.vim installation:
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin(expand('~/.vim/plugged'))
nnoremap <Space> <nop>

+ 33
- 41
i3/config

@ -7,7 +7,7 @@
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
@ -19,29 +19,46 @@ font pango:monospace 8
# 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.
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# 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
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
# bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec xfce4-terminal
# bindsym $mod+Return exec xfce4-terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+h focus left
@ -117,12 +134,7 @@ bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# 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+e 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'"
bindsym $mod+Control+l exec i3lock -i ~/Sync/wallpapers/geometry02_croped1920x1080_pixelized.png -c 000000
bindsym $mod+Control+d exec poweroff
@ -153,38 +165,18 @@ mode "resize" {
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume `pacmd list-sinks | grep -Po '(?<=\* index: ).'` +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume `pacmd list-sinks | grep -Po '(?<=\* index: ).'` -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute `pacmd list-sinks | grep -Po '(?<=\* index: ).'` toggle #mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
exec redshift-gtk
# having installed feh (sudo apt install feh)
exec feh --bg-fill ~/Sync/wallpapers/geometry02_croped1920x1080.png
exec xmodmap .Xmodmap
# move current workspace to another display
bindsym $mod+Control+k move workspace to output HDMI-2
bindsym $mod+Control+k move workspace to output HDMI-1
# bindsym $mod+Control+k move workspace to output DP-1
bindsym $mod+Control+j move workspace to output eDP-1
bindsym $mod+Control+1 exec xrandr && xrandr --auto
bindsym $mod+Control+2 exec xrandr --auto && xrandr --output HDMI-2 --above eDP-1
# keyboard language layout
bindsym $mod+Control+0 exec sh ~/bin/keyboard-layout.sh

+ 7
- 0
init.vim

@ -1,5 +1,12 @@
source ~/vimconfigbase.vim
" Automate plug.vim installation:
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin(expand('~/.config/nvim/plugged'))
nnoremap <Space> <nop>

Loading…
Cancel
Save