Add laptop dotfiles

This commit is contained in:
Andrea Fazzi 2024-05-22 14:00:09 +02:00
parent 964ed6991e
commit 51fbb151fd
15 changed files with 787 additions and 0 deletions

View file

@ -0,0 +1,50 @@
# Source https//github.com/tyrannicaltoucan/vim-deep-space
# Default colors
[colors.primary]
background = '#1b202a'
foreground = '#9aa7bd'
# Colors the cursor will use if `custom_cursor_colors` is true
[colors.cursor]
text = '#232936'
cursor = '#51617d'
# Normal colors
[colors.normal]
black = '#1b202a'
red = '#b15e7c'
green = '#709d6c'
yellow = '#b5a262'
blue = '#608cc3'
magenta = '#8f72bf'
cyan = '#56adb7'
white = '#9aa7bd'
# Bright colors
[colors.bright]
black = '#232936'
red = '#b3785d'
green = '#709d6c'
yellow = '#d5b875'
blue = '#608cc3'
magenta = '#c47ebd'
cyan = '#51617d'
white = '#9aa7bd'
[font]
size = 12
[font.normal]
family = "CaskaydiaMono Nerd Font"
# style = "bold"
[shell]
program = "/usr/bin/zsh"
[window]
opacity = 0.8
[window.padding]
x = 20
y = 20

View file

@ -0,0 +1,45 @@
# Colors (Gruvbox Material Hard Dark)
# Default colors
[colors.primary]
background = '#1d2021'
foreground = '#d4be98'
# Normal colors
[colors.normal]
black = '#32302f'
red = '#ea6962'
green = '#a9b665'
yellow = '#d8a657'
blue = '#7daea3'
magenta = '#d3869b'
cyan = '#89b482'
white = '#d4be98'
# Bright colors (same as normal colors)
[colors.bright]
black = '#32302f'
red = '#ea6962'
green = '#a9b665'
yellow = '#d8a657'
blue = '#7daea3'
magenta = '#d3869b'
cyan = '#89b482'
white = '#d4be98'
[font]
size = 12
[font.normal]
family = "CaskaydiaCove Nerd Font"
style = "bold"
[shell]
program = "/bin/bash"
# [window]
# opacity = 0.8
[window.padding]
x = 20
y = 20

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Nextcloud
GenericName=File Synchronizer
Exec="/usr/bin/nextcloud" --background
Terminal=false
Icon=Nextcloud
Categories=Network
Type=Application
StartupNotify=false
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=10

133
laptop/.config/sway/config Normal file
View file

@ -0,0 +1,133 @@
# variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term alacritty -e 'tmux'
set $term_no_tmux alacritty
set $menu exec tofi-drun | xargs swaymsg exec --
font pango:Iosevka Nerd Font 9
# setting the solid.
# output * bg #a89984 solid_color
# use this if you are into wallpapers.
output * bg $HOME/.config/sway/wallpaper.jpg fill
# common bindings
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $term_no_tmux
bindsym $mod+d exec $menu
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'Exit Sway?' -B 'Yes, exit sway' 'swaymsg exit' --font="Iosevka Nerd Font"
floating_modifier $mod normal
# more bindings
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus 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
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
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 10
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 10
bindsym $mod+Shift+v floating toggle
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+r mode "resize"
bindsym XF86MonBrightnessUp exec "brightnessctl set +10%"
bindsym XF86MonBrightnessDown exec "brightnessctl set 10%-"
mode "resize" {
bindsym $left resize shrink width 20px
bindsym $down resize grow height 20px
bindsym $up resize shrink height 20px
bindsym $right resize grow width 20px
bindsym Left resize shrink width 20px
bindsym Down resize grow height 20px
bindsym Up resize shrink height 20px
bindsym Right resize grow width 20px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bar {
swaybar_command waybar
}
# startup executions
# exec swww init
default_border pixel 1
default_floating_border pixel 1
# Thin borders:
smart_borders on
smart_gaps off
## Window decoration
#class border backgr text indicator child_border
client.focused #333845 #333845 #ffffff #2e9ef4 #8fbcbb
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #2f343a #222222 #888888 #333845 #333845
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #333845
client.background #ffffff
# swayfx config
blur enable
blur_passes 3
blur_radius 5
layer_effects "waybar" shadows enable;
corner_radius 12
default_dim_inactive 0.1
shadows enable
# window gaps
gaps inner 4
gaps outer 4
# includes
include /etc/sway/config.d/*
include $HOME/.config/sway/config.d/*

View file

@ -0,0 +1,12 @@
input type:keyboard {
repeat_delay 250
repeat_rate 50
xkb_layout "it"
xkb_options "grp:alt_shift_toggle,caps:escape"
}
input type:touchpad {
dwt disable
tap enabled
natural_scroll disable
}

138
laptop/.config/sway/config~ Normal file
View file

@ -0,0 +1,138 @@
# variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term alacritty -e 'tmux'
set $menu exec tofi-drun | xargs swaymsg exec --
font pango:Iosevka Nerd Font 12
# setting the solid.
# output * bg #a89984 solid_color
# use this if you are into wallpapers.
output * bg $HOME/.config/sway/wallpaper.jpg fill
# common bindings
bindsym $mod+Return exec $term
bindsym $mod+d exec $menu
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'Exit Sway?' -B 'Yes, exit sway' 'swaymsg exit' --font="Iosevka Nerd Font"
floating_modifier $mod normal
# more bindings
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus 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
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
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 10
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 10
bindsym $mod+Shift+v floating toggle
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+r mode "resize"
mode "resize" {
bindsym $left resize shrink width 20px
bindsym $down resize grow height 20px
bindsym $up resize shrink height 20px
bindsym $right resize grow width 20px
bindsym Left resize shrink width 20px
bindsym Down resize grow height 20px
bindsym Up resize shrink height 20px
bindsym Right resize grow width 20px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bar {
swaybar_command waybar
# swaybar_command swaybar
#
# status_command /usr/bin/i3status-rs $HOME/.config/i3status/config.toml
# position top
# font pango:CaskaydiaCove Nerd Font 12
#
# colors {
# background #050505
#
# focused_workspace #97a97c #87986a #050505
# }
}
# startup executions
# exec swww init
default_border pixel 1
default_floating_border pixel 1
# Thin borders:
smart_borders on
smart_gaps off
client.focused #68a9c9 #68a9c9 #68a9c9 #68a9c9 #68a9c9
client.focused_inactive #373b41 #969896 #969896 #282a2e #282a2e
client.unfocused #373b41 #969896 #969896 #282a2e #282a2e
client.urgent #373b41 #900000 #ffffff #282a2e #900000
client.placeholder #373b41 #373b41 #ffffff #282a2e #969896
# swayfx config
blur enable
blur_passes 3
blur_radius 5
layer_effects "waybar" shadows enable;
corner_radius 12
default_dim_inactive 0.1
shadows enable
# window gaps
gaps inner 4
gaps outer 4
# includes
include /etc/sway/config.d/*
include $HOME/.config/sway/config.d/*

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

View file

@ -0,0 +1,17 @@
font = CaskaydiaCove Nerd Font Bold
font-size = 12
background-color = #1d2021
corner-radius = 6
outline-width = 0
border-width = 2
border-color = #202020
text-color = #ede0d4
selection-color = #97a97c
prompt-text = "Run: "
width = 50%
height = 40%

View file

@ -0,0 +1,133 @@
{
"layer": "top",
"position": "bottom",
"margin-left": 10,
"margin-right": 10,
"margin-bottom": 10,
"height": 30,
"spacing": 5,
"modules-left": [
"sway/workspaces",
"sway/mode",
"sway/window"
],
"modules-center": [],
"modules-right": [
"idle_inhibitor",
"pulseaudio",
"battery",
"backlight",
"clock",
"custom/power",
"custom/grimshot",
"custom/notification",
"tray"
],
"idle_inhibitor": {
"format": "{icon} ",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% 󱐋",
"format-plugged": "{capacity}% ",
"format-icons": [
"",
"",
"",
"",
""
],
"on-click": "~/.config/sway/scripts/tofi-ppctl.sh"
},
"clock": {
"interval": 10,
"format-alt": "{:%d/%m/%Y %H:%M:%S}",
"format": "{:%d/%m %H:%M}",
"tooltip-format": "{:%e %B %Y}",
"on-click-right": "gsimplecal"
},
"sway/workspaces": {
"disable-scroll": true,
"disable-markup": false,
"all-outputs": false,
"format": " {icon} "
},
"sway/mode": {
"format": "{}",
"tooltip": false
},
"sway/window": {
"format": "{}",
"max-length": 120
},
"wlr/workspaces": {
"all-outputs": false,
"on-click": "activate",
"sort-by-number": true
},
"pulseaudio": {
"scroll-step": 1,
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}  {format_source}",
"format-bluetooth-muted": "󰋋 {icon}  {format_source}",
"format-muted": "󰋋 {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "󰋋",
"hands-free": "󰋎",
"headset": " 󰋎 ",
"phone": "",
"portable": "",
"car": "",
"default": [
""
]
},
"on-click": "pavucontrol",
"on-scroll-up": "pamixer -ui 2",
"on-scroll-down": "pamixer -ud 2"
},
"backlight": {
"format": "{percent}% ",
"on-scroll-down": "brightnessctl -c backlight set 1%-",
"on-scroll-up": "brightnessctl -c backlight set +1%"
},
"custom/grimshot": {
"format": "󰹑",
"tooltip": false,
"on-click": "slurp | grim -g - - | wl-copy",
},
"custom/notification": {
"tooltip": false,
"format": "{icon}",
"format-icons": {
"notification": "<span foreground='red'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='red'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"tray": {
"icon-size": 14,
"spacing": 10
}
}

View file

@ -0,0 +1,21 @@
#!/bin/bash
#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro
#05012020 geri123@gmx.net Gerhard S.
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
case $((
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
#
(1) echo $STATUS:"":$PERCENT%;;
(2) echo $STATUS:"":$PERCENT%;;
(3) echo $STATUS:"":$PERCENT%;;
(4) echo $STATUS:"":$PERCENT%;;
(5) echo $STATUS:"":$PERCENT%;;
esac

View file

@ -0,0 +1,2 @@
#!/bin/sh
yad --title="EndeavourOS Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(xfce4-terminal)" "+d" "Application Menu" "(wofi)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+t" "open keybinding helper" "full list"

View file

@ -0,0 +1,16 @@
#!/bin/bash
entries="Logout Suspend Reboot Shutdown"
selected=$(printf '%s\n' $entries | wofi --conf=$HOME/.config/wofi/config.power --style=$HOME/.config/wofi/style.widgets.css | awk '{print tolower($1)}')
case $selected in
logout)
swaymsg exit;;
suspend)
exec systemctl suspend;;
reboot)
exec systemctl reboot;;
shutdown)
exec systemctl poweroff -i;;
esac

View file

@ -0,0 +1,13 @@
#!/bin/bash
LOC="$1"
# HTML encode string as %20
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION&deg=C")
ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
# echo $ICON
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
CLASS=$(echo $content | jq .skytext)
echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'

View file

@ -0,0 +1,196 @@
* {
border: none;
font-family: "Symbols Nerd Font", "monospace";
font-size: 14px;
min-height: 18px;
}
.bold {
font-weight: 700;
}
#clock,
#battery,
#tray,
#idle_inhibitor,
#pulseaudio,
#backlight,
#mpris,
#custom-power,
#custom-grimshot,
#custom-notification {
color: @foreground;
background: @background;
margin-left: 0px;
padding-left: 10px;
padding-right: 10px;
margin-bottom: 0px;
border-radius: 10px;
transition: none;
}
window#waybar {
background: transparent;
}
window#waybar.hidden {
opacity: 0.2;
}
#window {
padding-left: 10px;
padding-right: 10px;
border-radius: 10px;
transition: none;
color: @foreground;
background: @background;
}
window#waybar.empty {
background: transparent;
}
window#waybar.empty #window {
padding: 0px;
margin: 0px;
border: 0px;
background: transparent;
}
#workspaces {
font-size: 16px;
border-radius: 10px;
background: @background;
transition: none;
padding: 0 6px;
}
#workspaces button {
color: @foreground;
border-radius: 2px;
padding: 0;
}
#workspaces button:active {
color: inherit;
background-color: #4b4e5e;
transition: none;
}
#workspaces button:hover {
transition: none;
background-color: #4b4e5e;
}
#workspaces button.focused {
border: 2px solid blue;
border-top: 0;
border-left: 0;
border-right: 0;
}
#workspaces button.urgent {
background: @color1;
color: @background;
}
#workspaces button.occupied {
background-color: @color1;
font-size: 4px;
}
#window {
border: 2px solid #9C59D1;
border-top: 0;
border-left: 0;
border-right: 0;
}
#mpris {
background-color: @background;
color: #ffef97;
border: 2px solid #ffef97;
}
#idle_inhibitor {
background-color: @background;
color: #f697ff;
border: 2px solid #f697ff;
}
#pulseaudio {
background-color: @background;
color: #c497ff;
border: 2px solid #c497ff;
/* padding-right: 12px; */
}
#battery {
background-color: @background;
color: #97c4ff;
border: 2px solid #97c4ff;
/* padding-right: 16px; */
}
#battery.warning {
background-color: #fff677;
color: @background;
}
#battery.critical:not(.charging) {
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink {
to {
background-color: #BF616A;
color: #B5E8E0;
}
}
#backlight {
background-color: @background;
color: #97fff1;
border: 2px solid #97fff1;
/* padding-right: 12px; */
}
#clock {
background-color: @background;
color: #97ffa0;
border: 2px solid #97ffa0;
}
#custom-power {
background-color: @background;
color: #ffef97;
border: 2px solid #ffef97;
}
#custom-grimshot {
background-color: @background;
color: #ffb897;
border: 2px solid #ffb897;
/* padding-right: 14px; */
}
#custom-notification {
background-color: @background;
color: #ff9797;
border: 2px solid #ff9797;
}
#tray {
/* background-color: #ff8282; */
padding-right: 10px;
border: 2px solid #5BCEFA;
border-top: 0;
border-left: 0;
border-right: 0;
}