From e7beffcb4ee4aa641105322a07e32f24f43a6ce8 Mon Sep 17 00:00:00 2001 From: Pim Nelissen Date: Sat, 3 Sep 2022 08:41:37 +0200 Subject: [PATCH] Added debian/i3 dotfiles --- debian/fish/config.fish | 1 + debian/fish/fish_variables | 35 + debian/fish/functions/fish_prompt.fish | 6 + debian/i3/config | 199 +++ debian/kitty/kitty.conf | 10 + debian/nvim/.netrwhist | 6 + debian/nvim/init.vim | 54 + debian/polybar/material/bars.ini | 494 ++++++++ debian/polybar/material/colors.ini | 23 + debian/polybar/material/config.ini | 292 +++++ debian/polybar/material/launch.sh | 14 + debian/polybar/material/modules.ini | 1069 +++++++++++++++++ debian/polybar/material/scripts/checkupdates | 117 ++ .../polybar/material/scripts/color-switch.sh | 55 + .../polybar/material/scripts/colors-dark.sh | 120 ++ .../polybar/material/scripts/colors-light.sh | 120 ++ debian/polybar/material/scripts/launcher.sh | 3 + debian/polybar/material/scripts/powermenu.sh | 95 ++ debian/polybar/material/scripts/pywal.sh | 87 ++ debian/polybar/material/scripts/random.sh | 96 ++ .../polybar/material/scripts/rofi/colors.rasi | 10 + .../material/scripts/rofi/confirm.rasi | 24 + .../material/scripts/rofi/launcher.rasi | 119 ++ .../material/scripts/rofi/message.rasi | 24 + .../material/scripts/rofi/networkmenu.rasi | 126 ++ .../material/scripts/rofi/powermenu.rasi | 126 ++ .../polybar/material/scripts/rofi/styles.rasi | 126 ++ debian/polybar/material/scripts/updates.sh | 45 + debian/polybar/material/user_modules.ini | 233 ++++ 29 files changed, 3729 insertions(+) create mode 100644 debian/fish/config.fish create mode 100644 debian/fish/fish_variables create mode 100644 debian/fish/functions/fish_prompt.fish create mode 100644 debian/i3/config create mode 100644 debian/kitty/kitty.conf create mode 100644 debian/nvim/.netrwhist create mode 100644 debian/nvim/init.vim create mode 100644 debian/polybar/material/bars.ini create mode 100644 debian/polybar/material/colors.ini create mode 100644 debian/polybar/material/config.ini create mode 100755 debian/polybar/material/launch.sh create mode 100644 debian/polybar/material/modules.ini create mode 100755 debian/polybar/material/scripts/checkupdates create mode 100755 debian/polybar/material/scripts/color-switch.sh create mode 100755 debian/polybar/material/scripts/colors-dark.sh create mode 100755 debian/polybar/material/scripts/colors-light.sh create mode 100755 debian/polybar/material/scripts/launcher.sh create mode 100755 debian/polybar/material/scripts/powermenu.sh create mode 100755 debian/polybar/material/scripts/pywal.sh create mode 100755 debian/polybar/material/scripts/random.sh create mode 100644 debian/polybar/material/scripts/rofi/colors.rasi create mode 100644 debian/polybar/material/scripts/rofi/confirm.rasi create mode 100644 debian/polybar/material/scripts/rofi/launcher.rasi create mode 100644 debian/polybar/material/scripts/rofi/message.rasi create mode 100644 debian/polybar/material/scripts/rofi/networkmenu.rasi create mode 100644 debian/polybar/material/scripts/rofi/powermenu.rasi create mode 100644 debian/polybar/material/scripts/rofi/styles.rasi create mode 100755 debian/polybar/material/scripts/updates.sh create mode 100644 debian/polybar/material/user_modules.ini diff --git a/debian/fish/config.fish b/debian/fish/config.fish new file mode 100644 index 0000000..37afd25 --- /dev/null +++ b/debian/fish/config.fish @@ -0,0 +1 @@ +set fish_greeting diff --git a/debian/fish/fish_variables b/debian/fish/fish_variables new file mode 100644 index 0000000..8681508 --- /dev/null +++ b/debian/fish/fish_variables @@ -0,0 +1,35 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3100 +SETUVAR _fish_abbr_apt:sudo\x20nala +SETUVAR _fish_abbr_fp:flatpak +SETUVAR _fish_abbr_nf:neofetch +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:005fd7 +SETUVAR fish_color_comment:990000 +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:009900 +SETUVAR fish_color_error:ff0000 +SETUVAR fish_color_escape:00a6b2 +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:00a6b2 +SETUVAR fish_color_param:00afff +SETUVAR fish_color_quote:999900 +SETUVAR fish_color_redirection:00afff +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:\x1d +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:\x1d +SETUVAR fish_pager_color_description:B3A06D\x1eyellow +SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/debian/fish/functions/fish_prompt.fish b/debian/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..20326a1 --- /dev/null +++ b/debian/fish/functions/fish_prompt.fish @@ -0,0 +1,6 @@ +function fish_prompt + set_color $fish_color_cwd + echo -n (basename $PWD) + set_color normal + echo -n ' » ' +end diff --git a/debian/i3/config b/debian/i3/config new file mode 100644 index 0000000..9acdce9 --- /dev/null +++ b/debian/i3/config @@ -0,0 +1,199 @@ +# 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 + +# 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 + +# Polybar +exec_always --no-startup-id $HOME/.config/polybar/material/launch.sh + +# Borders, gaps, wallpaper, picom +for_window [class="^.*"] border pixel 2 +gaps inner 12 + +exec --no-startup-id feh --bg-fill ~/Pictures/wall.jpg +exec --no-startup-id picom -b + +# 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@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $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 + +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec brightnessctl set +5% # increase screen brightness +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- # decrease screen brightness + +# Touchpad controls +bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec kitty + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec --no-startup-id ~/scripts/rofi.sh +# 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 +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 + +# 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 in horizontal orientation +bindsym $mod+g 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 + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +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 number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $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 +# 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 j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon 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 or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Polybar diff --git a/debian/kitty/kitty.conf b/debian/kitty/kitty.conf new file mode 100644 index 0000000..a09750c --- /dev/null +++ b/debian/kitty/kitty.conf @@ -0,0 +1,10 @@ +font_family Source Fantastique Mono +bold_font auto +italic_font auto +bold_italic_font auto + +font_size 13.0 + +background #1F1F1F +# vim:fileencoding=utf-8:ft=conf + diff --git a/debian/nvim/.netrwhist b/debian/nvim/.netrwhist new file mode 100644 index 0000000..edc0597 --- /dev/null +++ b/debian/nvim/.netrwhist @@ -0,0 +1,6 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =4 +let g:netrw_dirhist_4='/home/pim/.config/neofetch' +let g:netrw_dirhist_3='/home/pim/.config/fish' +let g:netrw_dirhist_2='/home/pim/.config/kitty' +let g:netrw_dirhist_1='/home/pim/.config/polybar/material' diff --git a/debian/nvim/init.vim b/debian/nvim/init.vim new file mode 100644 index 0000000..4ee4cae --- /dev/null +++ b/debian/nvim/init.vim @@ -0,0 +1,54 @@ +" ________ +" | _____ \ +" | | _/ / Pim Nelissen +" | | /__/ https://pim.wtf/ +" | | +" \_| + +" Neovim configuration file. + +" load all plugins. +call plug#begin('~/.local/share/nvim/plugged') +Plug 'vimsence/vimsence' +Plug 'lervag/vimtex' +Plug 'python-mode/python-mode' +Plug 'rust-lang/rust.vim' +Plug 'Gavinok/vim-troff' +Plug 'vim-airline/vim-airline' +Plug 'Yggdroot/indentLine' +Plug 'vim-airline/vim-airline-themes' +call plug#end() + +" configurations. +set number relativenumber +set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab +autocmd BufRead *.md set spell spelllang=en_uk +highlight LineNr ctermfg=8 + +" airline configuration. +let g:airline_theme='minimalist' +let g:airline_powerline_fonts=1 +let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#wordcount#enabled=1 + +" vimtex configuration. +let g:tex_flavor='latex' +let g:vimtex_view_method='zathura' +let g:vimtex_quickfix_mode=0 +let g:vimtex_view_general_viewer='zathura' + +" ignore some dumb PEP8 warnings. +let g:pymode_lint_ignore="E501,W" +let g:pymode_lint_ignore="E302,W" + +" Set color of PEP8 line end column to grey. +autocmd BufRead *.py hi ColorColumn ctermbg=8 + +" other plugins configuration +let g:indentLine_leadingSpaceEnabled=1 +let g:indentLine_leadingSpaceChar = '⬞' +let g:indentLine_fileTypeExclude = ['tex', 'markdown'] + +" Custom commands +" Uses F4 to find and replace every instance of the word under the cursor. +nnoremap :%s///gc$F/i diff --git a/debian/polybar/material/bars.ini b/debian/polybar/material/bars.ini new file mode 100644 index 0000000..281672b --- /dev/null +++ b/debian/polybar/material/bars.ini @@ -0,0 +1,494 @@ +;; ┌────────────────────────────────────────────────────┐ +;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│ +;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│ +;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│ +;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│ +;; └────────────────────────────────────────────────────┘ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[bar] +fill =  +empty =  +indicator =  + +[module/volume] +type = internal/alsa + +; Soundcard to be used +; Usually in the format hw:# where # is the card number +; You can find the different card numbers in `/proc/asound/cards` +master-soundcard = default +speaker-soundcard = default +headphone-soundcard = default + +; Name of the master, speaker and headphone mixers +; Use the following command to list available mixer controls: +; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" +; If master, speaker or headphone-soundcard isn't the default, +; use `amixer -c # scontrols` instead where # is the number +; of the master, speaker or headphone soundcard respectively +; +; Default: Master +master-mixer = Master + +; Optionally define speaker and headphone mixers +; Default: none +;;speaker-mixer = Speaker +; Default: none +;;headphone-mixer = Headphone + +; NOTE: This is required if headphone_mixer is defined +; Use the following command to list available device controls +; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort +; You may also need to use `amixer -c # controls` as above for the mixer names +; Default: none +;;headphone-id = 9 + +; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear +; Default: false +;;mapped = true + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +interval = 5 + +; Available tags: +; (default) +; +; +format-volume = + +; Available tags: +; (default) +; +; +format-muted = +format-muted-prefix =  + +; Available tokens: +; %percentage% (default) +label-volume = %percentage%% + +; Available tokens: +; %percentage% (default +label-muted = " Muted" +label-muted-foreground = ${color.foreground-alt} + +; Only applies if is used +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  + +; Only applies if is used +bar-volume-width = 10 +bar-volume-gradient = false + +bar-volume-indicator = ${bar.indicator} +bar-volume-indicator-foreground = ${color.foreground} + +bar-volume-fill = ${bar.fill} +bar-volume-foreground-0 = ${color.foreground} +bar-volume-foreground-1 = ${color.foreground} +bar-volume-foreground-2 = ${color.foreground} + +bar-volume-empty = ${bar.empty} +bar-volume-empty-foreground = ${color.foreground} + +; If defined, it will replace when +; headphones are plugged in to `headphone_control_numid` +; If undefined, will be used for both +; Only applies if is used +ramp-headphones-0 =  + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/brightness] +;type = internal/xbacklight +type = internal/backlight + +; Use the following command to list available cards: +; $ ls -1 /sys/class/backlight/ +;card = intel_backlight +card = amdgpu_bl0 + +; Available tags: +;