How to install murrine engine?

321

The package for the murrine engine, the cairo-based gtk+-2.0 theme engine is gtk2-engines-murrine. cairo is a 2D vector graphics library.

sudo apt-get install gtk2-engines-murrine

The murrine engine is based on clearlooks and approximately 30% faster.

Share:
321

Related videos on Youtube

hampani
Author by

hampani

Updated on September 18, 2022

Comments

  • hampani
    hampani over 1 year

    I need to get the first day of the week by using the week number (weeks starting on Monday). I found this piece of code here: https://stackoverflow.com/a/46343917/13498210. However, the code doesn't seem to work. For example, inputing week 34 returns the date 08-22 (the sunday of the previous week) instead of the correct 08-23.

    My question is, is it safe to just "add" one day to the result? Or will that create bugs?

    function getFirstMondayOfWeek(weekNo) {
        var firstMonday = new Date(new Date().getFullYear(), 0, 4, 0, 0, 0, 0);
    
        while (firstMonday.getDay() != 1) {
            firstMonday.setDate(firstMonday.getDate() - 1);
        }
        if (1 <= weekNo && weekNo <= 52)
            return firstMonday.setDate(firstMonday.getDate() + 7 * (weekNo - 1));
    
        firstMonday.setDate(firstMonday.getDate() + 7 * (weekNo - 1));
        if (weekNo = 53 && firstMonday.getDate() >= 22 && firstMonday.getDate() <= 28)
            return firstMonday; //JUST ADD A DAY HERE
        return null;
    }
    
    • fuzzybear
      fuzzybear over 2 years
      what do you mean first Monday of the week ? do you mean Month?
    • hampani
      hampani over 2 years
      I want to get the first day of the week, with weeks starting on Mondays.
    • Mihai T
      Mihai T over 2 years
      so basically you want to change the default ' first-day ' ( 0 ) to be Monday instead of Sunday ?
  • RobG
    RobG over 2 years
    Please post working code here. A good answer should explain why the OP has their issue and how your code fixes it.
  • RobG
    RobG over 2 years
    Adding and removing days as milliseconds is not reliable as not all days are 24 hours long were daylight saving is observed.
  • lejlun
    lejlun over 2 years
    @RobG I'm not sure I get what you mean. Could you give an example where this function would fail?
  • RobG
    RobG over 2 years
    Over a daylight saving boundary where a day may be 23 or 25 hours long (or 23.5 or 24.5 if the DST offset is 30 minutes).
  • RobG
    RobG over 2 years
    People shouldn't have to go to another site to see the code. It also makes commenting on the code more difficult, and links rot.
  • fuzzybear
    fuzzybear over 2 years
    I get your view RobG but I don't mind clicking a link it helps to proliferate code out there IMHO, what if SO shutdown, etc, there are swings and roundabouts to both I guess?
  • RobG
    RobG over 2 years
    Like Gary, SO will never die…