First commit

This commit is contained in:
2025-07-22 02:30:15 +02:00
commit e9441f563b
66 changed files with 4401 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
partial alphanumeric_keys
xkb_symbols "qwerty-fr"
{
include "us(basic)"
include "level3(ralt_switch)"
name[Group1]= "US keyboard with french symbols - AltGr combination";
key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
key <AE01> { [ 1, exclam, onesuperior, exclamdown ] };
key <AE02> { [ 2, at, twosuperior, dead_doubleacute ] };
key <AE03> { [ 3, numbersign, ecircumflex, Ecircumflex ] };
key <AE04> { [ 4, dollar, EuroSign, dead_currency ] }; // FIXME: dead_currency has a different mapping than the one we want for qwerty-fr. Need to define a custom dead key instead. See Windows layout for dead key definition.
key <AE05> { [ 5, percent, dead_macron, dead_abovedot ] };
key <AE06> { [ 6, asciicircum, dead_circumflex, dead_caron ] };
key <AE07> { [ 7, ampersand, ucircumflex, Ucircumflex ] };
key <AE08> { [ 8, asterisk, icircumflex, Icircumflex ] };
key <AE09> { [ 9, parenleft, ocircumflex, Ocircumflex ] };
key <AE10> { [ 0, parenright, oslash, Oslash ] };
key <AE11> { [ minus, underscore, endash, emdash ] };
key <AE12> { [ equal, plus, notequal, approxeq ] };
key <AD01> { [ q, Q, acircumflex, Acircumflex ] };
key <AD02> { [ w, W, eacute, Eacute ] };
key <AD03> { [ e, E, egrave, Egrave ] };
key <AD04> { [ r, R, registered, copyright ] };
key <AD05> { [ t, T, thorn, THORN ] };
key <AD06> { [ y, Y, dead_invertedbreve, dead_breve ] };
key <AD07> { [ u, U, ugrave, Ugrave ] };
key <AD08> { [ i, I, igrave, Igrave ] };
key <AD09> { [ o, O, ograve, Ograve ] };
key <AD10> { [ p, P, oe, OE ] };
key <AD11> { [ bracketleft, braceleft, guillemotleft, leftdoublequotemark ] };
key <AD12> { [ bracketright, braceright, guillemotright, rightdoublequotemark ] };
key <AC01> { [ a, A, agrave, Agrave ] };
key <AC02> { [ s, S, ae, AE ] };
key <AC03> { [ d, D, ediaeresis, Ediaeresis ] };
key <AC04> { [ f, F, VoidSymbol, VoidSymbol ] };
key <AC05> { [ g, G, dead_greek, VoidSymbol ] }; // FIXME: dead_greek has a different mapping than the one we want for qwerty-fr. Need to define a custom dead key instead. See Windows layout for dead key definition.
key <AC06> { [ h, H, ydiaeresis, Ydiaeresis ] };
key <AC07> { [ j, J, udiaeresis, Udiaeresis ] };
key <AC08> { [ k, K, idiaeresis, Idiaeresis ] };
key <AC09> { [ l, L, odiaeresis, Odiaeresis ] };
key <AC10> { [ semicolon, colon, dead_acute, dead_abovering ] };
key <AC11> { [ apostrophe, quotedbl, dead_grave, dead_diaeresis ] };
key <BKSL> { [ backslash, bar, VoidSymbol, doublelowquotemark ] }; // „
key <LSGT> { [ less, greater, lessthanequal, greaterthanequal ] };
key <AB01> { [ z, Z, adiaeresis, Adiaeresis ] };
key <AB02> { [ x, X, multiply, division ] };
key <AB03> { [ c, C, ccedilla, Ccedilla ] };
key <AB04> { [ v, V, VoidSymbol, VoidSymbol ] };
key <AB05> { [ b, B, ssharp, U1E9E ] }; // ß, ẞ (capital)
key <AB06> { [ n, N, ntilde, Ntilde ] };
key <AB07> { [ m, M, VoidSymbol, VoidSymbol ] };
key <AB08> { [ comma, less, dead_cedilla, dead_ogonek ] };
key <AB09> { [ period, greater, periodcentered, ellipsis ] }; // ., >, ·, …
key <AB10> { [ slash, question, rightsinglequotemark, questiondown ] }; // /, ?, , ¿
key <SPCE> { [ space, space, nobreakspace, 0x100202F ] }; // espace insécable fine
};

View File

@@ -0,0 +1,35 @@
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
numlockx &
exec i3

View File

@@ -0,0 +1,36 @@
{
lib,
pkgs,
...
}@args:
{
services.xserver = {
enable = true;
displayManager.startx.enable = true;
xkb = {
layout = "qwerty-fr";
extraLayouts.qwerty-fr = {
description = "QWERTY avec symboles et diacritiques français ";
languages = [ "eng" ];
symbolsFile = ./config/qwerty-fr;
};
};
};
environment.systemPackages = with pkgs; [
numlockx
adwaita-icon-theme
xclip
flameshot
];
environment.etc = {
"X11/xinit/xinitrc".source = ./config/xinitrc;
};
imports =
[
./i3
./polybar
]
++ lib.optionals args.isGpu [
./picom
];
}

View File

@@ -0,0 +1,15 @@
set $fg #c6d0f5
set $fgli #d4d8df
set $fglier #f6f7f9
set $bg #303446
set $bgli #323842
set $bgda #21252b
set $bgdaer #1e2227
set $black #51576d
set $red #e78284
set $green #e5c890
set $yellow #e5c890
set $blue #8caaee
set $purple #f4b8e4
set $cyan #81c8be
set $white #b5bfe2

View File

@@ -0,0 +1,136 @@
set $mod Mod4
# Reload Restart config | moved to rofi
#bindsym $mod+c reload
bindsym $mod+r restart
bindsym $mod+e exit
# Floating Modifier
floating_modifier $mod
# Kill focused window
bindsym $mod+q kill
# change focus
bindsym $mod+Up focus up
bindsym $mod+Down focus down
bindsym $mod+Left focus left
bindsym $mod+Right focus right
# Move Focused
bindsym $mod+Control+Up move up
bindsym $mod+Control+Down move down
bindsym $mod+Control+Left move left
bindsym $mod+Control+Right move right
bindsym $mod+o move container to output next
# Resizing window
bindsym $mod+Shift+Up resize grow height 10 px or 10 ppt
bindsym $mod+Shift+Down resize shrink height 10 px or 10 ppt
bindsym $mod+Shift+Left resize shrink width 10 px or 10 ppt
bindsym $mod+Shift+Right resize grow width 10 px or 10 ppt
# Workspace layout
bindsym $mod+space layout toggle splitv splith tabbed
# Fullscreen
bindsym $mod+f fullscreen toggle
# Flaoting
bindsym $mod+Shift+space floating toggle
# Splitting
bindsym $mod+v split vertical
bindsym $mod+h split horizontal
bindsym $mod+Control+space split toggle
# Volume control
bindsym F5 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym F6 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
##############
# Workspaces #
##############
include /etc/xdg/i3/screen
###########################
#Design
###########################
title_align center
default_border pixel 1
# Gaps
gaps inner 10px
smart_gaps off
gaps inner 5
#smart|ignore|leave_fullscreen
popup_during_fullscreen ignore
# Font
set $font ComicShannsMono Nerd Font Bold
font pango:$font 11
#colors
#include /etc/xdg/i3/colors
set $fg #c6d0f5
set $fgli #d4d8df
set $fglier #f6f7f9
set $bg #303446
set $bgli #323842
set $bgda #21252b
set $bgdaer #1e2227
set $black #51576d
set $red #e78284
set $green #e5c890
set $yellow #e5c890
set $blue #8caaee
set $purple #f4b8e4
set $cyan #81c8be
set $white #b5bfe2
# class border backgr. text indicator child_border
client.focused $blue $bg $blue $purple $blue
client.focused_inactive $bgda $bgli $fglier $bgda $bgda
client.unfocused $bgdaer $bg $fg $bgdaer $bgdaer
client.urgent $red $bg $fg $red $red
client.placeholder $bgdaer $bg $fg $bgdaer $bgdaer
client.background $bg
###########
# Startup #
###########
#exec_always --no-startup-id /usr/local/share/dotfiles/scripts/wallpapers.sh
exec_always --no-startup-id "killall picom ; picom"
exec_always --no-startup-id "killall dunst ; dunst"
exec_always --no-startup-id "flameshot"
#exec_always --no-startup-id "killall nextcloud ; nextcloud"
#################
# Apps shortcut #
#################
bindsym Print exec --no-startup-id flameshot gui
include /etc/xdg/i3/rofi
bindsym $mod+l exec --no-startup-id /usr/local/share/dotfiles/scripts/disconnect.sh
bindsym $mod+b exec --no-startup-id /usr/local/share/dotfiles/scripts/bookmarks.sh
bindsym $mod+m exec --no-startup-id /usr/local/share/dotfiles/scripts/mpv.sh
bindsym $mod+g exec --no-startup-id /usr/local/share/dotfiles/scripts/search.sh
bindsym $mod+c exec --no-startup-id rofi -show calc -theme disconnect.rasi
bindsym $mod+Shift+p exec --no-startup-id pavucontrol
bindsym $mod+Shift+d exec --no-startup-id discord --no-sandbox
bindsym $mod+Shift+f exec --no-startup-id firefox
bindsym $mod+Shift+s exec --no-startup-id steam
# Start a terminal
bindsym $mod+Return exec --no-startup-id kitty
# Display help
for_window [instance="cheatsheet"] floating enable
for_window [instance="vncviewer"] floating enable
bindsym $mod+s exec --no-startup-id kitty --class cheatsheet /usr/local/share/dotfiles/scripts/i3wm_key_help.sh

View File

@@ -0,0 +1,41 @@
set $monitor0 HDMI-0
set $monitor1 HDMI-1
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
workspace $ws1 output $monitor0
workspace $ws2 output $monitor0
workspace $ws3 output $monitor0
workspace $ws4 output $monitor0
workspace $ws5 output $monitor1
workspace $ws6 output $monitor1
workspace $ws7 output $monitor1
workspace $ws8 output $monitor1
bindsym $mod+mod2+KP_1 workspace $ws1
bindsym $mod+mod2+KP_2 workspace $ws2
bindsym $mod+mod2+KP_3 workspace $ws3
bindsym $mod+mod2+KP_4 workspace $ws4
bindsym $mod+mod2+KP_5 workspace $ws5
bindsym $mod+mod2+KP_6 workspace $ws6
bindsym $mod+mod2+KP_7 workspace $ws7
bindsym $mod+mod2+KP_8 workspace $ws8
bindsym $mod+Control+mod2+KP_1 move container to workspace $ws1
bindsym $mod+Control+mod2+KP_2 move container to workspace $ws2
bindsym $mod+Control+mod2+KP_3 move container to workspace $ws3
bindsym $mod+Control+mod2+KP_4 move container to workspace $ws4
bindsym $mod+Control+mod2+KP_5 move container to workspace $ws5
bindsym $mod+Control+mod2+KP_6 move container to workspace $ws6
bindsym $mod+Control+mod2+KP_7 move container to workspace $ws7
bindsym $mod+Control+mod2+KP_8 move container to workspace $ws8
exec --no-startup-id xrandr --output HDMI-1 --primary --right-of HDMI-0
exec_always --no-startup-id "kill $(pgrep polybar) ; polybar main & polybar alt"

View File

@@ -0,0 +1,40 @@
set $monitor0 Virtual-1
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
workspace $ws1 output $monitor0
workspace $ws2 output $monitor0
workspace $ws3 output $monitor0
workspace $ws4 output $monitor0
workspace $ws5 output $monitor0
workspace $ws6 output $monitor0
workspace $ws7 output $monitor0
workspace $ws8 output $monitor0
bindsym $mod+mod2+KP_1 workspace $ws1
bindsym $mod+mod2+KP_2 workspace $ws2
bindsym $mod+mod2+KP_3 workspace $ws3
bindsym $mod+mod2+KP_4 workspace $ws4
bindsym $mod+mod2+KP_5 workspace $ws5
bindsym $mod+mod2+KP_6 workspace $ws6
bindsym $mod+mod2+KP_7 workspace $ws7
bindsym $mod+mod2+KP_8 workspace $ws8
bindsym $mod+Control+mod2+KP_1 move container to workspace $ws1
bindsym $mod+Control+mod2+KP_2 move container to workspace $ws2
bindsym $mod+Control+mod2+KP_3 move container to workspace $ws3
bindsym $mod+Control+mod2+KP_4 move container to workspace $ws4
bindsym $mod+Control+mod2+KP_5 move container to workspace $ws5
bindsym $mod+Control+mod2+KP_6 move container to workspace $ws6
bindsym $mod+Control+mod2+KP_7 move container to workspace $ws7
bindsym $mod+Control+mod2+KP_8 move container to workspace $ws8
exec --no-startup-id xrandr --output Virtual-1 --primary --mode 1920x1080
exec_always --no-startup-id "killall polybar ; polybar main"

View File

@@ -0,0 +1,23 @@
{
pkgs,
...
}@attrs:
{
environment.systemPackages = [
pkgs.i3
pkgs.i3lock
pkgs.i3-volume
pkgs.i3-gaps
pkgs.rofi
];
environment.etc = {
"xdg/i3/config".source = ./config/config;
"xdg/i3/colors".source = ./config/colors;
"xdg/i3/screen".source = ./config/screen-${attrs.hostname};
"xdg/i3/rofi" = {
text = ''
bindsym $mod+d exec --no-startup-id ${pkgs.rofi}/bin/rofi -show drun -show-icons -config /etc/xdg/rofi/config.rasi
'';
};
};
}

View File

@@ -0,0 +1,436 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
#shadow = false;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
#shadow-radius = 8;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
#shadow-offset-x = -17;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
#shadow-offset-y = -17;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
#shadow-exclude = [
# "name = 'Notification'",
# "class_g = 'Conky'",
# "class_g ?= 'Notify-osd'",
# "class_g = 'Cairo-clock'",
# "_GTK_FRAME_EXTENTS@:c"
#];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [
]
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
inactive-opacity = 0.75;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
#frame-opacity = 0.75;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
active-opacity = 0.95;
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
#focus-exclude = [
#];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
#opacity-rule = [ "75:class_g = 'Polybar'" ];
#
opacity-rule = [
"100:class_g = 'firefox'",
"100:class_g = 'Chromium'",
"100:class_g = 'mpv'",
"100:class_g = 'dontstarve_steam_x64'",
"100:class_g = 'virt-manager'"
];
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
blur-method = "dual_kawase"
blur-size = 3
#
blur-deviation = true
#
blur-strength = 3
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = true
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ""
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
# "window_type = 'dock'",
"class_g = 'mpv'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Enable remote control via D-Bus. See the man page for more details.
# dbus = true
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
backend = "glx"
# backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. This usually means windows from the same application
# will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
#
# detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
glx-no-stencil = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface.
#
# window-shader-fg = "default"
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
# window-shader-fg-rule = [
# "my_shader.frag:window_type != 'dock'"
# ]
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Specify a list of conditions of windows that should never have transparent
# clipping applied. Useful for screenshot tools, where you need to be able to
# see through transparent parts of the window.
#
# transparent-clipping-exclude = []
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls whether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
# popup_menu = { opacity = 0.8; }
# dropdown_menu = { opacity = 0.8; }
};

View File

@@ -0,0 +1,12 @@
{
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
picom
];
environment.etc = {
"xdg/picom/picom.conf".source = ./config/picom.conf;
};
}

View File

@@ -0,0 +1,7 @@
[colors]
background = #cc303446
background-alt = #21252b
foreground = #c6d0f5
primary = #8caaee
alert = #e78284
disabled = #b5bfe2

View File

@@ -0,0 +1,218 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
include-file = colors.ini
include-file = screen.ini
[module/separator]
type = custom/text
format = <label>
format-padding = 6px
label = |
[module/arch]
type = custom/text
format = <label>
label = ""
label-font = 2
label-padding-right = 5px
label-foreground = ${colors.primary}
click-left = ~/.config/polybar/disconnect.sh
[module/systray]
type = internal/tray
format-margin = 0px
tray-spacing = 5px
tray-padding = 0px
tray-size = 90%
[module/i3]
type = internal/i3
pin-workspaces = true
show-urgent = true
enable-scroll = false
format = <label-state>
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 15px
label-unfocused = %name%
label-unfocused-background = ${colors.background-alt}
label-unfocused-padding = 15px
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 15px
label-separator = " "
label-separator-padding = 0px
label-separator-foreground = #ffb52a
[module/filesystemprefix]
type = custom/text
format = <label>
fotmat-font = 1
format-foreground=${colors.primary}
label = " "
label-font = 2
label-padding-right = 10px
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F8caaee}%{F-}%percentage_used%%
label-mounted-font = 1
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume>
format-volume-prefix = " "
format-volume-prefix-font = 3
format-volume-prefix-padding-right = 5px
format-volume-prefix-foreground = ${colors.primary}
label-volume = "%percentage%%"
label-volume-font = 1
label-muted = %{F#8caaee}󰝟%{F-} mute
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.primary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-font = 3
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-font = 2
format-prefix-padding-right = 8px
format-prefix-foreground = ${colors.primary}
label = %percentage%%
[module/eth]
type = internal/network
interface-type = wired
interval = 5
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-font = 2
format-connected-prefix-padding-right = 8px
format-connected-prefix-foreground = ${colors.primary}
label-connected = %ifname% %local_ip%
[module/ethspeed]
type = internal/network
interface-type = wired
interval = 5
format-connected = <label-connected>
format-connected-prefix = "󰾆 "
format-connected-prefix-font = 3
format-connected-prefix-padding-right = 5px
format-connected-prefix-foreground = ${colors.primary}
label-connected = %downspeed% %upspeed%
[module/pacman]
type = custom/script
exec = pacman -Syup | head -n -4 | wc -l
interval = 600
format = <label>
format-prefix = " "
format-prefix-font = 2
format-prefix-padding-right = 5px
format-prefix-foreground=${colors.primary}
[module/watchdog]
type = custom/script
exec = /etc/xdg/polybar/mailbox.sh count
interval = 30
format = <label>
#format-prefix = "✗ "
format-prefix = " "
format-prefix-font = 2
format-prefix-padding-right = 5px
format-prefix-foreground=${colors.primary}
format-fail = <label-fail>
format-fail-prefix = "✗ "
format-fail-prefix-font = 0
format-fail-prefix-foreground=${colors.alert}
click-left = /etc/xdg/polybar/mailbox.sh fetch
[module/dateprefix]
type = custom/text
format = <label>
format-foreground=${colors.primary}
label = " "
label-font = 3
label-padding-right = 5px
click-left = ~/.config/polybar/calendar.sh
[module/date]
type = internal/date
interval = 1.0
date = %a %Y-%m-%d %H:%M
date-alt = %H:%M:%S
format = <label>
label = %date%
label-padding-right = 10px
[settings]
screenchange-reload = true
pseudo-transparency = false

View File

@@ -0,0 +1,4 @@
_USER="jeremie.salvi@gmail.com"
_PASSWD="mystrongpasswd"
_SERVER="gmail.com"
_FOLDER="Admin"

View File

@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -e
cd -- "$(dirname -- "$0")"
_DIRNAME="$(pwd)"
source ~/.config/polybar/imap_creds
if [[ -n $1 ]] && [[ $1 == "count" ]]
then
_COUNT=$(curl -u "$_USER:$_PASSWD" "imaps://$_SERVER" -X "STATUS $_FOLDER (UNSEEN)" 2>/dev/null | \
sed -e 's/)\r//' -e 's/.*UNSEEN //')
printf "%s" "$_COUNT"
(( _COUNT == 0 )) && exit 0
exit 1
fi
if [[ -n $1 ]] && [[ $1 == "fetch" ]]
then
_UNSEEN="$(curl -u \""$_USER":"$_PASSWD"\" "imaps://$_SERVER/$_FOLDER" -X "SEARCH UNSEEN" 2>/dev/null | \
sed -e "s/\\r//" -e "s/* SEARCH //" -e "s/ /,/g")"
_MAILS=$(curl -v -u "$_USER:$_PASSWD" "imaps://$_SERVER/$_FOLDER" -X "FETCH $_UNSEEN BODY.PEEK[HEADER.FIELDS (From Subject)]" 2>&1 | \
grep -E "From:|Subject:" | sed -e 's/< //' -e 's/Subject/\nSubject/')
dunstify -I ../icons/gmail.svg \
"" "$_MAILS"
printf "%s" "$_MAILS"
exit 0
fi
cat <<EOF
Usage:
mailbox.sh count => Count unseen mails in $_FOLDER
mailbox.sh fetch => Fetch "From:" and "Subject:" from unseen mails in $_FOLDER
EOF

View File

@@ -0,0 +1,63 @@
[bar/main]
monitor = HDMI-1
width = 100%
height = 30px
radius = 0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3px
border-size = 0pt
padding-left = 10px
padding-right = 0px
font-0 = ComicShannsMono Nerd Font:size=14;2
font-1 = ComicShannsMono Nerd Font:size=14;1
font-2 = ComicShannsMono Nerd Font:size=14;0
font-3 = DejaVuSansM Nerd Font:size=14;0
fixed-center = true
modules-left = arch separator cpu separator memory separator filesystemprefix filesystem separator eth separator ethspeed separator pulseaudio
modules-center = i3
modules-right = watchdog separator pacman separator xkeyboard separator dateprefix date systray
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
[bar/alt]
monitor = HDMI-0
width = 100%
height = 30px
radius = 0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3px
border-size = 0pt
padding-left = 10px
padding-right = 0px
font-0 = ComicShannsMono Nerd Font:size=14;2
font-1 = ComicShannsMono Nerd Font:size=14;1
font-2 = ComicShannsMono Nerd Font:size=14;0
font-3 = DejaVuSansM Nerd Font:size=14;0
fixed-center = true
modules-left = arch separator cpu separator memory separator filesystemprefix filesystem separator eth separator ethspeed separator pulseaudio
modules-center = i3
modules-right = xkeyboard separator dateprefix date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true

View File

@@ -0,0 +1,31 @@
[bar/main]
monitor =
width = 100%
height = 30px
radius = 0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3px
border-size = 0pt
padding-left = 10px
padding-right = 0px
font-0 = ComicShannsMono Nerd Font:size=14;2
font-1 = ComicShannsMono Nerd Font:size=14;1
font-2 = ComicShannsMono Nerd Font:size=14;0
font-3 = DejaVuSansM Nerd Font:size=14;0
fixed-center = true
modules-left = arch separator cpu separator memory separator filesystemprefix filesystem separator eth separator ethspeed separator pulseaudio
modules-center = i3
modules-right = watchdog separator pacman separator xkeyboard separator dateprefix date systray
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true

View File

@@ -0,0 +1,18 @@
{
pkgs,
lib,
config,
...
}@attrs:
{
environment.systemPackages = with pkgs; [
polybarFull
];
environment.etc = {
"xdg/polybar/config.ini".source = ./config/config.ini;
"xdg/polybar/colors.ini".source = ./config/colors.ini;
"xdg/polybar/screen.ini".source = ./config/screen-${attrs.hostname}.ini;
"xdg/polybar/mailbox.sh".source = ./config/mailbox.sh;
"xdg/polybar/imap_creds.example".source = ./config/imap_creds.example;
};
}