From 610fdaae2d1fcd895c4d4646229811251716f9ea Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Tue, 19 Jan 2021 04:00:22 +0100 Subject: [PATCH] updates --- fish/config.fish | 8 ++- fish/ll.fish | 3 ++ hjalmar-droneship/i3/config | 82 +++++++----------------------- hjalmar-droneship/i3status/config | 6 +-- hjalmar-mothership/i3/config | 75 +++++---------------------- hjalmar-mothership/i3status/config | 10 ++-- manjaro.md | 9 ++-- mimeapps.list | 31 +++++++++++ root/.gitconfig | 1 - 9 files changed, 84 insertions(+), 141 deletions(-) create mode 100644 fish/ll.fish create mode 100644 mimeapps.list diff --git a/fish/config.fish b/fish/config.fish index e33db2f..38482f3 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -1,5 +1,3 @@ -thefuck --alias | source - set -x VISUAL /usr/bin/nvim set -x EDITOR /usr/bin/nvim set -x BROWSER /usr/bin/chromium @@ -24,3 +22,9 @@ set -x MKL_DEBUG_CPU_TYPE 5 # fzf bindings set -U FZF_LEGACY_KEYBINDINGS 0 + +function fish_user_key_bindings + for mode in insert default visual + bind -M $mode \cf forward-char + end +end diff --git a/fish/ll.fish b/fish/ll.fish new file mode 100644 index 0000000..7c818eb --- /dev/null +++ b/fish/ll.fish @@ -0,0 +1,3 @@ +function ll --description 'List contents of directory using long format' + ls -lha $argv +end diff --git a/hjalmar-droneship/i3/config b/hjalmar-droneship/i3/config index ac739c1..2e07e6b 100644 --- a/hjalmar-droneship/i3/config +++ b/hjalmar-droneship/i3/config @@ -29,8 +29,7 @@ workspace_auto_back_and_forth no # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -# font xft:URWGothic-Book 11 -font pango:Noto Sans 11 +font xft:URWGothic-Book 10 # Use Mouse+$mod to drag floating windows floating_modifier $mod @@ -44,30 +43,22 @@ bindsym $mod+Shift+q kill # start program launcher bindsym $mod+d exec --no-startup-id rofi -show combi -combi-modi "run#drun" -lines 10 -eh 2 -width 30 -################################################################################################ -## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## -################################################################################################ +exec --no-startup-id start-pulseaudio-x11 +exec --no-startup-id pa-applet +bindsym $mod+Ctrl+m exec pavucontrol -exec --no-startup-id volumeicon -bindsym $mod+Ctrl+m exec $term -e 'alsamixer' -#exec --no-startup-id pulseaudio -#exec --no-startup-id pa-applet -#bindsym $mod+Ctrl+m exec pavucontrol -################################################################################################ - -bindsym Pause exec amixer -q sset Master 3%+ -bindsym Print exec amixer -q sset Master 3%- -bindsym Scroll_Lock exec amixer -q sset Master toggle -################################################################################################ +bindsym Pause exec pactl set-sink-volume @DEFAULT_SINK@ +10% +bindsym Print exec pactl set-sink-volume @DEFAULT_SINK@ -10% +bindsym Scroll_Lock exec pactl set-sink-mute @DEFAULT_SINK@ toggle # Screen brightness controls # bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'" # bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'" # enable / disable caps->escape bind -bindsym $mod+F10 exec "setxkbmap -layout no -variant nodeadkeys -option" -bindsym $mod+F11 exec "setxkbmap -layout no -variant nodeadkeys -option 'caps:backspace'" -bindsym $mod+F12 exec "setxkbmap -layout no -variant nodeadkeys -option 'caps:escape'" +bindsym $mod+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option" +bindsym $mod+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'" +bindsym $mod+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'" # Start Applications bindsym $mod+Ctrl+b exec $term -e 'bmenu' @@ -77,8 +68,8 @@ bindsym $mod+F3 exec thunar bindsym $mod+Shift+F3 exec $term -e 'ranger' bindsym $mod+F4 exec $term -e 'mocp' bindsym $mod++Shift+F4 exec $term -e 'ncspot' -bindsym $mod+t exec --no-startup-id pkill picom -bindsym $mod+Shift+t exec --no-startup-id picom -b +bindsym $mod+Shift+t exec --no-startup-id pkill picom +bindsym $mod+t exec --no-startup-id picom -b bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" bindsym $mod+Shift+s --release exec --no-startup-id flameshot gui bindsym $mod+Ctrl+x --release exec --no-startup-id xkill @@ -89,29 +80,17 @@ 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 -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right # workspace back and forth (with/without active container) bindsym $mod+b workspace back_and_forth bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth # split orientation -bindsym $mod+bar split h;exec notify-send 'tile horizontally' -bindsym $mod+minus split v;exec notify-send 'tile vertically' bindsym $mod+q split toggle # toggle fullscreen mode for the focused container @@ -129,21 +108,17 @@ bindsym $mod+Shift+space floating toggle bindsym $mod+space focus mode_toggle # toggle sticky -bindsym $mod+Shift+s sticky toggle +bindsym $mod+Shift+a sticky toggle # focus the parent container bindsym $mod+a focus parent # move the currently focused window to the scratchpad -# bindsym $mod+Shift+minus move scratchpad +bindsym $mod+Shift+minus move scratchpad # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. -# bindsym $mod+minus scratchpad show - -#navigate workspaces next / previous -bindsym $mod+Ctrl+Right workspace next -bindsym $mod+Ctrl+Left workspace prev +bindsym $mod+minus scratchpad show # Workspace names # to display names or symbols instead of plain workspace numbers you can use @@ -276,21 +251,11 @@ mode "$mode_system" { bindsym $mod+r mode "resize" 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 l resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym j resize shrink height 10 px or 10 ppt bindsym h 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 - # exit resize mode: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" @@ -311,24 +276,13 @@ exec_always --no-startup-id fix_xcursor exec_always for id in $(xinput list | grep "pointer" | cut -d '=' -f 2 | cut -f 1); do xinput --set-prop $id 'libinput Accel Profile Enabled' 0, 1; done # HB STARTUP ADDITIONS -exec --no-startup-id setxkbmap -layout no -variant nodeadkeys -option "caps:escape" +exec --no-startup-id setxkbmap -layout no -model pc105 -variant nodeadkeys -option "caps:escape" exec --no-startup-id redshift-gtk exec --no-startup-id dropbox start & exec --no-startup-id nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=60 exec --no-startup-id xrandr --output DP-2 --mode 3840x2160 --output DP-0 --mode 2560x1440 --right-of DP-2 --primary # Color palette used for the terminal ( ~/.Xresources file ) -# Colors are gathered based on the documentation: -# https://i3wm.org/docs/userguide.html#xresources -# Change the variable name at the place you want to match the color -# of your terminal like this: -# [example] -# If you want your bar to have the same background color as your -# terminal background change the line 362 from: -# background #14191D -# to: -# background $term_background -# Same logic applied to everything else. set_from_resource $term_background background set_from_resource $term_foreground foreground set_from_resource $term_color0 color0 @@ -356,11 +310,9 @@ bar { ## please set your primary output first. Example: 'xrandr --output eDP1 --primary' - # tray_output HDMI-0 - + tray_output primary bindsym button4 nop bindsym button5 nop -# font xft:URWGothic-Book 11 strip_workspace_numbers yes colors { diff --git a/hjalmar-droneship/i3status/config b/hjalmar-droneship/i3status/config index 7e56f30..0123a27 100644 --- a/hjalmar-droneship/i3status/config +++ b/hjalmar-droneship/i3status/config @@ -40,17 +40,17 @@ ethernet _first_ { order += "disk /" disk "/" { - format = " /  %avail / %percentage_avail " + format = " /  %total / %percentage_avail " } order += "disk /mnt/nuuetHDD/" disk "/mnt/nuuetHDD/" { - format = " /mnt/nuuetHDD/ ⛁ %avail / %percentage_avail " + format = " /mnt/nuuetHDD/ ⛁ %total / %percentage_avail " } order += "disk /mnt/OneDrive/" disk "/mnt/OneDrive/" { - format = " /mnt/OneDrive/ ⛁ %avail / %percentage_avail " + format = " /mnt/OneDrive/ ⛁ %total / %percentage_avail " } # order += "battery 0" diff --git a/hjalmar-mothership/i3/config b/hjalmar-mothership/i3/config index dbb5a49..5baa4ba 100644 --- a/hjalmar-mothership/i3/config +++ b/hjalmar-mothership/i3/config @@ -29,8 +29,7 @@ workspace_auto_back_and_forth no # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -# font xft:URWGothic-Book 11 -font pango:Noto Sans 11 +font xft:URWGothic-Book 10 # Use Mouse+$mod to drag floating windows floating_modifier $mod @@ -44,21 +43,13 @@ bindsym $mod+Shift+q kill # start program launcher bindsym $mod+d exec --no-startup-id rofi -show combi -combi-modi "run#drun" -lines 10 -eh 2 -width 30 -################################################################################################ -## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## -################################################################################################ +exec --no-startup-id start-pulseaudio-x11 +exec --no-startup-id pa-applet +bindsym $mod+Ctrl+m exec pavucontrol -exec --no-startup-id volumeicon -bindsym $mod+Ctrl+m exec $term -e 'alsamixer' -#exec --no-startup-id pulseaudio -#exec --no-startup-id pa-applet -#bindsym $mod+Ctrl+m exec pavucontrol -################################################################################################ - -bindsym Pause exec amixer -q sset Master 3%+ -bindsym Print exec amixer -q sset Master 3%- -bindsym Scroll_Lock exec amixer -q sset Master toggle -################################################################################################ +bindsym Pause exec pactl set-sink-volume @DEFAULT_SINK@ +10% +bindsym Print exec pactl set-sink-volume @DEFAULT_SINK@ -10% +bindsym Scroll_Lock exec pactl set-sink-mute @DEFAULT_SINK@ toggle # Screen brightness controls # bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'" @@ -68,8 +59,6 @@ bindsym Scroll_Lock exec amixer -q sset Master toggle bindsym $mod+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option" bindsym $mod+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'" bindsym $mod+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'" -bindsym $mod+F9 exec "xrandr --dpi 96 --output DP-4 --primary --output DP-0 --auto --rotate left --left-of DP-4" -bindsym $mod+Shift+F9 exec "xrandr --dpi 96 --output DP-4 --primary --output DP-2 --off --output DP-0 --off" # Start Applications bindsym $mod+Ctrl+b exec $term -e 'bmenu' @@ -79,8 +68,8 @@ bindsym $mod+F3 exec thunar bindsym $mod+Shift+F3 exec $term -e 'ranger' bindsym $mod+F4 exec $term -e 'mocp' bindsym $mod++Shift+F4 exec $term -e 'ncspot' -bindsym $mod+t exec --no-startup-id pkill picom -bindsym $mod+Shift+t exec --no-startup-id picom -b +bindsym $mod+Shift+t exec --no-startup-id pkill picom +bindsym $mod+t exec --no-startup-id picom -b bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" bindsym $mod+Shift+s --release exec --no-startup-id flameshot gui bindsym $mod+Ctrl+x --release exec --no-startup-id xkill @@ -91,29 +80,17 @@ 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 -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right # workspace back and forth (with/without active container) bindsym $mod+b workspace back_and_forth bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth # split orientation -bindsym $mod+bar split h;exec notify-send 'tile horizontally' -bindsym $mod+minus split v;exec notify-send 'tile vertically' bindsym $mod+q split toggle # toggle fullscreen mode for the focused container @@ -131,21 +108,17 @@ bindsym $mod+Shift+space floating toggle bindsym $mod+space focus mode_toggle # toggle sticky -bindsym $mod+Shift+s sticky toggle +bindsym $mod+Shift+a sticky toggle # focus the parent container bindsym $mod+a focus parent # move the currently focused window to the scratchpad -# bindsym $mod+Shift+minus move scratchpad +bindsym $mod+Shift+minus move scratchpad # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. -# bindsym $mod+minus scratchpad show - -#navigate workspaces next / previous -bindsym $mod+Ctrl+Right workspace next -bindsym $mod+Ctrl+Left workspace prev +bindsym $mod+minus scratchpad show # Workspace names # to display names or symbols instead of plain workspace numbers you can use @@ -278,21 +251,11 @@ mode "$mode_system" { bindsym $mod+r mode "resize" 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 l resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym j resize shrink height 10 px or 10 ppt bindsym h 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 - # exit resize mode: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" @@ -310,7 +273,7 @@ exec --no-startup-id xautolock -time 30 -locker blurlock exec_always --no-startup-id sbxkb #exec_always --no-startup-id ff-theme-util exec_always --no-startup-id fix_xcursor -exec --no-startup-id xrandr --dpi 96 --output $display2 --primary --output $display3 --auto --rotate left --right-of $display2 --output $display1 --auto --rotate left --left-of $display2 +exec --no-startup-id xrandr --dpi 108 --output $display2 --primary --output $display3 --auto --rotate left --right-of $display2 --output $display1 --auto --rotate left --left-of $display2 exec_always for id in $(xinput list | grep "pointer" | cut -d '=' -f 2 | cut -f 1); do xinput --set-prop $id 'libinput Accel Profile Enabled' 0, 1; done # HB STARTUP ADDITIONS @@ -320,17 +283,6 @@ exec --no-startup-id dropbox start & exec --no-startup-id nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=60 # Color palette used for the terminal ( ~/.Xresources file ) -# Colors are gathered based on the documentation: -# https://i3wm.org/docs/userguide.html#xresources -# Change the variable name at the place you want to match the color -# of your terminal like this: -# [example] -# If you want your bar to have the same background color as your -# terminal background change the line 362 from: -# background #14191D -# to: -# background $term_background -# Same logic applied to everything else. set_from_resource $term_background background set_from_resource $term_foreground foreground set_from_resource $term_color0 color0 @@ -361,7 +313,6 @@ bar { tray_output primary bindsym button4 nop bindsym button5 nop - font xft:URWGothic-Book 12 strip_workspace_numbers yes colors { diff --git a/hjalmar-mothership/i3status/config b/hjalmar-mothership/i3status/config index 6b53700..1ed61e0 100644 --- a/hjalmar-mothership/i3status/config +++ b/hjalmar-mothership/i3status/config @@ -40,27 +40,27 @@ ethernet _first_ { order += "disk /" disk "/" { - format = " /  %avail / %percentage_avail " + format = " /  %total / %percentage_avail " } order += "disk /mnt/Games/" disk "/mnt/Games/" { - format = " /mnt/Games/ ⛁ %avail / %percentage_avail " + format = " /mnt/Games/  %total / %percentage_avail " } order += "disk /mnt/nuuetHDD/" disk "/mnt/nuuetHDD/" { - format = " /mnt/nuuetHDD/ ⛁ %avail / %percentage_avail " + format = " /mnt/nuuetHDD/ ⛁ %total / %percentage_avail " } order += "disk /mnt/OneDrive/" disk "/mnt/OneDrive/" { - format = " /mnt/OneDrive/ ⛁ %avail / %percentage_avail " + format = " /mnt/OneDrive/ ⛁ %total / %percentage_avail " } order += "disk /mnt/src/" disk "/mnt/src/" { - format = " /mnt/src/ ⛁ %avail / %percentage_avail " + format = " /mnt/src/ ⛁ %total / %percentage_avail " } # order += "battery 0" diff --git a/manjaro.md b/manjaro.md index 61f7457..3d3607e 100644 --- a/manjaro.md +++ b/manjaro.md @@ -4,15 +4,15 @@ * fonts * `yay -S nerd-fonts-source-code-pro powerline-fonts-git libxft-bgra` * applications - * `yay -S onedrive-abraunegg dropbox slack-desktop chromium zathura-pdf-mupdf trash-cli rofi redshift flameshot fish pavucontrol thunar` + * `yay -S onedrive-abraunegg dropbox slack-desktop chromium zathura-pdf-mupdf trash-cli rofi redshift flameshot fish pavucontrol thunar drawio-desktop` * gaming and media - + `yay -S steam-manjaro vlc libmicrodns protobuf ncspot-git` + + `yay -S steam-manjaro vlc libmicrodns protobuf ncspot-git mkchromecast` * hardware * `yay -S liquidctl glances pulseaudio-bluetooth asus-fan-control` # coding * `yay -S cuda nvidia-container-toolkit` - `yay -S docker docker-compose dry-bin neovim tmux diff-so-fancy the_silver_searcher ripgrep bat npm nodejs yarn ninja ctags tig` + `yay -S docker docker-compose dry-bin neovim tmux diff-so-fancy the_silver_searcher ripgrep bat npm nodejs yarn ninja ctags tig git-lfs` * `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm` # python @@ -32,6 +32,9 @@ * start onedrive `systemctl enable --user onedrive --now` * ssd maintenance `sudo systemctl enable fstrim.timer --now` * show log `journalctl --user-unit onedrive -f` +* nvim as default editor `xdg-mime default nvim.desktop application/octet-stream` +* change from alsa to pavu `install_pulse` +* manage `~/.config.mimeapps.list` associations # OMF * curl -L https://get.oh-my.fish | fish diff --git a/mimeapps.list b/mimeapps.list new file mode 100644 index 0000000..ae83418 --- /dev/null +++ b/mimeapps.list @@ -0,0 +1,31 @@ +[Default Applications] + +[Added Associations] +x-scheme-handler/msteams=teams.desktop; +x-scheme-handler/http=exo-web-browser.desktop; +x-scheme-handler/https=exo-web-browser.desktop; +x-scheme-handler/ftp=exo-web-browser.desktop; +x-scheme-handler/chrome=exo-web-browser.desktop; +x-scheme-handler/webcal=exo-web-browser.desktop +x-scheme-handler/mailto=exo-web-browser.desktop; +application/x-extension-htm=exo-web-browser.desktop; +application/x-extension-html=exo-web-browser.desktop; +application/x-extension-shtml=exo-web-browser.desktop; +application/x-extension-xhtml=exo-web-browser.desktop; +application/x-extension-xht=exo-web-browser.desktop; +application/xhtml+xml=exo-web-browser.desktop; +application/pdf=exo-web-browser.desktop;org.pwmt.zathura.desktop; +application/x-bittorrent=deluge.desktop; +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=freeoffice-planmaker.desktop; +application/vnd.openxmlformats-officedocument.presentationml.presentation=freeoffice-presentations.desktop; +image/jpeg=viewnior.desktop; +image/png=viewnior.desktop; +image/svg+xml=viewnior.desktop; +message/rfc822=exo-web-browser.desktop; +text/csv=freeoffice-planmaker.desktop; +text/html=nvim.desktop; +text/plain=nvim.desktop; +text/markdown=nvim.desktop;markdown_previewer.desktop; +text/x-python=nvim.desktop; +application/xml=nvim.desktop; +application/octet-stream=nvim.desktop; diff --git a/root/.gitconfig b/root/.gitconfig index 9d0f329..a4f1d0d 100644 --- a/root/.gitconfig +++ b/root/.gitconfig @@ -1,5 +1,4 @@ [core] - autocrlf = input filemode = false pager = diff-so-fancy | less --tabs=4 -RFX autorcrlf = true