diff --git a/files/configs/i3/i3/config b/files/configs/i3/i3/config index 7fd34de..f1d8cd1 100644 --- a/files/configs/i3/i3/config +++ b/files/configs/i3/i3/config @@ -31,16 +31,33 @@ exec_always --no-startup-id xinput set-prop "bcm5974" "libinput Natural Scrollin bindsym $mod+Shift+Return exec alacritty bindsym $mod+Shift+w exec vivaldi-stable bindsym $mod+Shift+f exec alacritty -e ranger +bindsym $mod+Shift+t exec thunar bindsym $mod+Shift+e exec mousepad bindsym $mod+Shift+p exec keepassxc bindsym $mod+Shift+m exec ghostwriter bindsym $mod+space --release exec "rofi -combi-modi drun,window -show combi -modi combi" -bindsym $mod+x kill +bindsym $mod+q kill + +# Clipboard manager +bindsym $mod+c exec --no-startup-id clipboard-rofi bindsym $mod+Ctrl+p exec pavucontrol bindsym $mod+Ctrl+b exec alacritty -e bmenu bindsym $mod+Print --release exec --no-startup-id flameshot gui +bindsym $mod+Shift+Print --release exec --no-startup-id flameshot full -p ~/Pictures/Screenshots/ + +# Scratchpad terminal (dropdown-style) +for_window [instance="scratchterm"] floating enable, resize set 1200 600, move position center, move scratchpad +exec --no-startup-id alacritty --class scratchterm +bindsym $mod+Tab scratchpad show + +# Media keys (MacBook) +bindsym XF86AudioRaiseVolume exec --no-startup-id volume-notify up +bindsym XF86AudioLowerVolume exec --no-startup-id volume-notify down +bindsym XF86AudioMute exec --no-startup-id volume-notify mute +bindsym XF86MonBrightnessUp exec --no-startup-id brightness-notify up +bindsym XF86MonBrightnessDown exec --no-startup-id brightness-notify down # Display management bindsym $mod+Ctrl+d exec autorandr --change @@ -59,7 +76,10 @@ exec --no-startup-id nm-applet exec --no-startup-id blueman-applet exec --no-startup-id xautolock -time 10 -locker blurlock exec --no-startup-id autorandr --change +exec --no-startup-id greenclip daemon +exec_always --no-startup-id autotiling exec --no-startup-id keepassxc --keyfile /home/kalle/kgokeyfile /home/kalle/Passwords.kdbx +exec --no-startup-id sysinfo-notify bindsym $mod+Left focus left bindsym $mod+Down focus down @@ -84,10 +104,10 @@ bindsym $mod+Ctrl+Left workspace prev # Workspace names # Eg: set $ws1 1:mail # set $ws2 2: -set $ws1 1 -set $ws2 2 -set $ws3 3 -set $ws4 4 +set $ws1 1:WEB +set $ws2 2:TERM +set $ws3 3:EDIT +set $ws4 4:FILES set $ws5 5 set $ws6 6 set $ws7 7 @@ -114,9 +134,11 @@ bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 # Open applications on specific workspaces -# assign [class="Thunderbird"] $ws1 -# assign [class="Pcmanfm"] $ws3 -# assign [class="Skype"] $ws5 +assign [class="Vivaldi-stable"] $ws1 +assign [class="Alacritty"] $ws2 +assign [class="Mousepad"] $ws3 +assign [class="ghostwriter"] $ws3 +assign [class="Thunar"] $ws4 # Open specific applications in floating mode for_window [title="alsamixer"] floating enable border pixel 1 @@ -130,11 +152,7 @@ for_window [class="Nitrogen"] floating enable sticky enable border normal for_window [class="Pavucontrol"] floating enable for_window [class="Simple-scan"] floating enable border normal for_window [class="(?i)System-config-printer.py"] floating enable border normal -for_window [class="Skype"] floating enable border normal -for_window [class="Timeset-gui"] floating enable border normal -for_window [class="SimpleScreenRecorder"] floating enable border normal -for_window [class="MPlayer"] floating enable -for_window [class="Spotify"] floating enable +for_window [class="KeePassXC"] floating enable # switch to workspace with urgent window automatically for_window [urgent=latest] focus diff --git a/files/configs/misc-scripts/brightness-notify b/files/configs/misc-scripts/brightness-notify new file mode 100644 index 0000000..d1da6ae --- /dev/null +++ b/files/configs/misc-scripts/brightness-notify @@ -0,0 +1,14 @@ +#!/bin/bash +# Brightness control with dunst notification + +case "$1" in + up) + brightnessctl set +5% + ;; + down) + brightnessctl set 5%- + ;; +esac + +BRIGHTNESS=$(brightnessctl -m | awk -F, '{print $4}' | tr -d '%') +dunstify -a "brightness" -u low -r 9998 -h int:value:${BRIGHTNESS} " ${BRIGHTNESS}%" diff --git a/files/configs/misc-scripts/clipboard-rofi b/files/configs/misc-scripts/clipboard-rofi new file mode 100644 index 0000000..0321ad9 --- /dev/null +++ b/files/configs/misc-scripts/clipboard-rofi @@ -0,0 +1,4 @@ +#!/bin/bash +# Rofi-based clipboard manager using greenclip + +rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' diff --git a/files/configs/misc-scripts/sysinfo-notify b/files/configs/misc-scripts/sysinfo-notify new file mode 100644 index 0000000..edbd3a0 --- /dev/null +++ b/files/configs/misc-scripts/sysinfo-notify @@ -0,0 +1,15 @@ +#!/bin/bash +# Show system info notification on login + +sleep 3 + +IP=$(ip route get 1.1.1.1 2>/dev/null | grep -o 'src [0-9.]*' | awk '{print $2}') +MEM_TOTAL=$(free -h | grep Mem | awk '{print $2}') +MEM_AVAIL=$(free -h | grep Mem | awk '{print $7}') +DISK_AVAIL=$(df -h / | tail -1 | awk '{print $4}') +BATTERY=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "N/A") +UPTIME=$(uptime -p | sed 's/up //') + +dunstify -a "sysinfo" -u normal -r 9997 -t 8000 \ + "System Info" \ + "IP: ${IP:-nicht verbunden}\nRAM frei: ${MEM_AVAIL}/${MEM_TOTAL}\nDisk frei: ${DISK_AVAIL}\nAkku: ${BATTERY}%\nUptime: ${UPTIME}" diff --git a/files/configs/misc-scripts/volume-notify b/files/configs/misc-scripts/volume-notify new file mode 100644 index 0000000..1e47c68 --- /dev/null +++ b/files/configs/misc-scripts/volume-notify @@ -0,0 +1,24 @@ +#!/bin/bash +# Volume control with dunst notification + +case "$1" in + up) + pactl set-sink-volume @DEFAULT_SINK@ +5% + ;; + down) + pactl set-sink-volume @DEFAULT_SINK@ -5% + ;; + mute) + pactl set-sink-mute @DEFAULT_SINK@ toggle + ;; +esac + +VOLUME=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]*%' | head -1) +MUTE=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') + +if [[ "${MUTE}" == "yes" ]]; then + dunstify -a "volume" -u low -r 9999 -h int:value:0 " MUTE" +else + VOL_NUM=${VOLUME%\%} + dunstify -a "volume" -u low -r 9999 -h int:value:${VOL_NUM} " ${VOLUME}" +fi diff --git a/tasks/configure-i3.yaml b/tasks/configure-i3.yaml index fa7cac0..40c1341 100644 --- a/tasks/configure-i3.yaml +++ b/tasks/configure-i3.yaml @@ -82,3 +82,33 @@ src: files/configs/misc-scripts/blurlock dest: /usr/bin/blurlock mode: "0755" + +- name: i3 Configuration - Copy clipboard-rofi script + copy: + src: files/configs/misc-scripts/clipboard-rofi + dest: /usr/bin/clipboard-rofi + mode: "0755" + +- name: i3 Configuration - Copy volume-notify script + copy: + src: files/configs/misc-scripts/volume-notify + dest: /usr/bin/volume-notify + mode: "0755" + +- name: i3 Configuration - Copy brightness-notify script + copy: + src: files/configs/misc-scripts/brightness-notify + dest: /usr/bin/brightness-notify + mode: "0755" + +- name: i3 Configuration - Copy sysinfo-notify script + copy: + src: files/configs/misc-scripts/sysinfo-notify + dest: /usr/bin/sysinfo-notify + mode: "0755" + +- name: i3 Configuration - Create Screenshots directory + become_user: "{{ username }}" + file: + path: "{{ userhome }}/Pictures/Screenshots" + state: directory diff --git a/tasks/configure-software-fedora.yaml b/tasks/configure-software-fedora.yaml index d12f2d3..e084ebf 100644 --- a/tasks/configure-software-fedora.yaml +++ b/tasks/configure-software-fedora.yaml @@ -1,6 +1,6 @@ - name: Package Installation - Productivity Tools package: - name: ["alacritty", "ranger", "mousepad", "ghostwriter"] + name: ["alacritty", "ranger", "mousepad", "ghostwriter", "thunar", "xclip"] state: present - name: Package Installation - Development Tools @@ -15,7 +15,16 @@ - name: Package Installation - System Desktop package: - name: ["rofi", "nitrogen", "arandr", "autorandr", "dunst"] + name: + [ + "rofi", + "nitrogen", + "arandr", + "autorandr", + "dunst", + "brightnessctl", + "autotiling", + ] state: present - name: Package Installation - I3 Desktop diff --git a/tasks/configure-software-manjaro.yaml b/tasks/configure-software-manjaro.yaml index 5b81e18..fe8f725 100644 --- a/tasks/configure-software-manjaro.yaml +++ b/tasks/configure-software-manjaro.yaml @@ -5,9 +5,15 @@ - name: Package Installation - Productivity Tools package: - name: ["alacritty", "ranger", "mousepad", "ghostwriter"] + name: ["alacritty", "ranger", "mousepad", "ghostwriter", "thunar", "xclip"] state: present +- name: Package Installation - Install greenclip from AUR + become_user: "{{ username }}" + command: pamac install --no-confirm greenclip + args: + creates: /usr/bin/greenclip + - name: Package Installation - Development Tools package: name: ["binutils"] @@ -20,5 +26,15 @@ - name: Package Installation - System Desktop package: - name: ["rofi", "nitrogen", "dunst", "i3blocks", "arandr", "autorandr"] + name: + [ + "rofi", + "nitrogen", + "dunst", + "i3blocks", + "arandr", + "autorandr", + "brightnessctl", + "autotiling", + ] state: present diff --git a/tasks/configure-software-ubuntu.yaml b/tasks/configure-software-ubuntu.yaml index 130b2c3..c154eeb 100644 --- a/tasks/configure-software-ubuntu.yaml +++ b/tasks/configure-software-ubuntu.yaml @@ -5,7 +5,16 @@ - name: Package Installation - Productivity Tools package: - name: ["alacritty", "ranger", "mousepad", "ghostwriter"] + name: + [ + "alacritty", + "ranger", + "mousepad", + "ghostwriter", + "thunar", + "xclip", + "greenclip", + ] state: present - name: Package Installation - Development Tools @@ -20,5 +29,15 @@ - name: Package Installation - System Desktop package: - name: ["rofi", "nitrogen", "dunst", "i3blocks", "arandr", "autorandr"] + name: + [ + "rofi", + "nitrogen", + "dunst", + "i3blocks", + "arandr", + "autorandr", + "brightnessctl", + "autotiling", + ] state: present