commit 0c743950ac814a4c4a86d4a951fd1a686e98e815 Author: druckdev <63563978+druckdev@users.noreply.github.com> Date: Thu Apr 23 14:50:36 2020 +0200 Initial commit diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..db23c29 --- /dev/null +++ b/.Xresources @@ -0,0 +1,3 @@ +Xft.dpi: 150 +*.font: Liberation Mono:pixelsize=20:antialias=true:autohint=true; +*.alpha: 0.77 diff --git a/.config/dircolors/dircolors b/.config/dircolors/dircolors new file mode 100644 index 0000000..596fbb9 --- /dev/null +++ b/.config/dircolors/dircolors @@ -0,0 +1,146 @@ +# This file is based on the standard dircolors but with bright colors when using bold font + +TERM xterm* + +# NORMAL 00 +# FILE 00 +RESET 0 +DIR 01;94 +LINK 01;96 +MULTIHARDLINK 01;96 +FIFO 40;33 +SOCK 01;95 +DOOR 01;95 +BLK 40;33;01 # block device driver +CHR 40;33;01 # character device driver +ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ... +MISSING 00 # ... and the files they point to +SETUID 37;41 +SETGID 30;43 +CAPABILITY 30;41 +STICKY_OTHER_WRITABLE 30;42 +OTHER_WRITABLE 34;42 +STICKY 37;44 +EXEC 01;92 + +## Archives +*.tar 01;91 +*.tgz 01;91 +*.arc 01;91 +*.arj 01;91 +*.taz 01;91 +*.lha 01;91 +*.lz4 01;91 +*.lzh 01;91 +*.lzma 01;91 +*.tlz 01;91 +*.txz 01;91 +*.tzo 01;91 +*.t7z 01;91 +*.zip 01;91 +*.z 01;91 +*.Z 01;91 +*.dz 01;91 +*.gz 01;91 +*.lrz 01;91 +*.lz 01;91 +*.lzo 01;91 +*.xz 01;91 +*.zst 01;91 +*.tzst 01;91 +*.bz2 01;91 +*.bz 01;91 +*.tbz 01;91 +*.tbz2 01;91 +*.tz 01;91 +*.deb 01;91 +*.rpm 01;91 +*.jar 01;91 +*.war 01;91 +*.ear 01;91 +*.sar 01;91 +*.rar 01;91 +*.alz 01;91 +*.ace 01;91 +*.zoo 01;91 +*.cpio 01;91 +*.7z 01;91 +*.rz 01;91 +*.cab 01;91 +*.wim 01;91 +*.swm 01;91 +*.dwm 01;91 +*.esd 01;91 + +## Images +*.jpg 01;95 +*.jpeg 01;95 +*.mjpg 01;95 +*.mjpeg 01;95 +*.gif 01;95 +*.bmp 01;95 +*.pbm 01;95 +*.pgm 01;95 +*.ppm 01;95 +*.tga 01;95 +*.xbm 01;95 +*.xpm 01;95 +*.tif 01;95 +*.tiff 01;95 +*.png 01;95 +*.svg 01;95 +*.svgz 01;95 +*.mng 01;95 +*.pcx 01;95 + + ## Videos +*.mov 01;95 +*.mpg 01;95 +*.mpeg 01;95 +*.m2v 01;95 +*.mkv 01;95 +*.webm 01;95 +*.ogm 01;95 +*.mp4 01;95 +*.m4v 01;95 +*.mp4v 01;95 +*.vob 01;95 +*.qt 01;95 +*.nuv 01;95 +*.wmv 01;95 +*.asf 01;95 +*.rm 01;95 +*.rmvb 01;95 +*.flc 01;95 +*.avi 01;95 +*.fli 01;95 +*.flv 01;95 +*.gl 01;95 +*.dl 01;95 +*.xcf 01;95 +*.xwd 01;95 +*.yuv 01;95 +*.cgm 01;95 +*.emf 01;95 + +## Audio +*.aac 00;36 +*.au 00;36 +*.flac 00;36 +*.m4a 00;36 +*.mid 00;36 +*.midi 00;36 +*.mka 00;36 +*.mp3 00;36 +*.mpc 00;36 +*.ogg 00;36 +*.ra 00;36 +*.wav 00;36 + +## https://wiki.xiph.org/MIME_Types_and_File_Extensions +*.ogv 01;95 +*.ogx 01;95 +*.oga 00;36 +*.opus 00;36 +*.spx 00;36 +*.xspf 00;36 diff --git a/.config/git/config b/.config/git/config new file mode 100644 index 0000000..ab9efd0 --- /dev/null +++ b/.config/git/config @@ -0,0 +1,15 @@ +[include] + path = gitlab.config +[includeIf "gitdir:~/Projects/dotfiles-github/"] + path = github.config +[commit] + gpgsign = true +[difftool "meld"] + path = /usr/bin/meld +[submodule] + recurse = true +[color "status"] + added = 076 + untracked = 014 +[core] + pager = diff-so-fancy | less --tabs=4 -RFX diff --git a/.config/i3/airplane-mode-notify.sh b/.config/i3/airplane-mode-notify.sh new file mode 100755 index 0000000..5d178cc --- /dev/null +++ b/.config/i3/airplane-mode-notify.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$(rfkill -o SOFT --noheadings list wlan)" = "blocked" ]; then + notify-send "Airplane mode toggled" "On" +else + notify-send "Airplane mode toggled" "Off" +fi + diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..4295248 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,243 @@ +# 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 10 + +# 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. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +# set $TERMINAL kitty +# bindsym $mod+Return exec i3-sensible-terminal +# bindsym $mod+Return exec kitty +bindsym $mod+Return exec gnome-terminal --hide-menubar + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +bindsym $mod+Shift+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 rofi -show drun + +# change focus +focus_wrapping no +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +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 in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# 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 + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 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 + +# move focused container and switch to workspace +bindsym Mod1+Shift+1 move container to workspace 1; workspace 1 +bindsym Mod1+Shift+2 move container to workspace 2; workspace 2 +bindsym Mod1+Shift+3 move container to workspace 3; workspace 3 +bindsym Mod1+Shift+4 move container to workspace 4; workspace 4 +bindsym Mod1+Shift+5 move container to workspace 5; workspace 5 +bindsym Mod1+Shift+6 move container to workspace 6; workspace 6 +bindsym Mod1+Shift+7 move container to workspace 7; workspace 7 +bindsym Mod1+Shift+8 move container to workspace 8; workspace 8 +bindsym Mod1+Shift+9 move container to workspace 9; workspace 9 +bindsym Mod1+Shift+0 move container to workspace 10; 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'" + +# 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 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 + + # Set window size to predefined values + # firefox anti fingerprinting + bindsym p resize set 1920 1080 + # scratchpad default size + bindsym s resize set 1600 900 + # "fullscreen" + bindsym f resize set 3200 1770 + + # Move window to center + bindsym c move position center + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Caps_Lock mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +# bar { +# status_command i3blocks +# position top +# } +exec_always --no-startup-id ~/.config/polybar/launch.sh & + +# Touchpad configuration +set $touchpad DLL082A:01 06CB:76AF Touchpad +exec xinput set-prop "$touchpad" "libinput Tapping Enabled" 1 +exec xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1 +exec xinput set-prop "$touchpad" "libinput Accel Speed" 0.45 + +# Brightness controls (/etc/X11/xorg.conf necessary) +bindsym XF86MonBrightnessDown exec xbacklight -dec 10 +bindsym XF86MonBrightnessUp exec xbacklight -inc 10 + +# Volume controls (see https://faq.i3wm.org/question/125/how-to-change-the-systems-volume.1.html) +# Note: just add unmute add the end of the amixer command if the volume keys should unmute +bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q -D pulse sset Master 5%+ +bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q -D pulse sset Master 5%- +bindsym XF86AudioMute exec --no-startup-id amixer -q -D pulse sset Master toggle-mute +# volume at startup +exec amixer -q -D pulse sset Master mute + +default_border pixel 1 +hide_edge_borders smart + +# Power +bindsym $mod+l exec xset s activate +bindsym $mod+p exec ~/.config/rofi/powermenu.sh & +exec --no-startup-id xss-lock -l ~/.config/xsecurelock/transfer-sleep-lock.sh & + +# Wallpaper +exec feh --bg-scale --no-fehbg ~/Pictures/Wallpapers/tractor-blur.png + +# Notify when toggling airplane mode +bindsym XF86RFKill exec --no-startup-id ~/.config/i3/airplane-mode-notify.sh + +# compositor for transparency +exec --no-startup-id compton -b + +# scratchpad-terminal +for_window [class="Gnome-terminal" title="^scratchpad-terminal$"] \ + move scratchpad, \ + sticky enable, \ + scratchpad show, \ + resize set 1600 900, \ + border none, \ + move position center +# show scratchpad-terminal or create one if none exists +bindsym $mod+comma exec ~/.config/i3/scratchpad-terminal.sh -s +# hide scratchpad-terminal indepedent of where the focus sits +bindsym $mod+Shift+comma exec ~/.config/i3/scratchpad-terminal.sh -h + +bindsym $mod+Shift+m move scratchpad +bindsym $mod+Shift+s [class="^Spotify$"] scratchpad show +bindsym $mod+Shift+t [class="^TelegramDesktop$"] scratchpad show + +# screenshots +bindsym --release Print exec gnome-screenshot -i +bindsym --release $mod+Print exec gnome-screenshot -a + +# keyboard layout (de layout without dead keys and switched ESC and CAPS_LOCK) +exec setxkbmap own + +# Restore GNOME's settings +exec --no-startup-id /usr/libexec/gnome-settings-daemon-localeexec + +# Fix a bug in gnome-settings-daemon: http://feeding.cloud.geek.nz/posts/creating-a-modern-tiling-desktop-environment-using-i3/ +exec --no-startup-id dconf write /org/gnome/settings-daemon/plugins/cursor/active false + +# Launch gnome-keyring +exec --no-startup-id gnome-keyring-daemon + +# Focus should not follow mouse +# This is sometimes usefull when picking colors on the screen in combination with deactivated dim +# focus_follows_mouse no diff --git a/.config/i3/scratchpad-terminal.sh b/.config/i3/scratchpad-terminal.sh new file mode 100755 index 0000000..df387c9 --- /dev/null +++ b/.config/i3/scratchpad-terminal.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +exec >/dev/null + +CLASS="Gnome-terminal" +NAME="scratchpad-terminal" + +while getopts "hn:s" FLAGS; do + case "$FLAGS" in + h) HIDE=1;; + n) NAME="$OPTARG";; + s) SHOW=1;; + *) exit 1;; + esac +done +shift $(($OPTIND - 1 )) + +TREE="$(i3-msg -t get_tree)" +if ! (echo "$TREE" | grep -Po "\"name\":\"${NAME}\".*?floating\":\"[^\"]*\"" \ + | grep -q '"floating":"user_on"') +then + EXIST_NOT=1 +elif (echo "$TREE" | grep -Po '"focused":true.*?name":"[^"]*"' \ + | grep -q "\"name\":\"${NAME}\"") +then + FOCUS_ON_PAD=1 +elif [ ! $EXIST_NOT ] && (echo "$TREE" | grep -Po '"output":"__i3".*?"name":"[^"]*"' \ + | grep -q "\"name\":\"${NAME}\"") +then + HIDDEN=1 +fi + +if [ $HIDE ] && [ ! $EXIST_NOT ] && [ ! $HIDDEN ]; then + # There is a visible scratchpad-terminal that shall be hidden + i3-msg "[class=\"$CLASS\" title=\"^${NAME}$\"] scratchpad show" + exit 0 +fi + +if [ $SHOW ]; then + if [ $EXIST_NOT ]; then + # terminal does not exist yet + gnome-terminal --window-with-profile="$NAME" --hide-menubar + elif [ $HIDDEN ]; then + # terminal is "hidden" in scratchpad + i3-msg "[class=\"$CLASS\" title=\"^${NAME}$\"] scratchpad show" + elif [ ! $FOCUS_ON_PAD ]; then + # terminal is visible but focus lays somewhere else + i3-msg "[class=\"$CLASS\" title=\"^${NAME}$\"] scratchpad show, scratchpad show" + fi + exit 0 +fi diff --git a/.config/polybar/config b/.config/polybar/config new file mode 100644 index 0000000..2aa999f --- /dev/null +++ b/.config/polybar/config @@ -0,0 +1,159 @@ +; vi: ft=dosini + +[colors] +background = #202020 +background-alt = #444 +foreground = #fff +foreground-alt = #fff +primary = #fff +secondary = #fff +alert = #f00 + +[bar/main] +monitor = eDP1 +bottom = false +fixed-center = true +width = 100% +height = 32 +padding-left = 1 +padding-right = 1 +module-margin-left = 1 +module-margin-right = 2 + +modules-left = i3 pulseaudio xbacklight +modules-center = datetime +modules-right = battery-custom vpn wlan powermenu + +tray-position = right +tray-detached = false +tray-scale = 1.0 + +font-0 = MesloLGS NF:style=Regular:size=18;4 +; used for the colume ramp +font-1 = MesloLGS NF:style=Regular:size=10;2 +; used for the dots in module/powermenu +font-2 = MesloLGS NF:size=18;-2 +; used for small space in scripts/battery.sh +font-3 = MesloLGS NF:size=8 +background = ${colors.background} +foreground = ${colors.foreground} +line-size = 3 +line-color = ${colors.primary} + +;################################################# + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 1 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = ${self.label-focused-padding} + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-underline = ${colors.secondary} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${colors.alert} +label-urgent-padding = ${self.label-focused-padding} + +;################################################# + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume = +label-volume = VOL: %percentage%% +label-muted = VOL: muted +bar-volume-width = 10 +bar-volume-empty = - +bar-volume-fill = - +bar-volume-indicator = | + +;format-volume = +;format-volume-font = 2 +;label-muted = muted +; +;ramp-volume-0 =   +;ramp-volume-1 = █  +;ramp-volume-2 = ██  +;ramp-volume-3 = ███  +;ramp-volume-4 = ████  +;ramp-volume-5 = █████  +;ramp-volume-6 = ██████  +;ramp-volume-7 = ███████  +;ramp-volume-8 = ████████  +;ramp-volume-9 = █████████  +;ramp-volume-10 = ██████████ + +;################################################# + +[module/xbacklight] +type = internal/xbacklight +format =