commit e45db90e8ba63a893dd6daf5a67b4623a4bbc018 Author: oxypomme Date: Mon Jun 2 10:36:41 2025 +0200 feat: initial commit diff --git a/.config/containers/containers.conf b/.config/containers/containers.conf new file mode 100644 index 0000000..2888de8 --- /dev/null +++ b/.config/containers/containers.conf @@ -0,0 +1,3 @@ +[engine] +compose_providers=["/usr/bin/podman-compose"] +# compose_warning_logs=false diff --git a/.config/kanshi/config b/.config/kanshi/config new file mode 100644 index 0000000..d28b180 --- /dev/null +++ b/.config/kanshi/config @@ -0,0 +1,84 @@ +# === Integrated === + +output "eDP-1" { + alias $INTERNAL + mode 1920x1080 + position 0,0 +} + +# === Office ==== + +output "Dell Inc. DELL P2414H KKMMW62M0YKU" { + alias $OFFICE_CENTER + mode 1920x1080@60 + position 0,0 +} + +output "Hewlett Packard LA2405 CN41150LLN" { + alias $OFFICE_RIGHT + mode 1920x1200@59.950 + position 1920,0 +} + +# === Home === + +output "Iiyama North America PL2470H 0x30363738" { + alias $HOME_LEFT + mode 1920x1080@120 + position -1920,0 +} + +output "AOC Q24G4 VH0R3HA002164" { + alias $HOME_CENTER + mode 2560x1440@120 + position 0,0 + scale 1.25 +} + +output "Iiyama North America PL2470H 0x30363735" { + alias $HOME_RIGHT + mode 1920x1080@60 + position 2048,-235 + transform 270 +} + +# ==================================================== + +profile Nomad { + output $INTERNAL enable + exec ~/.config/kanshi/lid.sh + + exec tuned-adm profile balanced +} + +profile Home { + output $INTERNAL disable + + output $HOME_LEFT enable + output $HOME_CENTER enable + output $HOME_RIGHT enable + + # Workspace 1 on left + exec swaymsg workspace 1, move workspace to "'Iiyama North America PL2470H 0x30363738'" + # Workspace 2 on center + exec swaymsg workspace 2, move workspace to "'AOC Q24G4 VH0R3HA002164'" + # Workspace 3 on right + exec swaymsg workspace 3, move workspace to "'Iiyama North America PL2470H 0x30363735'" + + exec tuned-adm profile throughput-performance +} + +profile Office { + output $INTERNAL enable position -1920,0 + output $OFFICE_CENTER enable + output $OFFICE_RIGHT enable + + # Workspace 1 on left + exec swaymsg workspace 1, move workspace to "eDP-1" + # Workspace 2 on center + exec swaymsg workspace 2, move workspace to "'Dell Inc. DELL P2414H KKMMW62M0YKU'" + # Workspace 3 on right + exec swaymsg workspace 3, move workspace to "'Hewlett Packard LA2405 CN41150LLN'" + + exec tuned-adm profile throughput-performance +} diff --git a/.config/kanshi/lid.sh b/.config/kanshi/lid.sh new file mode 100755 index 0000000..994d67d --- /dev/null +++ b/.config/kanshi/lid.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +LAPTOP_OUTPUT="eDP-1" +LID_STATE_FILE="/proc/acpi/button/lid/LID0/state" + +read -r LS < "$LID_STATE_FILE" + +case "$LS" in +*open) swaymsg output "$LAPTOP_OUTPUT" enable ;; +*closed) swaymsg output "$LAPTOP_OUTPUT" disable ;; +*) echo "Could not get lid state" >&2 ; exit 1 ;; +esac diff --git a/.config/pipewire/pipewire-pulse.conf b/.config/pipewire/pipewire-pulse.conf new file mode 100644 index 0000000..4f4e03e --- /dev/null +++ b/.config/pipewire/pipewire-pulse.conf @@ -0,0 +1,187 @@ +# PulseAudio config file for PipeWire version "1.4.1" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire-pulse.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire-pulse.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #log.level = 2 + + #default.clock.quantum-limit = 8192 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + nice.level = -11 + #rt.prio = 55 + #rt.time.soft = -1 + #rt.time.hard = -1 + #uclamp.min = 0 + #uclamp.max = 1024 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + { name = libpipewire-module-metadata } + + { name = libpipewire-module-protocol-pulse + args = { + # contents of pulse.properties can also be placed here + # to have config per server. + } + } +] + +# Extra scripts can be started here. Setup in default.pa can be moved in +# a script or in pulse.cmd below +context.exec = [ + #{ path = "pactl" args = "load-module module-always-sink" } + #{ path = "pactl" args = "upload-sample my-sample.wav my-sample" } + #{ path = "/usr/bin/sh" args = "~/.config/pipewire/default.pw" } +] + +# Extra commands can be executed here. +# load-module : loads a module with args and flags +# args = " " +# ( flags = [ nofail ] ) +# ( condition = [ { = , ... } ... ] ) +# conditions will check the pulse.properties key/values. +pulse.cmd = [ + { cmd = "load-module" args = "module-always-sink" flags = [ ] + condition = [ { pulse.cmd.always-sink = !false } ] } + { cmd = "load-module" args = "module-device-manager" flags = [ ] + condition = [ { pulse.cmd.device-manager = !false } ] } + { cmd = "load-module" args = "module-device-restore" flags = [ ] + condition = [ { pulse.cmd.device-restore = !false } ] } + { cmd = "load-module" args = "module-stream-restore" flags = [ ] + condition = [ { pulse.cmd.stream-restore = !false } ] } + #{ cmd = "load-module" args = "module-switch-on-connect" } + #{ cmd = "load-module" args = "module-gsettings" flags = [ nofail ] } +] + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = true + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 + #dither.noise = 0 +} + +pulse.properties = { + # the addresses this server listens on + server.address = [ + "unix:native" + #"unix:/tmp/something" # absolute paths may be used + #"tcp:4713" # IPv4 and IPv6 on all addresses + #"tcp:[::]:9999" # IPv6 on all addresses + #"tcp:127.0.0.1:8888" # IPv4 on a single address + # + #{ address = "tcp:4713" # address + # max-clients = 64 # maximum number of clients + # listen-backlog = 32 # backlog in the server listen queue + # client.access = "restricted" # permissions for clients + #} + ] + #server.dbus-name = "org.pulseaudio.Server" + #pulse.allow-module-loading = true + pulse.min.req = 256/48000 # 2.7ms + #pulse.default.req = 960/48000 # 20 milliseconds + pulse.min.frag = 256/48000 # 2.7ms + #pulse.default.frag = 96000/48000 # 2 seconds + #pulse.default.tlength = 96000/48000 # 2 seconds + pulse.min.quantum = 256/48000 # 2.7ms + #pulse.idle.timeout = 0 # don't pause after underruns + #pulse.default.format = F32 + #pulse.default.position = [ FL FR ] +} + +pulse.properties.rules = [ + { matches = [ { cpu.vm.name = !null } ] + actions = { + update-props = { + # These overrides are only applied when running in a vm. + pulse.min.quantum = 1024/48000 # 22ms + } + } + } +] + +# client/stream specific properties +pulse.rules = [ + { + matches = [ + { + # all keys must match the value. ! negates. ~ starts regex. + #client.name = "Firefox" + #application.process.binary = "teams" + #application.name = "~speech-dispatcher.*" + } + ] + actions = { + update-props = { + #node.latency = 512/48000 + } + # Possible quirks:" + # force-s16-info forces sink and source info as S16 format + # remove-capture-dont-move removes the capture DONT_MOVE flag + # block-source-volume blocks updates to source volume + # block-sink-volume blocks updates to sink volume + #quirks = [ ] + } + } + { + # skype does not want to use devices that don't have an S16 sample format. + matches = [ + { application.process.binary = "teams" } + { application.process.binary = "teams-insiders" } + { application.process.binary = "teams-for-linux" } + { application.process.binary = "skypeforlinux" } + ] + actions = { quirks = [ force-s16-info ] } + } + { + # firefox marks the capture streams as don't move and then they + # can't be moved with pavucontrol or other tools. + matches = [ { application.process.binary = "firefox" } ] + actions = { quirks = [ remove-capture-dont-move ] } + } + { + # speech dispatcher asks for too small latency and then underruns. + matches = [ { application.name = "~speech-dispatcher.*" } ] + actions = { + update-props = { + pulse.min.req = 512/48000 # 10.6ms + pulse.min.quantum = 512/48000 # 10.6ms + pulse.idle.timeout = 5 # pause after 5 seconds of underrun + } + } + } + #{ + # matches = [ { application.process.binary = "Discord" } ] + # actions = { quirks = [ block-source-volume ] } + #} +] diff --git a/.config/rofi/cliphist-rofi-img b/.config/rofi/cliphist-rofi-img new file mode 100755 index 0000000..d11fadf --- /dev/null +++ b/.config/rofi/cliphist-rofi-img @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +tmp_dir="/tmp/cliphist" +rm -rf "$tmp_dir" + +if [[ -n "$1" ]]; then + cliphist decode <<<"$1" | wl-copy + exit +fi + +mkdir -p "$tmp_dir" + +read -r -d '' prog <$tmp_dir/"grp[1]"."grp[3]) + print \$0"\0icon\x1f$tmp_dir/"grp[1]"."grp[3] + next +} +1 +EOF +cliphist list | gawk "$prog" diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi new file mode 100644 index 0000000..3fd6e9d --- /dev/null +++ b/.config/rofi/config.rasi @@ -0,0 +1,34 @@ +configuration { + font: "FiraCode Nerd Font 12"; + line-margin: 12; + + // display-ssh: " "; + // display-run: " "; + display-drun: " "; + display-window: " "; + display-combi: " "; + display-calc: " "; + display-clipboard: "󰅏"; + + match: "fuzzy"; + + combi-hide-mode-prefix: true; + show-icons: true; + + calc { + show-match: false; + sort: false; + } +} + + +@theme "nord.rasi" + +listview { + lines: 10; + columns: 1; +} + +window { + width: 30%; +} diff --git a/.config/rofi/nord.rasi b/.config/rofi/nord.rasi new file mode 100644 index 0000000..66a0612 --- /dev/null +++ b/.config/rofi/nord.rasi @@ -0,0 +1,137 @@ +/** + * Nordic rofi theme + * Adapted by undiabler + * + * Nord Color palette imported from https://www.nordtheme.com/ + * + */ + + +* { + nord0: #2e3440; + nord1: #3b4252; + nord2: #434c5e; + nord3: #4c566a; + + nord4: #d8dee9; + nord5: #e5e9f0; + nord6: #eceff4; + + nord7: #8fbcbb; + nord8: #88c0d0; + nord9: #81a1c1; + nord10: #5e81ac; + nord11: #bf616a; + + nord12: #d08770; + nord13: #ebcb8b; + nord14: #a3be8c; + nord15: #b48ead; + + foreground: @nord9; + backlight: #ccffeedd; + background-color: transparent; + + highlight: underline bold #eceff4; + + transparent: rgba(46,52,64,0); +} + +window { + location: center; + anchor: center; + transparency: "screenshot"; + padding: 10px; + border: 0px; + border-radius: 6px; + + background-color: @transparent; + spacing: 0; + children: [mainbox]; + orientation: horizontal; +} + +mainbox { + spacing: 0; + children: [ inputbar, message, listview ]; +} + +message { + color: @nord0; + padding: 5; + border-color: @foreground; + border: 0px 2px 2px 2px; + background-color: @nord7; +} + +inputbar { + color: @nord6; + padding: 11px; + background-color: #3b4252; + + border: 1px; + border-radius: 6px 6px 0px 0px; + border-color: @nord10; +} + +entry, prompt, case-indicator { + text-font: inherit; + text-color:inherit; +} + +prompt { + margin: 0px 1em 0em 0em ; +} + +listview { + padding: 8px; + border-radius: 0px 0px 6px 6px; + border-color: @nord10; + border: 0px 1px 1px 1px; + background-color: rgba(46,52,64,0.9); + dynamic: false; +} + +element { + padding: 3px; + vertical-align: 0.5; + border-radius: 4px; + background-color: transparent; + color: @foreground; + text-color: rgb(216, 222, 233); +} + +element selected.normal { + background-color: @nord7; + text-color: #2e3440; +} + +element-text, element-icon { + background-color: inherit; + text-color: inherit; +} + +button { + padding: 6px; + color: @foreground; + horizontal-align: 0.5; + + border: 2px 0px 2px 2px; + border-radius: 4px 0px 0px 4px; + border-color: @foreground; +} + +button selected normal { + border: 2px 0px 2px 2px; + border-color: @foreground; +} + +textbox { + padding: 8px; + border-radius: 6px 6px 6px 6px; + border-color: @nord10; + border: 1px 1px 1px 1px; + background-color: rgba(46,52,64,0.9); + dynamic: true; + text-color: @backlight; +} diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..f15fcb4 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,280 @@ +# Default config for sway +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod4 +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +# Recommends: foot +set $term foot +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +# Recommends: rofi-wayland +set $rofi_cmd rofi -terminal '$term' +# Shows a combined list of the applications with desktop files and +# executables from PATH. +# TODO: add window with the next release of rofi-wayland +set $menu $rofi_cmd -show combi -combi-modes drun#emoji -modes combi#calc#window + +### Notification Daemon +exec swaync + +# Toggle control center +bindsym $mod+Shift+n exec swaync-client -t -swa + +### Clipboard history +exec wl-paste --watch cliphist store + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +# Requires: desktop-backgrounds-compat, swaybg, jxl-pixbuf-loader +output * bg ~/Images/Perso/Wallpapers/wave.jpg fill +# +# Example configuration: +# +# output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +# -> Managed by Kanshi (~/.config/kanshi/config) + +### Idle configuration + +# -> Managed by swayidle (/usr/share/sway/config.d/90-swayidle.conf) + +### Lock configuration +# -> Managed by swaylock (~/.config/swaylock/config) +bindsym $mod+Escape exec loginctl lock-session + +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. + +### Input configuration +# +# Example configuration: +# +# input "2:14:SynPS/2_Synaptics_TouchPad" { +# dwt enabled +# tap enabled +# natural_scroll enabled +# middle_emulation enabled +# } +# +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. + +focus_follows_mouse no + +input "type:keyboard" { + xkb_layout fr + xkb_numlock enabled +} + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec $term + + # Kill focused window + bindsym $mod+Shift+q kill + + # Start your launcher + bindsym $mod+Space exec $menu + bindsym $mod+Shift+v exec $rofi_cmd -modi clipboard:~/.config/rofi/cliphist-rofi-img -show clipboard + + # Start explorer + bindsym $mod+e exec thunar + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' + +# +# Moving around: +# + # Move your focus around + bindsym $mod+$left focus left + bindsym $mod+$down focus down + bindsym $mod+$up focus up + bindsym $mod+$right focus right + # Or use $mod+[up|down|left|right] + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+$left move left + bindsym $mod+Shift+$down move down + bindsym $mod+Shift+$up move up + bindsym $mod+Shift+$right move right + # Ditto, with arrow 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 +# +# Workspaces: +# + + # Switch to workspace + bindsym $mod+ampersand workspace number 1 + bindsym $mod+eacute workspace number 2 + bindsym $mod+quotedbl workspace number 3 + bindsym $mod+apostrophe workspace number 4 + bindsym $mod+parenleft workspace number 5 + bindsym $mod+minus workspace number 6 + bindsym $mod+egrave workspace number 7 + bindsym $mod+underscore workspace number 8 + bindsym $mod+ccedilla workspace number 9 + bindsym $mod+agrave workspace number 10 + + # Move focused container to workspace + bindsym $mod+Shift+ampersand move container to workspace number 1 + bindsym $mod+Shift+eacute move container to workspace number 2 + bindsym $mod+Shift+quotedbl move container to workspace number 3 + bindsym $mod+Shift+apostrophe move container to workspace number 4 + bindsym $mod+Shift+parenleft move container to workspace number 5 + bindsym $mod+Shift+minus move container to workspace number 6 + bindsym $mod+Shift+egrave move container to workspace number 7 + bindsym $mod+Shift+underscore move container to workspace number 8 + bindsym $mod+Shift+ccedilla move container to workspace number 9 + bindsym $mod+Shift+agrave move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + # bindsym $mod+h splith + # bindsym $mod+v splitv + + # Switch the current container between different layout styles + # bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + # bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+v floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+Ctrl+v focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# Scratchpad: +# + # Sway has a "scratchpad", which is a bag of holding for windows. + # You can send windows there and get them back later. + + # Move the currently focused window to the 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 +# +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +##### Theme config + +# Polar Night +set $nord0 #2e3440 +set $nord1 #3b4252 +set $nord2 #434c5e +set $nord3 #4c566a +# Snow Storm +set $nord4 #d8dee9 +set $nord5 #e5e9f0 +set $nord6 #eceff4 +# Frost +set $nord7 #8fbcbb +set $nord8 #88c0d0 +set $nord9 #81a1c1 +set $nord10 #5e81ac +# Aurora +set $nord11 #bf616a +set $nord12 #d08770 +set $nord13 #ebcb8b +set $nord14 #a3be8c +set $nord15 #b48ead + +client.focused $nord0 $nord1 $nord4 +client.focused_inactive $nord0 $nord0 $nord4 +client.unfocused $nord0 $nord0 $nord4 +client.urgent $nord0 $nord11 $nord4 +client.background $nord0 + +# Include configs from 3 locations: +# - /usr/share/sway/config.d +# - /etc/sway/config.d +# - $XDG_CONFIG_HOME/sway/config.d ($HOME/.config/sway/config.d) +# +# If multiple directories contain the files with the same name, the later +# directory takes precedence; `$XDG_CONFIG_HOME/sway/config.d/20-swayidle.conf` +# will always be loaded instead of `/usr/share/sway/config.d/20-swayidle.conf` +# or `/etc/sway/config.d/20-swayidle.conf` +# +# This mechanism permits overriding our default configuration per-system +# (/etc) or per-user ($XDG_CONFIG_HOME) basis. Just create the file you +# want to modify/override in the higher-level directory. +# +# For example, to disable the default bar from Fedora configs, you'll need to +# $ echo -n > "$HOME/.config/sway/config.d/90-bar.conf" +# +# Note the quoting, the $() and the arguments quoting. All the parts are equally +# important to make the magic work. And if you want to learn the secret behind +# the trick, it's all in the `wordexp(3)`. +# +include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")' diff --git a/.config/sway/config.d/.50-rules-zoom.conf.swp b/.config/sway/config.d/.50-rules-zoom.conf.swp new file mode 100644 index 0000000..7fe4e14 Binary files /dev/null and b/.config/sway/config.d/.50-rules-zoom.conf.swp differ diff --git a/.config/sway/config.d/50-rules-browser.conf b/.config/sway/config.d/50-rules-browser.conf new file mode 100644 index 0000000..cfbaf02 --- /dev/null +++ b/.config/sway/config.d/50-rules-browser.conf @@ -0,0 +1,18 @@ +# apply mark for Xwayland and wayland native browser windows +for_window [class="Chromium-browser"] mark Browser +for_window [class="Brave-browser"] mark Browser +for_window [class="firefox"] mark Browser +for_window [app_id="Chromium-browser"] mark Browser +for_window [app_id="brave-browser"] mark Browser +for_window [app_id="firefox"] mark Browser +for_window [app_id="zen"] mark Browser + +# inhibit scrensaver for fullscreen browser windows +for_window [con_mark="Browser"] { + inhibit_idle fullscreen +} + +# firefox wayland screensharing indicator +for_window [app_id="firefox" title="Firefox — Sharing Indicator"] { + floating enable +} diff --git a/.config/sway/config.d/50-rules-mails.conf b/.config/sway/config.d/50-rules-mails.conf new file mode 100644 index 0000000..e4385ab --- /dev/null +++ b/.config/sway/config.d/50-rules-mails.conf @@ -0,0 +1,5 @@ +# thunderbird reminders +for_window [app_id="org.mozilla.Thunderbird" title="[0-9]+ rappels?"] { + floating enable + resize width 960 px height 540 px +} diff --git a/.config/sway/config.d/50-rules-zoom.conf b/.config/sway/config.d/50-rules-zoom.conf new file mode 100644 index 0000000..00f8e63 --- /dev/null +++ b/.config/sway/config.d/50-rules-zoom.conf @@ -0,0 +1,4 @@ +for_window [app_id="Zoom" title="^zoom$"] { + floating enable + floating_minimum_size 250 x 400 +} diff --git a/.config/sway/config.d/60-bindings-screenshot.conf b/.config/sway/config.d/60-bindings-screenshot.conf new file mode 100644 index 0000000..18d970b --- /dev/null +++ b/.config/sway/config.d/60-bindings-screenshot.conf @@ -0,0 +1,20 @@ +# Key bindings for taking screenshots +# +# The image files will be written to XDG_SCREENSHOTS_DIR if this is set +# or defined in user-dirs.dir, or to a fallback location XDG_PICTURES_DIR. +# +# Copy the file to ~/.config/sway/config.d/60-bindings-screenshot.conf (or to +# your $XDG_CONFIG_HOME location if set differently) to be able to overwrite +# existing shortcuts. +# Check 'man grimshot' for additional commands that you may find useful. +# +# Requires: grimshot + +bindsym { + # Capture the currently active output + Print exec grimshot copy output + # Capture the currently active window + Ctrl+Print exec grimshot save active + # Select and capture a custom rectangular area + Ctrl+Shift+Print exec grimshot copy area +} diff --git a/.config/swaylock/config b/.config/swaylock/config new file mode 100644 index 0000000..52c2aaa --- /dev/null +++ b/.config/swaylock/config @@ -0,0 +1,9 @@ +image=~/Images/Perso/Wallpapers/wave.jpg +scaling=fill + +show-keyboard-layout +indicator-caps-lock + +indicator-idle-visible +indicator-radius=75 +font-size=16 diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..05de44a --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,162 @@ +{ + "layer": "top", + "position": "top", + "modules-left": [ + "sway/workspaces", + "custom/right-arrow-dark" + ], + "modules-center": [ + "custom/left-arrow-dark", + "clock#1", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "clock#2", + "custom/right-arrow-dark", + "custom/right-arrow-light", + "clock#3", + "custom/right-arrow-dark" + ], + "modules-right": [ + "custom/left-arrow-dark", + "pulseaudio", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "memory", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "cpu", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "battery", + "power-profiles-daemon", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "disk", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "custom/notifications", + "custom/left-arrow-light", + "custom/left-arrow-dark", + "tray" + ], + + "custom/left-arrow-dark": { + "format": "", + "tooltip": false + }, + "custom/left-arrow-light": { + "format": "", + "tooltip": false + }, + "custom/right-arrow-dark": { + "format": "", + "tooltip": false + }, + "custom/right-arrow-light": { + "format": "", + "tooltip": false + }, + + "sway/workspaces": { + "disable-scroll": true, + "format": "{name}" + }, + + "custom/notifications": { + "escape": true, + "exec": "swaync-client -swb", + "exec-if": "which swaync-client", + "format": "{icon}", + "format-icons": { + "none": "󰅺", + "notification": "󰡟" + }, + "on-click": "sleep 0.1 && swaync-client -t -sw", + "return-type": "json", + "tooltip": false + }, + + "clock#1": { + "format": "{:%a}", + "tooltip": false + }, + "clock#2": { + "format": "{:%H:%M}", + "tooltip": false + }, + "clock#3": { + "format": "{:%d/%m}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "weeks-pos" : "right", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + } + }, + + "pulseaudio": { + "format": "{icon} {volume:2}%", + "format-bluetooth": "{icon} {volume}%", + "format-muted": "MUTE", + "format-icons": { + "headphones": "", + "default": [ + "", + "" + ] + }, + "scroll-step": 5, + "on-click": "pamixer -t", + "on-click-right": "pavucontrol" + }, + "memory": { + "interval": 5, + "format": " {}%" + }, + "cpu": { + "interval": 5, + "format": " {usage}%" + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": "{icon} {capacity}% 󰚥", + "format-icons": [ + "", + "", + "", + "", + "" + ] + }, + "power-profiles-daemon": { + "hide-empty-text": true, + "format": "{icon}", + "format-icons": { + "unknown": "", + "balanced": "", + "performance": "", + "power-saver": "", + } + }, + "disk": { + "interval": 5, + "format": " {percentage_used:2}%", + "path": "/" + }, + "tray": { + "icon-size": 12, + "spacing": 10 + } +} + diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..11012ad --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,110 @@ +@define-color nord0 #2e3440; +@define-color nord1 #3b4252; +@define-color nord2 #434c5e; +@define-color nord3 #4c566a; + +@define-color nord4 #d8dee9; +@define-color nord5 #e5e9f0; +@define-color nord6 #eceff4; + +@define-color nord7 #8fbcbb; +@define-color nord8 #88c0d0; +@define-color nord9 #81a1c1; +@define-color nord10 #5e81ac; + +@define-color nord11 #bf616a; +@define-color nord12 #d08770; +@define-color nord13 #ebcb8b; +@define-color nord14 #a3be8c; +@define-color nord15 #b48ead; + +* { + min-width: 0; + min-height: 0; + font-size: 13px; + font-family: FiraCode Nerd Font Propo; +} + +window#waybar { + background: @nord1; + color: @nord4; +} + +#custom-right-arrow-dark, +#custom-left-arrow-dark { + font-family: monospace; + font-size: 16px; + color: @nord0; +} +#custom-right-arrow-light, +#custom-left-arrow-light { + font-family: monospace; + font-size: 16px; + color: @nord1; + background: @nord0; +} + +#custom-notifications, +#workspaces, +#clock.1, +#clock.2, +#clock.3, +#pulseaudio, +#memory, +#cpu, +#battery, +#power-profiles-daemon, +#disk, +#tray { + background: @nord0; +} + +#workspaces button { + padding: 0 4px; + color: @nord4; +} +#workspaces button.focused { + color: @nord8; +} +#workspaces button:hover { + box-shadow: inherit; + text-shadow: inherit; + background: @nord4; + color: @nord1; + border: @nord0; +} + +#pulseaudio { + color: @nord10; +} +#memory { + color: @nord14; +} +#cpu { + color: @nord15; +} +#battery, #power-profiles-daemon { + color: @nord13; +} +#disk { + color: @nord12; +} + +#custom-notifications { + padding: 0 6px; +} + +#tray, +#clock, +#pulseaudio, +#memory, +#cpu, +#battery, +#disk { + padding: 0 10px; +} + +#power-profiles-daemon { + padding-right: 10px; +} +