From 3cc67e02f204f0ea43d5bf6be832bbd4792c27a1 Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Mon, 4 Nov 2024 18:31:01 +0400 Subject: [PATCH] misc i3 & picom config --- i3/.config/i3/config | 93 +++++++++++++++++++++++----------- i3/.config/i3/startup_apps.sh | 19 ------- picom/.config/picom/picom.conf | 4 +- scripts/update_cursor.sh | 7 --- 4 files changed, 66 insertions(+), 57 deletions(-) delete mode 100755 i3/.config/i3/startup_apps.sh delete mode 100755 scripts/update_cursor.sh diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 2a0aa4c..29a95d4 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,3 +1,4 @@ +# Catppuccin color scheme set $rosewater #f5e0dc set $flamingo #f2cdcd set $pink #f5c2e7 @@ -25,7 +26,7 @@ set $base #1e1e2e set $mantle #181825 set $crust #11111b - +# Window colors # target title bg text indicator border client.focused $lavender $crust $text $rosewater $lavender client.focused_inactive $overlay0 $base $text $rosewater $overlay0 @@ -34,100 +35,117 @@ client.urgent $peach $base $peach $overlay0 $peach client.placeholder $overlay0 $base $text $overlay0 $overlay0 client.background $base +# Set mod key (Mod4 = Windows key) set $mod Mod4 +# Window title settings for_window [class="^.*"] title_format "%title" title_align center + +# General window behavior +# Set the default orientation for new windows (horizontal, vertical, or auto) default_orientation auto +# Disable focus wrapping (moving focus past the edge of the screen) focus_wrapping no +# Handle popups during fullscreen mode (leave fullscreen, display popup on current workspace, or ignore) popup_during_fullscreen smart +# Show urgent workspace for 1000 milliseconds when a window requests attention force_display_urgency_hint 1000 ms +# Determine how to handle focus when a window is activated (smart, urgent, focus, or none) focus_on_window_activation urgent +# Enable quick switching between current and previous workspace workspace_auto_back_and_forth yes +# Font for window titles and bar font pango:FiraCode Nerd Font Mono Regular 10 +# Border settings default_border pixel 4 default_floating_border pixel 4 smart_borders on +# Gaps settings gaps inner 8 gaps outer 0 smart_gaps on hide_edge_borders none +# Floating windows for_window [window_role="(?i)(?:pop-up|setup)"] floating enable for_window [class="zoom"] floating enable +# Disable mouse warping mouse_warping none +# Startup applications exec --no-startup-id picom -#exec --no-startup-id ~/.config/i3/setup_monitors.sh exec_always --no-startup-id $HOME/.config/polybar/launch.sh +# XDG desktop portal exec --no-startup-id /usr/lib/xdg-desktop-portal & exec --no-startup-id /usr/lib/xdg-desktop-portal-gtk & -# Start XDG autostart .desktop files using dex. See also -# https://wiki.archlinux.org/index.php/XDG_Autostart +# Start XDG autostart .desktop files using dex exec --no-startup-id dex --autostart --environment i3 - -# Use Mouse+$mod to drag floating windows to their wanted position +# Use Mouse+$mod to drag floating windows floating_modifier $mod -# move tiling windows via drag & drop by left-clicking into the title bar, -# or left-clicking anywhere into the window while holding the floating modifier. +# Allow dragging tiling windows by holding down $mod and left mouse button tiling_drag modifier titlebar -# start a terminal +# Keybindings + +# Start a terminal bindsym $mod+Return exec kitty -# kill focused window +# Start a brave browser +bindsym $mod+b exec brave + +bindsym $mod+c exec cursor + +# Kill focused window bindsym $mod+a kill +# Start rofi (a program launcher) bindsym $mod+d exec --no-startup-id rofi -show run bindsym $mod+Tab exec --no-startup-id rofi -show window -# alternatively, you can use the cursor keys: +# Change focus bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right -# alternatively, you can use the cursor keys: +# 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 +# Split orientation bindsym $mod+h split h - -# split in vertical orientation bindsym $mod+v split v -# enter fullscreen mode for the focused container +# Enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle -# change container layout (stacked, tabbed, toggle split) +# Change container layout bindsym $mod+s layout stacking bindsym $mod+z layout tabbed bindsym $mod+e layout toggle split -# toggle tiling / floating +# Toggle tiling / floating bindsym $mod+Shift+space floating toggle -# change focus between tiling / floating windows +# Change focus between tiling / floating windows bindsym $mod+space focus mode_toggle -# focus the parent container +# Focus the parent container bindsym $mod+q focus parent -# focus the child container -#bindsym $mod+d focus child - +# Workspace names set $ws1 "1" set $ws2 "2" set $ws3 "3" @@ -139,6 +157,7 @@ set $ws8 "8" set $ws9 "9" set $ws10 "10" +# Assign workspaces to specific outputs workspace $ws1 output DP-0 workspace $ws2 output DP-0 workspace $ws3 output DP-0 @@ -150,6 +169,7 @@ workspace $ws8 output DP-1-3 workspace $ws9 output DP-1-3 workspace $ws10 output DP-1-3 +# Switch to workspace bindsym $mod+1 workspace number $ws1 bindsym $mod+2 workspace number $ws2 bindsym $mod+3 workspace number $ws3 @@ -161,6 +181,7 @@ 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 @@ -172,11 +193,19 @@ 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 bindsym $mod+Shift+r restart + +# Exit i3 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'" + +# Lock screen bindsym $mod+l exec betterlockscreen -l dimblur --display 1 --off 10 +# Resize window mode bindsym $mod+r mode "resize" mode "resize" { bindsym Left resize shrink width 10 px or 10 ppt @@ -189,12 +218,18 @@ mode "resize" { bindsym $mod+r mode "default" } - -#exec --no-startup-id xautolock -time 10 -locker "betterlockscreen -l dimblur --display 1 --off 10" -notify 30 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 30 seconds'" - -exec --no-startup-id ~/.config/i3/startup_apps.sh -exec --no-startup-id deadd-notification-center - +# Screenshot bindsym $mod+p --release exec scrot -s ~/Pictures/Screenshots/scrot_%F.png -e 'xclip -selection clipboard -t image/png -i $f' +# Assign applications to specific workspaces +assign [class="Brave-browser"] $ws4 +assign [class="thunderbird"] $ws9 +assign [class="Jellyfin Media Player"] $ws8 +assign [class="ZapZap"] $ws7 +# Autostart applications +exec --no-startup-id deadd-notification-center +exec --no-startup-id brave +exec --no-startup-id thunderbird +exec --no-startup-id jellyfinmediaplayer +exec --no-startup-id zapzap diff --git a/i3/.config/i3/startup_apps.sh b/i3/.config/i3/startup_apps.sh deleted file mode 100755 index 18efb52..0000000 --- a/i3/.config/i3/startup_apps.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# Start Firefox and move it to workspace 4 -i3-msg 'workspace 4; exec firefox' - -# Give a delay for Firefox to start and initialize -sleep 2 - -# Start Thunderbird and move it to workspace 9 -i3-msg 'workspace 9; exec thunderbird' - -# Give a delay for Thunderbird to start and initialize -sleep 2 - -# Start Jellyfin Media Player and move it to workspace 8 -i3-msg 'workspace 8; exec jellyfinmediaplayer' - -sleep 2 - -i3-msg 'workspace 7; exec zapzap;' diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf index e99d6b9..5dbec6b 100644 --- a/picom/.config/picom/picom.conf +++ b/picom/.config/picom/picom.conf @@ -105,11 +105,11 @@ fade-delta = 8; # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) # inactive-opacity = 1 -inactive-opacity = 0.95; +inactive-opacity = 1; # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) # frame-opacity = 1.0 -frame-opacity = 0.9; +frame-opacity = 1.0; # Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. # inactive-opacity-override = true diff --git a/scripts/update_cursor.sh b/scripts/update_cursor.sh deleted file mode 100755 index 42fb97d..0000000 --- a/scripts/update_cursor.sh +++ /dev/null @@ -1,7 +0,0 @@ -tmp_dir=$(mktemp -d) -cd "$tmp_dir" -curl -L https://downloader.cursor.sh/linux/appImage/x64 -o cursor -sudo chmod +x cursor -sudo mv cursor /usr/local/bin -rm -rf "$tmp_dir" -