From 8180cf38e6198fce5cd30d84f633bc154191829f Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 4 Oct 2018 08:42:00 +0200 Subject: Refactored stuff --- config | 374 +++++++++++++++++++---------------------------------------------- i3lock | 7 ++ 2 files changed, 115 insertions(+), 266 deletions(-) create mode 100755 i3lock diff --git a/config b/config index 2522a5f..bc8dd3f 100644 --- a/config +++ b/config @@ -1,68 +1,48 @@ -# 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 http://i3wm.org/docs/userguide.html for a complete reference! +# load xrdb +exec xrdb ~/.Xresources ; i3-msg reload + +# force_xinerama yes # fake-outputs 3840x1080+0+0 -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 12 - -# 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:Neris SemiBold 10 -# font pango:Source Code Pro SemiBold 9 -# font pango:Liberation Sans Mono Bold 11 -# font pango:DejaVu Sans Bold 9 -# font pango:Roboto Nerd Font Bold 8 -# font pango:FuraCode Nerd Font Mono Retina 9 -# font pango:Monoid Nerd Font Mono Retina 9 -# font pango:Hasklug Nerd Font 9 -# font pango:Roboto Nerd Font Bold 8 -# font pango:3270Narrow Nerd Font 10 -# font pango:mplus nerd font 9 -# font pango:dejavu sans nerd font 9 -# font pango:Anonymice Nerd Font 9 -#font pango:Inconsolata Nerd Font 9 -font pango:Code New Roman Nerd Font 9 -# font pango:ProFont IIx Nerd Font 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. +# we basically want to configure our font with ~/.config/fontconfig/* +font pango:FuraCode Nerd Font Mono Retina 9 +# font pango:Code New Roman Nerd Font 9 + +hide_edge_borders both + +set $mod Mod4 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod -# force_xinerama yes # start a terminal -# bindsym $mod+Return exec i3-sensible-terminal -bindsym $mod+Return exec --no-startup-id xfce4-appfinder -bindsym Mod1+F2 exec --no-startup-id rofi -show run -bg #222222 -fg #888888 -hlbg #285577 -hlfg #ffffff -bindsym $mod+t exec --no-startup-id xfce4-terminal -# bindsym $mod+t exec termite -# bindsym $mod+t exec urxvt -bindsym $mod+e exec --no-startup-id thunar -bindsym $mod+l exec --no-startup-id ~/.local/bin/i3lock -f -i "/home/max/.local/share/backgrounds/IMG_5656 - IMG_5684-02.png" -bindsym $mod+F10 exec pactl set-sink-mute 0 toggle -bindsym $mod+F11 exec pactl set-sink-volume 0 -5% -bindsym $mod+F12 exec pactl set-sink-volume 0 +5% +# bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec --no-startup-id xfce4-appfinder +bindsym Mod1+F2 exec --no-startup-id rofi -show run -bg #222222 -fg #888888 -hlbg #285577 -hlfg #ffffff +bindsym $mod+t exec --no-startup-id xfce4-terminal +# bindsym $mod+t exec termite +# bindsym $mod+t exec urxvt +bindsym $mod+e exec --no-startup-id thunar +bindsym $mod+l exec --no-startup-id ~/.local/bin/i3lock -f -i "/home/max/.local/share/backgrounds/IMG_5656 - IMG_5684-02.png" + +bindsym $mod+F10 exec pactl set-sink-mute 0 toggle +bindsym $mod+F11 exec pactl set-sink-volume 0 -5% +bindsym $mod+F12 exec pactl set-sink-volume 0 +5% + +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5% # increase sound volume +bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5% # decrease sound volume +bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle # mute sound + +bindcode 156 exec xrandr --output LVDS-1 --mode 1024x768 && xrandr --output LVDS-1 --mode 1280x800 # kill focused window -bindsym $mod+Shift+q kill -bindsym Mod1+F4 kill +bindsym $mod+Shift+q kill +bindsym Mod1+F4 kill # start dmenu (a program launcher) # bindsym $mod+d exec dmenu_run @@ -73,25 +53,22 @@ bindsym $mod+d exec --no-startup-id i3-dmenu-desktop # bindsym $mod+d exec --no-startup-id j4-dmenu-desktop +bindsym $mod+Prior focus parent +bindsym $mod+Next focus child +bindsym $mod+Left [workspace="__focused__"] focus left +bindsym $mod+Right [workspace="__focused__"] focus right +bindsym $mod+Down [workspace="__focused__"] focus down +bindsym $mod+Up [workspace="__focused__"] focus up +bindsym $mod+Tab focus output right +bindsym $mod+Shift+Tab focus output left +bindsym mod1+Tab focus right +bindsym mod1+Shift+Tab focus left # alternatively, you can use the cursor keys: -# exec pkill -SIGRTMIN+11 i3blocks -bindsym $mod+Left focus left -bindsym $mod+Right focus right -bindsym $mod+Down focus down -bindsym $mod+Up focus up - -bindsym $mod+Tab focus output right -bindsym $mod+Shift+Tab focus output left -bindsym mod1+Tab focus right -bindsym mod1+Shift+Tab focus left - - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left ; exec pkill -SIGRTMIN+11 i3blocks -bindsym $mod+Shift+Down move down ; exec pkill -SIGRTMIN+11 i3blocks -bindsym $mod+Shift+Up move up ; exec pkill -SIGRTMIN+11 i3blocks -bindsym $mod+Shift+Right move right ; exec pkill -SIGRTMIN+11 i3blocks +bindsym $mod+Shift+Left move left ; exec pkill -SIGRTMIN+11 i3blocks +bindsym $mod+Shift+Down move down ; exec pkill -SIGRTMIN+11 i3blocks +bindsym $mod+Shift+Up move up ; exec pkill -SIGRTMIN+11 i3blocks +bindsym $mod+Shift+Right move right ; exec pkill -SIGRTMIN+11 i3blocks # split in horizontal orientation # bindsym $mod+h split h @@ -136,6 +113,7 @@ set $WS8 8:❽ set $WS9 9:❾ set $WS10 10:⓿ +assign [class="^Thunderbird$"] → $WS10 # switch to workspace bindsym Mod4+1 workspace $WS1 @@ -161,36 +139,6 @@ bindsym Mod4+Shift+8 move container to workspace $WS8 bindsym Mod4+Shift+9 move container to workspace $WS9 bindsym Mod4+Shift+0 move container to workspace $WS10 - -# # switch to workspace -# bindsym $mod+1 workspace number 1 -# bindsym $mod+2 workspace number 2 -# bindsym $mod+3 workspace number 3 -# bindsym $mod+4 workspace number 4 -# bindsym $mod+5 workspace number 5 -# bindsym $mod+6 workspace number 6 -# bindsym $mod+7 workspace number 7 -# bindsym $mod+8 workspace number 8 -# bindsym $mod+9 workspace number 9 -# bindsym $mod+0 workspace number 0 -# # -# # # move focused container to workspace -# bindsym $mod+Shift+1 move container to workspace number 1 -# bindsym $mod+Shift+2 move container to workspace number 2 -# bindsym $mod+Shift+3 move container to workspace number 3 -# bindsym $mod+Shift+4 move container to workspace number 4 -# bindsym $mod+Shift+5 move container to workspace number 5 -# bindsym $mod+Shift+6 move container to workspace number 6 -# bindsym $mod+Shift+7 move container to workspace number 7 -# bindsym $mod+Shift+8 move container to workspace number 8 -# bindsym $mod+Shift+9 move container to workspace number 9 -# bindsym $mod+Shift+0 move container to workspace number 0 - - # Pulse Audio controls -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound - workspace 1 output DP-1 workspace 2 output DP-1 workspace 3 output DP-1 @@ -202,7 +150,6 @@ workspace 8 output HDMI-1 workspace "music" output HDMI-1 workspace "background" output HDMI-1 - # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) @@ -214,96 +161,12 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu bindsym $mod+m move scratchpad bindsym $mod+Shift+m scratchpad show ; resize set 1920 920 ; move position center -# for_window [class="^.*"] border normal 3 -# for_window [title="^.*Thunderbird"] border pixel 0 -# for_window [title="^.*Chromium"] border pixel 0 -# for_window [class="Gvim"] border pixel 0 -# for_window [class="(?i)xfce4-terminal"] border pixel 0 -# for_window [class="(?i)xfce4-appfinder"] border pixel 0 -# # for_window [title="^.*\|"] border pixel 4 -# for_window [title="^HexChat.*"] border pixel 0 -# for_window [title="^.*"] exec pkill -SIGRTMIN+11 i3blocks -# for_window [title="^.*"] exec pkill -SIGRTMIN+11 i3blocks -# for_window [title="cairo-dock"] floating enable ; border none -# for_window[class="Plank"] floating enable,move absolute center - -# for_window [class=".*"] title_format "┋ %title" - -# for_window [con_id="__focused__"] title_format "%title" -hide_edge_borders both -# smart_borders on -# gaps inner 5 -# gaps outer 5 - -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 --config ~/.config/i3/i3status.conf -# # status_command i3blocks -# colors { -# # background #2a3448 -# # statusline #ffffff -# background #ffffff -# statusline #6060af -# focused_workspace #6060af #ffffff #6060af -# active_workspace #6060af #ffffff #888888 -# inactive_workspace #ffffff #ffffff #888888 -# urgent_workspace #2f343a #900000 #ffffff -# binding_mode #2f343a #900000 #ffffff -# } -# # tray_output VGA1 -# # output HDMI1 -# # tray_output HDMI1 -# tray_padding 2 -# #font pango:DejaVu Sans Mono 11 -# #font pango:DejaVu Sans Mono 11 -# #font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -# # font pango:DejaVu Sans Mono, Icons 8 -# # font pango:DejaVu Sans Mono, Awesome 8 -# # separator_symbol "┋" -# separator_symbol "│" -# position bottom -# # output VGA1 -# binding_mode_indicator yes -# # strip_workspace_numbers yes -# } - - -# client.focused #ffffff #061229 #ffffff #5299BF #ffffff -# client.unfocused #000000 #061229 #ffffff #ff0000 #000000 -#colors: border backgr. text indicator - -client.focused #ffffff #000000 #ffffff #ffff00 -client.focused_inactive #ffffff #000000 #888888 #ffff00 -client.unfocused #ffffff #000000 #444444 #ffff00 -client.urgent #2a3448 #900000 #5299bf #ffff00 -client.background #000000 #000000 #0000ff #ffff00 bindsym $mod+F2 exec i3-input -F 'rename workspace to "%s"' -P 'New name: ' bindsym Control+Mod1+Left workspace prev_on_output bindsym Control+Mod1+Right workspace next_on_output -# change focus -# bindsym $mod+j focus left -# bindsym $mod+k focus down -# bindsym $mod+l focus up -# bindsym $mod+semicolon focus right -# -# move focused window -# bindsym $mod+Shift+j move left -# bindsym $mod+Shift+k move down -# bindsym $mod+Shift+l move up -# bindsym $mod+Shift+semicolon move right - -# change focus -# bindsym $mod+h focus left ; exec killall -USR1 i3status -# bindsym $mod+j focus down ; exec killall -USR1 i3status -# bindsym $mod+k focus up ; exec killall -USR1 i3status -# bindsym $mod+l focus right ; exec killall -USR1 i3status - # move focused window bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down @@ -319,79 +182,55 @@ bindsym $mod+v split toggle bindsym $mod+space split toggle + +bindsym $mod+r mode "resize" # 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 $mod+h resize shrink width 4 px or 4 ppt - bindsym $mod+j resize grow height 4 px or 4 ppt - bindsym $mod+k resize shrink height 4 px or 4 ppt - bindsym $mod+l resize grow width 4 px or 4 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 4 px or 4 ppt - bindsym Up resize grow height 4 px or 4 ppt - bindsym Down resize shrink height 4 px or 4 ppt - bindsym Right resize grow width 4 px or 4 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" + # 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 $mod+h resize shrink width 4 px or 4 ppt + bindsym $mod+j resize grow height 4 px or 4 ppt + bindsym $mod+k resize shrink height 4 px or 4 ppt + bindsym $mod+l resize grow width 4 px or 4 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 4 px or 4 ppt + bindsym Up resize grow height 4 px or 4 ppt + bindsym Down resize shrink height 4 px or 4 ppt + bindsym Right resize grow width 4 px or 4 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" } -assign [class="^Thunderbird$"] → background - - - -# exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon -exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=secrets -exec dbus-launch gnome-settings-daemon -exec dbus-launch nm-applet - -# exec xrandr --output HDMI1 --fb 3270x1080 --scale 1.05468x1.05468 -# exec xrandr --output HDMI1 --fb 3270x1080 --right-of VGA1 --panning 1350x1080+1920+0 --scale 1.05468x1.05468 exec xrandr --output HDMI-1 --right-of DP-1 -# exec /usr/bin/xrandr-reset.sh - -# start compositor... -exec --no-startup-id dbus-launch nitrogen --restore -exec --no-startup-id dbus-launch compton -b --config ~/.config/i3/compton.conf -exec --no-startup-id dbus-launch setsid udiskie -2 -s -exec --no-startup-id dbus-launch setsid pidgin -# exec --no-startup-id dbus-launch setsid hexchat -# exec --no-startup-id dbus-launch nextcloud -# exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon -exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=secrets - -# exec xrandr --output HDMI1 --fb 3270x1080 --scale 1.05468x1.05468 -# exec xrandr --output HDMI1 --fb 3270x1080 --right-of VGA1 --panning 1350x1080+1920+0 --scale 1.05468x1.05468 -# exec xrandr --output DVI-D-1-0 --right-of VGA-1 -# exec xrandr --output DVI-D-1-0 --auto --right-of VGA-1 -# exec /usr/bin/xrandr-reset.sh -# exec xrandr --auto --output HDMI-1-1 --right-of DVI-I-2 exec xrandr --output HDMI-1 --right-of VGA-1 +# exec /usr/bin/xrandr-reset.sh +exec setxkbmap -option caps:escape +exec xset r rate 330 40 +exec xinput --set-prop 'Xornet gaming mouse' 'libinput Accel Speed' 0.1 +exec gnome-keyring-daemon --start --components=secrets # start compositor... -exec nitrogen --restore exec compton -b --config ~/.config/i3/compton.conf -# exec dbus-launch setsid udiskie -2 -s -exec setsid hexchat --minimize=2 +exec nitrogen --restore +exec nm-applet + -exec setxkbmap -option caps:escape -exec xset r rate 330 40 -exec xinput --set-prop 'Xornet gaming mouse' 'libinput Accel Speed' 0.1 +exec setsid dbus-launch hexchat --minimize=2 # ============================================== @@ -399,9 +238,6 @@ exec xinput --set-prop 'Xornet gaming mouse' 'libinput Accel Speed' 0.1 # with default values from base16-tomorrow-night # ============================================== -# load xrdb -exec xrdb ~/.Xresources - # main variables variable Xressource default set_from_resource $base00 base16.color0 #1d1f21 set_from_resource $base01 base16.color10 #282a2e @@ -420,15 +256,14 @@ set_from_resource $base0D base16.color4 #81a2be set_from_resource $base0E base16.color5 #b294bb set_from_resource $base0F base16.color14 #a3685a # derived vars... variable Xressource default -set_from_resource $background base16.background $base00 -set_from_resource $foreground base16.foreground $base05 -set_from_resource $foreground base16.cursor $base05 +set_from_resource $background base16.background $background +set_from_resource $foreground base16.color13 $base05 +set_from_resource $foreground base16.cursor $cursorColor +# set_from_resource $foreground base16.cursor $base05 # Basic bar configuration using the Base16 variables. bar { - # status_command i3status # status_command i3status --config ~/.config/i3/i3status.conf - # status_command conky -c ~/.config/i3/conki3rc status_command /home/max/src/i3status/i3status --config ~/.config/i3/i3status.conf tray_padding 2 @@ -437,35 +272,42 @@ bar { separator_symbol "│" colors { - background $background - separator $base01 - statusline $base04 - - # Border Bg Text - # focused_workspace $base05 $base0D $base00 - # active_workspace $base05 $base03 $base00 - # inactive_workspace $base03 $base01 $base05 - # urgent_workspace $base08 $base08 $base00 - # binding_mode $base00 $base0A $base00 + background $base00 + separator $base05 + statusline $base05 focused_workspace $background $background $base05 active_workspace $background $background $base05 inactive_workspace $background $background $base03 urgent_workspace $background $background $base08 binding_mode $background $background $base00 - } +} } # Basic color configuration using the Base16 variables for windows and borders. -# Property Name Border BG Text Indicator Child Border -client.focused $base05 $base0D $base00 $base0D $base0D -client.focused_inactive $base01 $base01 $base05 $base03 $base01 -client.unfocused $base01 $base00 $base05 $base01 $base01 -client.urgent $base08 $base08 $base00 $base08 $base08 -client.placeholder $base00 $base00 $base05 $base00 $base00 -client.background $base07 +# Property Name Border BG Text Indicator Child Border +client.focused $base05 $base0D $base00 $base0D $base0D +client.focused_inactive $base01 $base01 $base05 $base03 $base01 +client.unfocused $base01 $base00 $base05 $base01 $base01 +client.urgent $base08 $base08 $base00 $base08 $base08 +client.placeholder $base00 $base00 $base05 $base00 $base00 +client.background $background +# for_window [class="^.*"] border normal 3 +# for_window [title="^.*Thunderbird"] border pixel 0 +# for_window [title="^.*Chromium"] border pixel 0 +# for_window [class="Gvim"] border pixel 0 +# for_window [class="(?i)xfce4-terminal"] border pixel 0 +# for_window [class="(?i)xfce4-appfinder"] border pixel 0 +# # for_window [title="^.*\|"] border pixel 4 +# for_window [title="^HexChat.*"] border pixel 0 +# for_window [title="^.*"] exec pkill -SIGRTMIN+11 i3blocks +# for_window [title="^.*"] exec pkill -SIGRTMIN+11 i3blocks +# for_window [title="cairo-dock"] floating enable ; border none +# for_window[class="Plank"] floating enable,move absolute center +# for_window [class=".*"] title_format "┋ %title" +# for_window [con_id="__focused__"] title_format "%title" -# vim: iskeyword+=\$,\-,\# nospell +# vim: iskeyword+=\$,\-,\# nospell ft=tcl diff --git a/i3lock b/i3lock new file mode 100755 index 0000000..c0058ec --- /dev/null +++ b/i3lock @@ -0,0 +1,7 @@ +xwd -root | convert xwd:- -filter Gaussian -thumbnail 20% -sample 500% \ + \( -background none -density 250x250 /usr/share/icons/ContrastHigh/scalable/actions/system-lock-screen.svg -gravity center -geometry -960 \) -compose over -composite /tmp/i3lock.png + +/usr/bin/i3lock -f -i /tmp/i3lock.png + +# sleep 1 +xset dpms force off -- cgit v1.2.3